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

Add option to render info boxes compact

This commit is contained in:
tobspr
2020-06-21 20:47:37 +02:00
parent 1f136ba892
commit 47b3ed5cbf
5 changed files with 31 additions and 1 deletions

View File

@@ -200,6 +200,7 @@ export const allApplicationSettings = [
new BoolSetting("alwaysMultiplace", categoryGame, (app, value) => {}),
new BoolSetting("enableTunnelSmartplace", categoryGame, (app, value) => {}),
new BoolSetting("vignette", categoryGame, (app, value) => {}),
new BoolSetting("compactBuildingInfo", categoryGame, (app, value) => {}),
];
export function getApplicationSettingById(id) {
@@ -223,6 +224,7 @@ class SettingsStorage {
this.offerHints = true;
this.enableTunnelSmartplace = true;
this.vignette = true;
this.compactBuildingInfo = false;
/**
* @type {Object.<string, number>}
@@ -412,7 +414,7 @@ export class ApplicationSettings extends ReadWriteProxy {
}
getCurrentVersion() {
return 12;
return 13;
}
/** @param {{settings: SettingsStorage, version: number}} data */
@@ -459,6 +461,11 @@ export class ApplicationSettings extends ReadWriteProxy {
data.version = 12;
}
if (data.version < 13) {
data.settings.compactBuildingInfo = false;
data.version = 13;
}
return ExplainedResult.good();
}
}