diff --git a/src/js/changelog.js b/src/js/changelog.js index 3884d397..cfa6acdb 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -6,6 +6,7 @@ export const CHANGELOG = [ "Preparations for the wires update", "Update belt placement performance on huge factories (by Phlosioneer)", "Allow clicking on variants to select them", + "Allow clicking 'Q' over a shape or color patch to automatically select the miner building (by Gerdon262)", "Add 'copy key' button to shape viewer", "Add setting (on by default) to store the last used rotation per building instead of globally storing it (by Magos)", "Added chinese (traditional) translation", diff --git a/src/js/game/hud/parts/building_placer_logic.js b/src/js/game/hud/parts/building_placer_logic.js index c4b82f64..179dfc45 100644 --- a/src/js/game/hud/parts/building_placer_logic.js +++ b/src/js/game/hud/parts/building_placer_logic.js @@ -289,10 +289,14 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart { const contents = this.root.map.getTileContent(tile); if (!contents) { const tileBelow = this.root.map.getLowerLayerContentXY(tile.x, tile.y); + + // Check if there's a shape or color item below, if so select the miner if (tileBelow) { this.currentMetaBuilding.set(gMetaBuildingRegistry.findByClass(MetaMinerBuilding)); + + // Select chained miner if available, since thats always desired once unlocked if (this.root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_miner_chainable)) { - return this.currentVariant.set(enumMinerVariants.chainable); + this.currentVariant.set(enumMinerVariants.chainable); } } else { this.currentMetaBuilding.set(null);