Hotfix to prevent pasting locked buildings (#1272)

* fix to prevent pasting locked buildings

* only check when in editor
pull/1262/head
Sense101 3 years ago committed by GitHub
parent 62b6504917
commit 260041702b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,6 +80,15 @@ export class GameLogic {
}
// Perform additional placement checks
if (this.root.gameMode.getIsEditor()) {
const toolbar = this.root.hud.parts.buildingsToolbar;
const id = entity.components.StaticMapEntity.getMetaBuilding().getId();
if (toolbar.buildingHandles[id].puzzleLocked) {
return false;
}
}
if (this.root.signals.prePlacementCheck.dispatch(entity, offset) === STOP_PROPAGATION) {
return false;
}

Loading…
Cancel
Save