setLayer form and make easyPlace rules require paper named "easyPlace"

This commit is contained in:
ForestOfLight
2025-04-12 20:56:24 -07:00
Unverified
parent 8da6474b38
commit 6ced22b57b
8 changed files with 48 additions and 34 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ export class StructureInstance {
}
setLayer(layer) {
if (layer < 1 || layer > this.#structure.size.y)
if (layer < 0 || layer > this.#structure.size.y)
throw new Error(`[StrucTool] Instance '${this.name}' of '${this.structureId}' does not have layer ${layer}.`);
this.#options.currentLayer = layer;
this.updateOptions();
@@ -129,7 +129,7 @@ export class StructureInstance {
const { min, max } = this.getLayeredBounds();
this.outliner = new Outliner(this.#options.dimensionId, this.toGlobalCoords(min), this.toGlobalCoords(max));
} else {
this.outliner = new Outliner(dimensionId, this.toGlobalCoords(this.getBounds().min), this.toGlobalCoords(this.getBounds().max));
this.outliner = new Outliner(this.#options.dimensionId, this.toGlobalCoords(this.getBounds().min), this.toGlobalCoords(this.getBounds().max));
}
}