Live updates to map as things are placed or removed

This commit is contained in:
Danielv123 committed 2018-01-03 18:34:27 +01:00
1 parent 9ae20886b3
commit 51bb9f4d71
5 files changed
+91 -29

No files matched your search

+1 -2
View File
@@ -48,7 +48,7 @@ module.exports = class chunkStore {
});
});
resolve();
this.eventEmitter.emit("change", [{x,y}]);
this.eventEmitter.emit("change", {x,y});
}
});
});
@@ -58,7 +58,6 @@ module.exports = class chunkStore {
this.db.find({x:Math.floor(x), y:Math.floor(y)}, (err, docs) => {
if(err) reject(err);
resolve(docs);
this.eventEmitter.emit("change", docs);
});
});
}