@dra2020/baseclient 1.0.86 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/baseclient.js
CHANGED
|
@@ -2870,13 +2870,17 @@ class MultiBlockMapping {
|
|
|
2870
2870
|
this.entries.splice(i, 1);
|
|
2871
2871
|
}
|
|
2872
2872
|
map(blockid) {
|
|
2873
|
-
|
|
2873
|
+
// Walk backwards to pick up overrides first
|
|
2874
|
+
for (let i = this.entries.length - 1; i >= 0; i--) {
|
|
2874
2875
|
let e = this.entries[i];
|
|
2875
2876
|
if (e.bm[blockid])
|
|
2876
2877
|
return e.bm[blockid];
|
|
2877
2878
|
}
|
|
2878
2879
|
return undefined;
|
|
2879
2880
|
}
|
|
2881
|
+
mapmain(blockid) {
|
|
2882
|
+
return this.entries.length ? this.entries[0].bm[blockid] : undefined;
|
|
2883
|
+
}
|
|
2880
2884
|
rev(geoid) {
|
|
2881
2885
|
for (let i = 0; i < this.entries.length; i++) {
|
|
2882
2886
|
let e = this.entries[i];
|
|
@@ -2887,6 +2891,11 @@ class MultiBlockMapping {
|
|
|
2887
2891
|
}
|
|
2888
2892
|
return undefined;
|
|
2889
2893
|
}
|
|
2894
|
+
// Just walks first map
|
|
2895
|
+
forEach(cb) {
|
|
2896
|
+
if (this.entries.length)
|
|
2897
|
+
Object.keys(this.entries[0].bm).forEach(blockid => cb(blockid));
|
|
2898
|
+
}
|
|
2890
2899
|
}
|
|
2891
2900
|
exports.MultiBlockMapping = MultiBlockMapping;
|
|
2892
2901
|
|