1
0
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:
Sense101 2021-07-27 19:18:12 +01:00
parent 9e7585466e
commit 86517c2ea8

View File

@ -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;
} }