mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-16 12:59:21 +00:00
only check when in editor
This commit is contained in:
parent
9e7585466e
commit
86517c2ea8
@ -80,14 +80,16 @@ export class GameLogic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Perform additional placement checks
|
// Perform additional placement checks
|
||||||
if (this.root.signals.prePlacementCheck.dispatch(entity, offset) === STOP_PROPAGATION) {
|
if (this.root.gameMode.getIsEditor()) {
|
||||||
return false;
|
const toolbar = this.root.hud.parts.buildingsToolbar;
|
||||||
|
const id = entity.components.StaticMapEntity.getMetaBuilding().getId();
|
||||||
|
|
||||||
|
if (toolbar.buildingHandles[id].puzzleLocked) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const toolbar = this.root.hud.parts.buildingsToolbar;
|
if (this.root.signals.prePlacementCheck.dispatch(entity, offset) === STOP_PROPAGATION) {
|
||||||
const id = entity.components.StaticMapEntity.getMetaBuilding().getId();
|
|
||||||
|
|
||||||
if (toolbar.buildingHandles[id].puzzleLocked) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user