Add getAllObjects() query for the object store

This commit is contained in:
Casper Warden
2018-10-19 16:39:24 +01:00
parent 2852c76cb0
commit 2efd01dca5
10 changed files with 95 additions and 5 deletions

View File

@@ -242,11 +242,19 @@ class RegionCommands extends CommandsBase_1.CommandsBase {
}
});
}
getAllObjects(resolve = false) {
return __awaiter(this, void 0, void 0, function* () {
const objs = this.currentRegion.objects.getAllObjects();
if (resolve) {
yield this.resolveObjects(objs);
}
return objs;
});
}
getObjectsInArea(minX, maxX, minY, maxY, minZ, maxZ, resolve = false) {
return __awaiter(this, void 0, void 0, function* () {
const objs = this.currentRegion.objects.getObjectsInArea(minX, maxX, minY, maxY, minZ, maxZ);
if (resolve) {
console.log('Resolving ' + objs.length + ' objects');
yield this.resolveObjects(objs);
}
return objs;