From bbeee11057d566f389288472a8359ccc91cc57ba Mon Sep 17 00:00:00 2001 From: hexagonhexagon Date: Sat, 27 Jun 2020 22:52:25 -0400 Subject: [PATCH] Pressing Q on the same building twice clears the cursor. --- src/js/game/hud/parts/building_placer_logic.js | 7 ++++++- 1 file changed, 6 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 7d2cbb71..b9acd2ad 100644 --- a/src/js/game/hud/parts/building_placer_logic.js +++ b/src/js/game/hud/parts/building_placer_logic.js @@ -322,7 +322,12 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart { // Try to extract the building const extracted = this.hack_reconstructMetaBuildingAndVariantFromBuilding(contents); - if (!extracted) { + // If the building we are picking is the same as the one we have, clear the cursor. + if ( + !extracted || + (extracted.metaBuilding === this.currentMetaBuilding.get() && + extracted.variant === this.currentVariant.get()) + ) { this.currentMetaBuilding.set(null); return; }