1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00

Hotfix to prevent pasting locked buildings (#1272)

* fix to prevent pasting locked buildings

* only check when in editor
This commit is contained in:
Sense101 2021-07-28 08:20:08 +01:00 committed by GitHub
parent 62b6504917
commit 260041702b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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