diff --git a/src/js/changelog.js b/src/js/changelog.js index 50c78cd3..ebd189da 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -2,7 +2,11 @@ export const CHANGELOG = [ { version: "1.1.15", date: "unreleased", - entries: ["Added continue button to main menu and add seperate 'New game' button (by jaysc)"], + entries: [ + "Added continue button to main menu and add seperate 'New game' button (by jaysc)", + "Added setting to disable smart tunnel placement introduced with the last update", + "Update translations ", + ], }, { version: "1.1.14", diff --git a/src/js/game/systems/underground_belt.js b/src/js/game/systems/underground_belt.js index 393df04a..5b308e25 100644 --- a/src/js/game/systems/underground_belt.js +++ b/src/js/game/systems/underground_belt.js @@ -58,6 +58,11 @@ export class UndergroundBeltSystem extends GameSystemWithFilter { * @param {Entity} entity */ onEntityPlaced(entity) { + if (!this.root.app.settings.getAllSettings().enableTunnelSmartplace) { + // Smart-place disabled + return; + } + const undergroundComp = entity.components.UndergroundBelt; if (undergroundComp && undergroundComp.mode === enumUndergroundBeltMode.receiver) { const staticComp = entity.components.StaticMapEntity; diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 17563ab9..df2cddda 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -146,6 +146,7 @@ export const allApplicationSettings = [ ), // GAME + new BoolSetting("offerHints", categoryGame, (app, value) => {}), new EnumSetting("theme", { options: Object.keys(THEMES), @@ -197,7 +198,7 @@ export const allApplicationSettings = [ }), new BoolSetting("alwaysMultiplace", categoryGame, (app, value) => {}), - new BoolSetting("offerHints", categoryGame, (app, value) => {}), + new BoolSetting("enableTunnelSmartplace", categoryGame, (app, value) => {}), ]; export function getApplicationSettingById(id) { @@ -219,6 +220,7 @@ class SettingsStorage { this.alwaysMultiplace = false; this.offerHints = true; + this.enableTunnelSmartplace = true; /** * @type {Object.} @@ -408,7 +410,7 @@ export class ApplicationSettings extends ReadWriteProxy { } getCurrentVersion() { - return 10; + return 11; } /** @param {{settings: SettingsStorage, version: number}} data */ @@ -445,6 +447,11 @@ export class ApplicationSettings extends ReadWriteProxy { data.version = 10; } + if (data.version < 11) { + data.settings.enableTunnelSmartplace = true; + data.version = 11; + } + return ExplainedResult.good(); } } diff --git a/translations/base-en.yaml b/translations/base-en.yaml index 989278da..28fea958 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -675,6 +675,11 @@ settings: description: >- Whether to offer hints and tutorials while playing. Also hides certain UI elements onto a given level to make it easier to get into the game. + enableTunnelSmartplace: + title: Smart Tunnels + description: >- + When enabled, placing tunnels will automatically remove unnecessary belts. This also enables to drag tunnels and excess tunnels will get removed. + keybindings: title: Keybindings hint: >- diff --git a/translations/base-pl.yaml b/translations/base-pl.yaml index 9c280d13..bbf3c23a 100644 --- a/translations/base-pl.yaml +++ b/translations/base-pl.yaml @@ -159,8 +159,6 @@ mainMenu: showInfo: Wyświetl contestOver: Ten konkurs już się skończył - Dołącz do serwera Discord by nie przegapić kolejnych! - continue: Continue - newGame: New Game dialogs: buttons: