mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-12 02:49:20 +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
|
||||
if (this.root.signals.prePlacementCheck.dispatch(entity, offset) === STOP_PROPAGATION) {
|
||||
return false;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
const toolbar = this.root.hud.parts.buildingsToolbar;
|
||||
const id = entity.components.StaticMapEntity.getMetaBuilding().getId();
|
||||
|
||||
if (toolbar.buildingHandles[id].puzzleLocked) {
|
||||
if (this.root.signals.prePlacementCheck.dispatch(entity, offset) === STOP_PROPAGATION) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user