From 1c97f3f32a9dd938155e78de46a2d854e33be9f6 Mon Sep 17 00:00:00 2001 From: tobspr Date: Tue, 29 Sep 2020 18:42:29 +0200 Subject: [PATCH] Fix demo flags --- src/js/game/upgrades.js | 3 ++- src/js/platform/sound.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/game/upgrades.js b/src/js/game/upgrades.js index 14422cb2..db8997a1 100644 --- a/src/js/game/upgrades.js +++ b/src/js/game/upgrades.js @@ -1,3 +1,4 @@ +import { IS_DEMO } from "../core/config"; import { findNiceIntegerValue } from "../core/utils"; import { ShapeDefinition } from "./shape_definition"; @@ -8,7 +9,7 @@ export const blueprintShape = "CbCbCbRb:CwCwCwCw"; const fixedImprovements = [0.5, 0.5, 1, 1, 2, 1, 1]; -const numEndgameUpgrades = G_IS_DEV || G_IS_STANDALONE ? 20 - fixedImprovements.length - 1 : 0; +const numEndgameUpgrades = !IS_DEMO ? 20 - fixedImprovements.length - 1 : 0; function generateEndgameUpgrades() { return new Array(numEndgameUpgrades).fill(null).map((_, i) => ({ diff --git a/src/js/platform/sound.js b/src/js/platform/sound.js index 1fceaf3e..51dca8d4 100644 --- a/src/js/platform/sound.js +++ b/src/js/platform/sound.js @@ -6,7 +6,7 @@ import { GameRoot } from "../game/root"; import { newEmptyMap, clamp } from "../core/utils"; import { createLogger } from "../core/logging"; -import { globalConfig } from "../core/config"; +import { globalConfig, IS_DEMO } from "../core/config"; const logger = createLogger("sound"); @@ -29,7 +29,7 @@ export const SOUNDS = { }; export const MUSIC = { - theme: G_IS_STANDALONE ? "theme-full" : "theme-short", + theme: IS_DEMO ? "theme-short" : "theme-full", menu: "menu", };