From 680a385e2d8abd180c83f8e3a730dbc7c2c8d9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=97=D0=BB=20=D0=93=D1=80=D0=B8?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=27=D1=94=D0=B2?= Date: Sat, 1 May 2021 21:52:57 +0300 Subject: [PATCH] [puzzle] Prevent pipette cheats (miners, emitters) --- src/js/game/hud/parts/building_placer_logic.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/js/game/hud/parts/building_placer_logic.js b/src/js/game/hud/parts/building_placer_logic.js index 7743aa52..9e91f372 100644 --- a/src/js/game/hud/parts/building_placer_logic.js +++ b/src/js/game/hud/parts/building_placer_logic.js @@ -366,7 +366,8 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart { if ( tileBelow && this.root.app.settings.getAllSettings().pickMinerOnPatch && - this.root.currentLayer === "regular" + this.root.currentLayer === "regular" && + this.root.gameMode.hasResources() ) { this.currentMetaBuilding.set(gMetaBuildingRegistry.findByClass(MetaMinerBuilding)); @@ -390,6 +391,12 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart { return; } + // Disallow picking excluded buildings + if (this.root.gameMode.isBuildingExcluded(extracted.metaClass)) { + this.currentMetaBuilding.set(null); + return; + } + // If the building we are picking is the same as the one we have, clear the cursor. if ( this.currentMetaBuilding.get() &&