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

Add setting to show chunk borders

This commit is contained in:
tobspr
2020-08-29 22:52:52 +02:00
parent 49ea6fc381
commit bca379ee89
10 changed files with 347 additions and 308 deletions

View File

@@ -261,6 +261,7 @@ export const allApplicationSettings = [
new BoolSetting("compactBuildingInfo", enumCategories.userInterface, (app, value) => {}),
new BoolSetting("disableCutDeleteWarnings", enumCategories.advanced, (app, value) => {}),
new BoolSetting("rotationByBuilding", enumCategories.advanced, (app, value) => {}),
new BoolSetting("displayChunkBorders", enumCategories.advanced, (app, value) => {}),
new EnumSetting("refreshRate", {
options: refreshRateOptions,
@@ -303,6 +304,7 @@ class SettingsStorage {
this.disableCutDeleteWarnings = false;
this.rotationByBuilding = true;
this.clearCursorOnDeleteWhilePlacing = true;
this.displayChunkBorders = false;
this.enableColorBlindHelper = false;
@@ -509,7 +511,7 @@ export class ApplicationSettings extends ReadWriteProxy {
}
getCurrentVersion() {
return 22;
return 23;
}
/** @param {{settings: SettingsStorage, version: number}} data */
@@ -607,6 +609,11 @@ export class ApplicationSettings extends ReadWriteProxy {
data.version = 22;
}
if (data.version < 23) {
data.settings.displayChunkBorders = false;
data.version = 23;
}
return ExplainedResult.good();
}
}