1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Add a setting to disable picking the miner when on a resource patch

This commit is contained in:
Exund 2020-09-12 02:43:42 +02:00
parent 50e40888fd
commit 5749fbe7eb
3 changed files with 14 additions and 3 deletions

View File

@ -327,7 +327,7 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
const tileBelow = this.root.map.getLowerLayerContentXY(tile.x, tile.y); 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 // Check if there's a shape or color item below, if so select the miner
if (tileBelow) { if (tileBelow && this.root.app.settings.getAllSettings().pickMinerOnPatch) {
this.currentMetaBuilding.set(gMetaBuildingRegistry.findByClass(MetaMinerBuilding)); this.currentMetaBuilding.set(gMetaBuildingRegistry.findByClass(MetaMinerBuilding));
// Select chained miner if available, since thats always desired once unlocked // Select chained miner if available, since thats always desired once unlocked

View File

@ -277,6 +277,7 @@ export const allApplicationSettings = [
new BoolSetting("disableCutDeleteWarnings", enumCategories.advanced, (app, value) => {}), new BoolSetting("disableCutDeleteWarnings", enumCategories.advanced, (app, value) => {}),
new BoolSetting("rotationByBuilding", enumCategories.advanced, (app, value) => {}), new BoolSetting("rotationByBuilding", enumCategories.advanced, (app, value) => {}),
new BoolSetting("displayChunkBorders", enumCategories.advanced, (app, value) => {}), new BoolSetting("displayChunkBorders", enumCategories.advanced, (app, value) => {}),
new BoolSetting("pickMinerOnPatch", enumCategories.advanced, (app, value) => {}),
new EnumSetting("refreshRate", { new EnumSetting("refreshRate", {
options: refreshRateOptions, options: refreshRateOptions,
@ -323,6 +324,7 @@ class SettingsStorage {
this.rotationByBuilding = true; this.rotationByBuilding = true;
this.clearCursorOnDeleteWhilePlacing = true; this.clearCursorOnDeleteWhilePlacing = true;
this.displayChunkBorders = false; this.displayChunkBorders = false;
this.pickMinerOnPatch = true;
this.enableColorBlindHelper = false; this.enableColorBlindHelper = false;
@ -529,7 +531,7 @@ export class ApplicationSettings extends ReadWriteProxy {
} }
getCurrentVersion() { getCurrentVersion() {
return 24; return 25;
} }
/** @param {{settings: SettingsStorage, version: number}} data */ /** @param {{settings: SettingsStorage, version: number}} data */
@ -636,7 +638,11 @@ export class ApplicationSettings extends ReadWriteProxy {
data.settings.musicVolume = 1.0; data.settings.musicVolume = 1.0;
data.settings.soundVolume = 1.0; data.settings.soundVolume = 1.0;
data.settings.refreshRate = "60"; data.settings.refreshRate = "60";
data.version = 24; }
if(data.version < 25) {
data.settings.pickMinerOnPatch = true;
data.version = 25;
} }
return ExplainedResult.good(); return ExplainedResult.good();

View File

@ -885,6 +885,11 @@ settings:
description: >- description: >-
The game is divided into chunks of 16x16 tiles, if this setting is enabled the borders of each chunk are displayed. The game is divided into chunks of 16x16 tiles, if this setting is enabled the borders of each chunk are displayed.
pickMinerOnPatch:
title: Pick miner on resource patch
description: >-
Enabled by default, selects the miner if you use the pipette when hovering a resource patch.
keybindings: keybindings:
title: Keybindings title: Keybindings
hint: >- hint: >-