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

Add setting to disable vignette

This commit is contained in:
tobspr
2020-06-17 13:58:59 +02:00
parent 26949d5e3d
commit 317b7d72ff
6 changed files with 22 additions and 5 deletions

View File

@@ -6,7 +6,8 @@ export const CHANGELOG = [
"You can now place straight belts (and tunnels) by holding SHIFT! (For you, @giantwaffle ❤️)",
"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 ",
"Added setting to disable vignette",
"Update translations",
],
},
{

View File

@@ -58,7 +58,6 @@ export class GameHUD {
shop: new HUDShop(this.root),
statistics: new HUDStatistics(this.root),
waypoints: new HUDWaypoints(this.root),
vignetteOverlay: new HUDVignetteOverlay(this.root),
// Must always exist
pinnedShapes: new HUDPinnedShapes(this.root),
@@ -90,11 +89,16 @@ export class GameHUD {
if (IS_DEMO) {
this.parts.watermark = new HUDWatermark(this.root);
}
if (this.root.app.settings.getAllSettings().offerHints) {
this.parts.tutorialHints = new HUDPartTutorialHints(this.root);
this.parts.interactiveTutorial = new HUDInteractiveTutorial(this.root);
}
if (this.root.app.settings.getAllSettings().vignette) {
this.parts.vignetteOverlay = new HUDVignetteOverlay(this.root);
}
const frag = document.createDocumentFragment();
for (const key in this.parts) {
this.parts[key].createElements(frag);

View File

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