diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-01-29 23:49:17 -0500 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-01-29 23:49:17 -0500 |
commit | 0e2883105e948ff6f35f954f8184fdd232d17a97 (patch) | |
tree | 7764d8b8aa770ddb836cb8a2dc7c580441437969 /tools/claim.js | |
parent | df56e8a4c6b05e9f2f5c98c14af3f95a7bc6926c (diff) | |
parent | 1cc310e20dda4a378aac76b49288e6c8e2361e5e (diff) |
Merge branch 'socket'
Made the socket object used by jarvis a singleton MetaSocket object to maintain
clean, modular code standards. This also means that future feature addition
will be easier because all references are to one object, of which the behavior
can be easily changed since most systems rely on EventEmitter or callback-style
structures
Diffstat (limited to 'tools/claim.js')
-rw-r--r-- | tools/claim.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/claim.js b/tools/claim.js index 721c5ad..b43417b 100644 --- a/tools/claim.js +++ b/tools/claim.js @@ -5,7 +5,7 @@ const ri = require('../utils/rectintersect'); const vec = require('../utils/vec'); const comb = require('../utils/comb'); -module.exports = function(catchall){ +module.exports = function(){ // catchall is called if tileUpdate occurs w/ no relevant claim on a part. let claims = {}; let claimId = 0; @@ -44,6 +44,6 @@ module.exports = function(catchall){ } claim.call(send, diffspace, rellocs, id, claim.space, claim.area); // claim.space should not be modified by the function. it is only present to make functions easier to write } - catchall(send, tilespaces, locs); + this.emit('fallback', send, tilespaces, locs); } } |