aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-01-24 15:33:38 -0500
committerHolden Rohrer <hr@hrhr.dev>2020-01-24 15:33:38 -0500
commit46d56620c3ba385bdd41bc391c975e4934b4c82d (patch)
tree3fe5b29f70cf374fd956c9c26a90fe4253d5fb39
parent8b014c3ce98670abd895789e9e206a828cc95a33 (diff)
tools/claim now uses 'fallback' event
-rw-r--r--tools/claim.js4
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);
}
}