1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-12 02:49:20 +00:00

remove debug settings outside IS_DEBUG

This commit is contained in:
Dimava 2020-05-29 10:30:31 +03:00
parent 7c8a32a6c8
commit 66b87a38a5

View File

@ -8,7 +8,7 @@ import { BoolSetting, EnumSetting, BaseSetting } from "./setting_types";
import { createLogger } from "../core/logging"; import { createLogger } from "../core/logging";
import { ExplainedResult } from "../core/explained_result"; import { ExplainedResult } from "../core/explained_result";
import { THEMES, THEME, applyGameTheme } from "../game/theme"; import { THEMES, THEME, applyGameTheme } from "../game/theme";
import { IS_DEMO } from "../core/config"; import { IS_DEMO, IS_DEBUG } from "../core/config";
import { T } from "../translations"; import { T } from "../translations";
import { LANGUAGES } from "../languages"; import { LANGUAGES } from "../languages";
@ -205,6 +205,7 @@ export const allApplicationSettings = [
/** @type {Array<BaseSetting>} */ /** @type {Array<BaseSetting>} */
export const allDebugSettings = []; export const allDebugSettings = [];
for (const k in globalConfig.debug) { for (const k in globalConfig.debug) {
if (!IS_DEBUG) break;
allDebugSettings.push(new BoolSetting("debug_" + k, categoryDebug, (app, value) => {if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value;})); allDebugSettings.push(new BoolSetting("debug_" + k, categoryDebug, (app, value) => {if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value;}));
} }
allApplicationSettings.push(...allDebugSettings); allApplicationSettings.push(...allDebugSettings);