1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add setting to disable smart tunnels

This commit is contained in:
tobspr
2020-06-16 19:24:23 +02:00
parent 88fba76e3b
commit b753187cde
5 changed files with 24 additions and 5 deletions

View File

@@ -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.<string, number>}
@@ -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();
}
}