mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Allow clicking 'Q' over a shape or color patch to automatically select the miner building
This commit is contained in:
parent
a17316b1d7
commit
c0e5595a3f
@ -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",
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user