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

Color blind mode

This commit is contained in:
tobspr
2020-06-22 14:32:24 +02:00
parent f204189fdb
commit 9a67115ba7
22 changed files with 518 additions and 11 deletions

View File

@@ -172,6 +172,15 @@ export const allApplicationSettings = [
(app, value) => app.sound.setMusicMuted(value)
),
new BoolSetting(
"enableColorBlindHelper",
categoryApp,
/**
* @param {Application} app
*/
(app, value) => null
),
// GAME
new BoolSetting("offerHints", categoryGame, (app, value) => {}),
@@ -269,6 +278,8 @@ class SettingsStorage {
this.compactBuildingInfo = false;
this.disableCutDeleteWarnings = false;
this.enableColorBlindHelper = false;
/**
* @type {Object.<string, number>}
*/
@@ -468,7 +479,7 @@ export class ApplicationSettings extends ReadWriteProxy {
}
getCurrentVersion() {
return 16;
return 17;
}
/** @param {{settings: SettingsStorage, version: number}} data */
@@ -536,6 +547,11 @@ export class ApplicationSettings extends ReadWriteProxy {
data.version = 16;
}
if (data.version < 17) {
data.settings.enableColorBlindHelper = false;
data.version = 17;
}
return ExplainedResult.good();
}
}