From 39198187b9fe7977298be4809c532a9fa4ff3cc5 Mon Sep 17 00:00:00 2001 From: Thomas B Date: Sat, 12 Nov 2022 17:07:49 +0100 Subject: [PATCH] Removed build and global variables for china, wegame --- gulp/build_variants.js | 49 +----------- gulp/gulpfile.js | 18 +---- gulp/html.js | 18 ----- gulp/js.js | 13 +--- gulp/standalone.js | 2 - gulp/steampipe/templates/app-darwin-demo.vdf | 14 ---- .../steampipe/templates/app-winlinux-demo.vdf | 17 ---- gulp/steampipe/templates/demo-china-linux.vdf | 12 --- .../templates/demo-china-windows.vdf | 12 --- gulp/steampipe/templates/demo-darwin.vdf | 12 --- gulp/steampipe/templates/demo-linux.vdf | 12 --- gulp/steampipe/templates/demo-windows.vdf | 12 --- .../templates/standalone-china-linux.vdf | 12 --- .../templates/standalone-china-windows.vdf | 12 --- gulp/webpack.config.js | 13 +--- gulp/webpack.production.config.js | 9 --- package.json | 2 +- src/js/application.js | 6 +- src/js/changelog.js | 19 ----- src/js/core/config.js | 3 +- src/js/core/globals.js | 2 - src/js/core/modal_dialog_forms.js | 11 --- src/js/core/restriction_manager.js | 4 - src/js/core/utils.js | 16 ---- src/js/game/hud/parts/interactive_tutorial.js | 5 +- src/js/game/hud/parts/pinned_shapes.js | 22 +++--- src/js/game/hud/parts/puzzle_dlc_logo.js | 1 - src/js/game/hud/parts/shop.js | 22 +++--- .../game/hud/parts/standalone_advantages.js | 14 +--- src/js/game/hud/parts/waypoints.js | 12 ++- src/js/game/modes/levels.js | 15 ++-- src/js/game/modes/regular.js | 15 +--- src/js/globals.d.ts | 5 -- src/js/languages.js | 4 +- src/js/mods/modloader.js | 9 --- src/js/platform/browser/game_analytics.js | 21 +---- .../electron/steam_achievement_provider.js | 8 -- src/js/platform/electron/wrapper.js | 4 - src/js/profile/application_settings.js | 2 +- src/js/states/main_menu.js | 77 ++++--------------- src/js/states/mods.js | 1 - src/js/states/preload.js | 20 +---- src/js/states/settings.js | 37 +++------ 43 files changed, 82 insertions(+), 512 deletions(-) delete mode 100644 gulp/steampipe/templates/app-darwin-demo.vdf delete mode 100644 gulp/steampipe/templates/app-winlinux-demo.vdf delete mode 100644 gulp/steampipe/templates/demo-china-linux.vdf delete mode 100644 gulp/steampipe/templates/demo-china-windows.vdf delete mode 100644 gulp/steampipe/templates/demo-darwin.vdf delete mode 100644 gulp/steampipe/templates/demo-linux.vdf delete mode 100644 gulp/steampipe/templates/demo-windows.vdf delete mode 100644 gulp/steampipe/templates/standalone-china-linux.vdf delete mode 100644 gulp/steampipe/templates/standalone-china-windows.vdf diff --git a/gulp/build_variants.js b/gulp/build_variants.js index 4f67bf9e..da8faa7c 100644 --- a/gulp/build_variants.js +++ b/gulp/build_variants.js @@ -4,71 +4,26 @@ * environment?: 'dev' | 'staging' | 'prod', * electronBaseDir?: string, * steamAppId?: number, - * executableName?: string, - * buildArgs: { - * chineseVersion?: boolean, - * wegameVersion?: boolean, - * steamDemo?: boolean, - * gogVersion?: boolean - * }}>} + * executableName?: string + * }>} */ const BUILD_VARIANTS = { "web-localhost": { standalone: false, environment: "dev", - buildArgs: {}, }, "web-shapezio-beta": { standalone: false, environment: "staging", - buildArgs: {}, }, "web-shapezio": { standalone: false, environment: "prod", - buildArgs: {}, }, "standalone-steam": { standalone: true, executableName: "shapez", steamAppId: 1318690, - buildArgs: {}, - }, - "standalone-steam-china": { - standalone: true, - steamAppId: 1318690, - buildArgs: { - chineseVersion: true, - }, - }, - "standalone-steam-demo": { - standalone: true, - steamAppId: 1930750, - buildArgs: { - steamDemo: true, - }, - }, - "standalone-steam-china-demo": { - standalone: true, - steamAppId: 1930750, - buildArgs: { - steamDemo: true, - chineseVersion: true, - }, - }, - "standalone-wegame": { - standalone: true, - electronBaseDir: "electron_wegame", - buildArgs: { - wegameVersion: true, - }, - }, - "standalone-gog": { - standalone: true, - electronBaseDir: "electron_gog", - buildArgs: { - gogVersion: true, - }, }, }; module.exports = { BUILD_VARIANTS }; diff --git a/gulp/gulpfile.js b/gulp/gulpfile.js index 04d3c9c9..c302ab11 100644 --- a/gulp/gulpfile.js +++ b/gulp/gulpfile.js @@ -294,23 +294,7 @@ gulp.task( ); gulp.task( "bundle.steam.from-windows", - gulp.series( - "utils.cleanBuildOutputFolder", - "bundle.standalone-steam.from-windows", - "bundle.standalone-steam-china.from-windows" - ) -); -gulp.task( - "bundle.steam-demo.from-darwin", - gulp.series("utils.cleanBuildOutputFolder", "bundle.standalone-steam-demo.from-darwin") -); -gulp.task( - "bundle.steam-demo.from-windows", - gulp.series( - "utils.cleanBuildOutputFolder", - "bundle.standalone-steam-demo.from-windows", - "bundle.standalone-steam-china-demo.from-windows" - ) + gulp.series("utils.cleanBuildOutputFolder", "bundle.standalone-steam.from-windows") ); // Default task (dev, localhost) diff --git a/gulp/html.js b/gulp/html.js index a32451c7..fd1eb372 100644 --- a/gulp/html.js +++ b/gulp/html.js @@ -55,24 +55,6 @@ function gulptasksHTML($, gulp, buildFolder) { } document.head.appendChild(css); - // Google analytics - if (googleAnalytics && false) { - const tagManagerScript = document.createElement("script"); - tagManagerScript.src = - "https://www.googletagmanager.com/gtag/js?id=UA-165342524-1"; - tagManagerScript.setAttribute("async", ""); - document.head.appendChild(tagManagerScript); - - const initScript = document.createElement("script"); - initScript.textContent = ` - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-165342524-1', { anonymize_ip: true }); - `; - document.head.appendChild(initScript); - } - // Do not need to preload in app or standalone if (!hasLocalFiles) { // Preload essentials diff --git a/gulp/js.js b/gulp/js.js index 085a9d74..efd8769d 100644 --- a/gulp/js.js +++ b/gulp/js.js @@ -27,7 +27,6 @@ function gulptasksJS($, gulp, buildFolder, browserSync) { .pipe( $.webpackStream( requireUncached("./webpack.config.js")({ - ...data.buildArgs, standalone: data.standalone, watch: true, }) @@ -43,13 +42,7 @@ function gulptasksJS($, gulp, buildFolder, browserSync) { gulp.task("js." + variant + ".dev", () => { return gulp .src("../src/js/main.js") - .pipe( - $.webpackStream( - requireUncached("./webpack.config.js")({ - ...data.buildArgs, - }) - ) - ) + .pipe($.webpackStream(requireUncached("./webpack.config.js")())) .pipe(gulp.dest(buildFolder)); }); @@ -61,7 +54,6 @@ function gulptasksJS($, gulp, buildFolder, browserSync) { requireUncached("./webpack.production.config.js")({ es6: false, environment: data.environment, - ...data.buildArgs, }) ) ) @@ -77,7 +69,6 @@ function gulptasksJS($, gulp, buildFolder, browserSync) { requireUncached("./webpack.production.config.js")({ es6: true, environment: data.environment, - ...data.buildArgs, }) ) ) @@ -98,7 +89,6 @@ function gulptasksJS($, gulp, buildFolder, browserSync) { .pipe( $.webpackStream( requireUncached("./webpack.config.js")({ - ...data.buildArgs, standalone: true, }) ) @@ -111,7 +101,6 @@ function gulptasksJS($, gulp, buildFolder, browserSync) { .pipe( $.webpackStream( requireUncached("./webpack.production.config.js")({ - ...data.buildArgs, environment: "prod", es6: true, standalone: true, diff --git a/gulp/standalone.js b/gulp/standalone.js index b70ef04c..5b7a3416 100644 --- a/gulp/standalone.js +++ b/gulp/standalone.js @@ -36,8 +36,6 @@ function gulptasksStandalone($, gulp) { const requiredFiles = [ path.join(electronBaseDir, "node_modules", "**", "*.*"), path.join(electronBaseDir, "node_modules", "**", ".*"), - path.join(electronBaseDir, "wegame_sdk", "**", "*.*"), - path.join(electronBaseDir, "wegame_sdk", "**", ".*"), path.join(electronBaseDir, "favicon*"), ]; return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir)); diff --git a/gulp/steampipe/templates/app-darwin-demo.vdf b/gulp/steampipe/templates/app-darwin-demo.vdf deleted file mode 100644 index 4bdb46b1..00000000 --- a/gulp/steampipe/templates/app-darwin-demo.vdf +++ /dev/null @@ -1,14 +0,0 @@ -"appbuild" -{ - "appid" "1930750" - "desc" "$BUILD_DESC$" - "buildoutput" "$TMP_DIR$" - "contentroot" "" - "setlive" "" - "preview" "0" - "local" "" - "depots" - { - "1930756" "$VDF_DIR$/demo-darwin.vdf" - } -} diff --git a/gulp/steampipe/templates/app-winlinux-demo.vdf b/gulp/steampipe/templates/app-winlinux-demo.vdf deleted file mode 100644 index b4859b8b..00000000 --- a/gulp/steampipe/templates/app-winlinux-demo.vdf +++ /dev/null @@ -1,17 +0,0 @@ -"appbuild" -{ - "appid" "1930750" - "desc" "$BUILD_DESC$" - "buildoutput" "$TMP_DIR$" - "contentroot" "" - "setlive" "" - "preview" "0" - "local" "" - "depots" - { - "1930753" "$VDF_DIR$/demo-windows.vdf" - "1930754" "$VDF_DIR$/demo-china-windows.vdf" - "1930752" "$VDF_DIR$/demo-linux.vdf" - "1930755" "$VDF_DIR$/demo-china-linux.vdf" - } -} diff --git a/gulp/steampipe/templates/demo-china-linux.vdf b/gulp/steampipe/templates/demo-china-linux.vdf deleted file mode 100644 index 2ec63419..00000000 --- a/gulp/steampipe/templates/demo-china-linux.vdf +++ /dev/null @@ -1,12 +0,0 @@ -"DepotBuildConfig" -{ - "DepotID" "1930755" - "contentroot" "$BUNDLE_DIR$\standalone-steam-china-demo\shapez-linux-x64" - "FileMapping" - { - "LocalPath" "*" - "DepotPath" "." - "recursive" "1" - } - "FileExclusion" "*.pdb" -} \ No newline at end of file diff --git a/gulp/steampipe/templates/demo-china-windows.vdf b/gulp/steampipe/templates/demo-china-windows.vdf deleted file mode 100644 index a06b4e9e..00000000 --- a/gulp/steampipe/templates/demo-china-windows.vdf +++ /dev/null @@ -1,12 +0,0 @@ -"DepotBuildConfig" -{ - "DepotID" "1930754" - "contentroot" "$BUNDLE_DIR$\standalone-steam-china-demo\shapez-win32-x64" - "FileMapping" - { - "LocalPath" "*" - "DepotPath" "." - "recursive" "1" - } - "FileExclusion" "*.pdb" -} \ No newline at end of file diff --git a/gulp/steampipe/templates/demo-darwin.vdf b/gulp/steampipe/templates/demo-darwin.vdf deleted file mode 100644 index d0e8f1e2..00000000 --- a/gulp/steampipe/templates/demo-darwin.vdf +++ /dev/null @@ -1,12 +0,0 @@ -"DepotBuildConfig" -{ - "DepotID" "1930756" - "contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-darwin-x64" - "FileMapping" - { - "LocalPath" "*" - "DepotPath" "." - "recursive" "1" - } - "FileExclusion" "*.pdb" -} \ No newline at end of file diff --git a/gulp/steampipe/templates/demo-linux.vdf b/gulp/steampipe/templates/demo-linux.vdf deleted file mode 100644 index 4f2d274f..00000000 --- a/gulp/steampipe/templates/demo-linux.vdf +++ /dev/null @@ -1,12 +0,0 @@ -"DepotBuildConfig" -{ - "DepotID" "1930752" - "contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-linux-x64" - "FileMapping" - { - "LocalPath" "*" - "DepotPath" "." - "recursive" "1" - } - "FileExclusion" "*.pdb" -} \ No newline at end of file diff --git a/gulp/steampipe/templates/demo-windows.vdf b/gulp/steampipe/templates/demo-windows.vdf deleted file mode 100644 index 1b6cdbc7..00000000 --- a/gulp/steampipe/templates/demo-windows.vdf +++ /dev/null @@ -1,12 +0,0 @@ -"DepotBuildConfig" -{ - "DepotID" "1930753" - "contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-win32-x64" - "FileMapping" - { - "LocalPath" "*" - "DepotPath" "." - "recursive" "1" - } - "FileExclusion" "*.pdb" -} \ No newline at end of file diff --git a/gulp/steampipe/templates/standalone-china-linux.vdf b/gulp/steampipe/templates/standalone-china-linux.vdf deleted file mode 100644 index 56b9fe3c..00000000 --- a/gulp/steampipe/templates/standalone-china-linux.vdf +++ /dev/null @@ -1,12 +0,0 @@ -"DepotBuildConfig" -{ - "DepotID" "1318695" - "contentroot" "$BUNDLE_DIR$\standalone-steam-china\shapez-linux-x64" - "FileMapping" - { - "LocalPath" "*" - "DepotPath" "." - "recursive" "1" - } - "FileExclusion" "*.pdb" -} \ No newline at end of file diff --git a/gulp/steampipe/templates/standalone-china-windows.vdf b/gulp/steampipe/templates/standalone-china-windows.vdf deleted file mode 100644 index 469158db..00000000 --- a/gulp/steampipe/templates/standalone-china-windows.vdf +++ /dev/null @@ -1,12 +0,0 @@ -"DepotBuildConfig" -{ - "DepotID" "1318694" - "contentroot" "$BUNDLE_DIR$\standalone-steam-china\shapez-win32-x64" - "FileMapping" - { - "LocalPath" "*" - "DepotPath" "." - "recursive" "1" - } - "FileExclusion" "*.pdb" -} \ No newline at end of file diff --git a/gulp/webpack.config.js b/gulp/webpack.config.js index d0ee4d5f..ead6dbff 100644 --- a/gulp/webpack.config.js +++ b/gulp/webpack.config.js @@ -5,14 +5,7 @@ const webpack = require("webpack"); const { getRevision, getVersion, getAllResourceImages } = require("./buildutils"); const CircularDependencyPlugin = require("circular-dependency-plugin"); -module.exports = ({ - watch = false, - standalone = false, - chineseVersion = false, - wegameVersion = false, - steamDemo = false, - gogVersion = false, -}) => { +module.exports = ({ watch = false, standalone = false }) => { return { mode: "development", devtool: "cheap-source-map", @@ -37,14 +30,10 @@ module.exports = ({ "window.assert(false, 'abstract method called of: ' + (this.name || (this.constructor && this.constructor.name)));", G_HAVE_ASSERT: "true", G_APP_ENVIRONMENT: JSON.stringify("dev"), - G_CHINA_VERSION: JSON.stringify(chineseVersion), - G_WEGAME_VERSION: JSON.stringify(wegameVersion), - G_GOG_VERSION: JSON.stringify(gogVersion), G_IS_DEV: "true", G_IS_RELEASE: "false", G_IS_BROWSER: "true", G_IS_STANDALONE: JSON.stringify(standalone), - G_IS_STEAM_DEMO: JSON.stringify(steamDemo), G_BUILD_TIME: "" + new Date().getTime(), G_BUILD_COMMIT_HASH: JSON.stringify(getRevision()), G_BUILD_VERSION: JSON.stringify(getVersion()), diff --git a/gulp/webpack.production.config.js b/gulp/webpack.production.config.js index e324d675..4589a143 100644 --- a/gulp/webpack.production.config.js +++ b/gulp/webpack.production.config.js @@ -14,11 +14,6 @@ module.exports = ({ standalone = false, isBrowser = true, - - chineseVersion = false, - wegameVersion = false, - steamDemo = false, - gogVersion = false, }) => { const globalDefs = { assert: "false && window.assert", @@ -26,12 +21,8 @@ module.exports = ({ abstract: "window.assert(false, 'abstract method called');", G_IS_DEV: "false", - G_CHINA_VERSION: JSON.stringify(chineseVersion), - G_WEGAME_VERSION: JSON.stringify(wegameVersion), - G_GOG_VERSION: JSON.stringify(gogVersion), G_IS_RELEASE: environment === "prod" ? "true" : "false", G_IS_STANDALONE: standalone ? "true" : "false", - G_IS_STEAM_DEMO: JSON.stringify(steamDemo), G_IS_BROWSER: isBrowser ? "true" : "false", G_APP_ENVIRONMENT: JSON.stringify(environment), G_HAVE_ASSERT: "false", diff --git a/package.json b/package.json index c7776007..dea83483 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "license": "MIT", "private": true, "scripts": { - "dev": "cd gulp && yarn gulp main.serveDev", + "dev": "cd gulp && yarn gulp", "devStandalone": "cd gulp && yarn gulp main.serveStandalone", "tslint": "cd src/js && tsc", "lint": "eslint src/js", diff --git a/src/js/application.js b/src/js/application.js index d31e6e3f..3942a7e6 100644 --- a/src/js/application.js +++ b/src/js/application.js @@ -153,12 +153,8 @@ export class Application { Loader.linkAppAfterBoot(this); - if (G_WEGAME_VERSION) { - this.stateMgr.moveToState("WegameSplashState"); - } - // Check for mobile - else if (IS_MOBILE) { + if (IS_MOBILE) { this.stateMgr.moveToState("MobileWarningState"); } else { this.stateMgr.moveToState("PreloadState"); diff --git a/src/js/changelog.js b/src/js/changelog.js index de7cd029..c3181a69 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -104,25 +104,6 @@ export const CHANGELOG = [ "Preparations for the Puzzle DLC, coming June 22nd!", ], }, - { - version: "1.3.1", - date: "16.04.2021", - entries: G_CHINA_VERSION - ? [ - "第13关的交付目标更改为:中国古代指南针。(感谢玩家:凯风入心 创作并提供", - "第17关的交付目标更改为:永乐通宝。(感谢玩家:金天赐 创作并提供", - "第22关的交付目标更改为:凤凰。(感谢玩家:我没得眼镜 创作并提供", - "第23关的交付目标更改为:古代车轮。(感谢玩家:我没得眼镜 创作并提供", - "第24关的交付目标更改为:大熊猫。(感谢玩家:窝囸倪现任 创作并提供", - - "修复了一些特定情况下偶尔会发生的存档损坏问题", - "修复了成就更新后有时候游戏崩溃的问题", - ] - : [ - "Fixed savegames getting corrupt in rare conditions", - "Fixed game crashing sometimes since the achievements update", - ], - }, { version: "1.3.0", date: "12.03.2020", diff --git a/src/js/core/config.js b/src/js/core/config.js index d5a04832..6cc2943e 100644 --- a/src/js/core/config.js +++ b/src/js/core/config.js @@ -41,8 +41,7 @@ export const THIRDPARTY_URLS = { */ export function openStandaloneLink(app, campaign) { const discount = globalConfig.currentDiscount > 0 ? "_discount" + globalConfig.currentDiscount : ""; - const steamSuffix = G_IS_STEAM_DEMO ? "_steamdemo" : ""; - const event = campaign + discount + steamSuffix; + const event = campaign + discount; app.platformWrapper.openExternalLink(THIRDPARTY_URLS.standaloneCampaignLink.replace("$campaign", event)); app.gameAnalytics.noteMinor("g.stdlink." + event); } diff --git a/src/js/core/globals.js b/src/js/core/globals.js index 55238e85..71871b17 100644 --- a/src/js/core/globals.js +++ b/src/js/core/globals.js @@ -19,8 +19,6 @@ export function setGlobalApp(app) { export const BUILD_OPTIONS = { HAVE_ASSERT: G_HAVE_ASSERT, APP_ENVIRONMENT: G_APP_ENVIRONMENT, - CHINA_VERSION: G_CHINA_VERSION, - WEGAME_VERSION: G_WEGAME_VERSION, IS_DEV: G_IS_DEV, IS_RELEASE: G_IS_RELEASE, IS_BROWSER: G_IS_BROWSER, diff --git a/src/js/core/modal_dialog_forms.js b/src/js/core/modal_dialog_forms.js index a4e617f8..355fad09 100644 --- a/src/js/core/modal_dialog_forms.js +++ b/src/js/core/modal_dialog_forms.js @@ -107,17 +107,6 @@ export class FormElementInput extends FormElement { updateErrorState() { this.element.classList.toggle("errored", !this.isValid()); - - // profanity filter - if (G_WEGAME_VERSION) { - const value = String(this.element.value); - - ipcRenderer.invoke("profanity-check", value).then(newValue => { - if (value !== newValue && this.element) { - this.element.value = newValue; - } - }); - } } isValid() { diff --git a/src/js/core/restriction_manager.js b/src/js/core/restriction_manager.js index 33783b58..5032f34a 100644 --- a/src/js/core/restriction_manager.js +++ b/src/js/core/restriction_manager.js @@ -56,10 +56,6 @@ export class RestrictionManager extends ReadWriteProxy { * @returns {boolean} */ isLimitedVersion() { - if (G_IS_STEAM_DEMO) { - return true; - } - if (G_IS_STANDALONE) { // Standalone is never limited return false; diff --git a/src/js/core/utils.js b/src/js/core/utils.js index 9e2126b1..b68e5380 100644 --- a/src/js/core/utils.js +++ b/src/js/core/utils.js @@ -694,10 +694,6 @@ const romanLiteralsCache = ["0"]; * @returns {string} */ export function getRomanNumber(number) { - if (G_WEGAME_VERSION) { - return String(number); - } - number = Math.max(0, Math.round(number)); if (romanLiteralsCache[number]) { return romanLiteralsCache[number]; @@ -753,18 +749,6 @@ export function getRomanNumber(number) { * Returns the appropriate logo sprite path */ export function getLogoSprite() { - if (G_WEGAME_VERSION) { - return "logo_wegame.png"; - } - - if (G_IS_STEAM_DEMO) { - return "logo_demo.png"; - } - - if (G_CHINA_VERSION) { - return "logo_cn.png"; - } - if (G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED) { return "logo.png"; } diff --git a/src/js/game/hud/parts/interactive_tutorial.js b/src/js/game/hud/parts/interactive_tutorial.js index 7548ce43..734d3c7f 100644 --- a/src/js/game/hud/parts/interactive_tutorial.js +++ b/src/js/game/hud/parts/interactive_tutorial.js @@ -188,12 +188,9 @@ export class HUDInteractiveTutorial extends BaseHUDPart { onHintChanged(hintId) { this.elementDescription.innerHTML = T.ingame.interactiveTutorial.hints[hintId]; document.documentElement.setAttribute("data-tutorial-step", hintId); - const folder = G_WEGAME_VERSION - ? "interactive_tutorial.cn.noinline" - : "interactive_tutorial.noinline"; this.elementGif.style.backgroundImage = - "url('" + cachebust("res/ui/" + folder + "/" + hintId + ".gif") + "')"; + "url('" + cachebust("res/ui/interactive_tutorial.noinline/" + hintId + ".gif") + "')"; this.element.classList.toggle("animEven"); this.element.classList.toggle("animOdd"); if (hintId) { diff --git a/src/js/game/hud/parts/pinned_shapes.js b/src/js/game/hud/parts/pinned_shapes.js index c5bb9a82..99d846bd 100644 --- a/src/js/game/hud/parts/pinned_shapes.js +++ b/src/js/game/hud/parts/pinned_shapes.js @@ -233,19 +233,15 @@ export class HUDPinnedShapes extends BaseHUDPart { // Show small info icon let infoDetector; - if (!G_WEGAME_VERSION) { - const infoButton = document.createElement("button"); - infoButton.classList.add("infoButton"); - element.appendChild(infoButton); - infoDetector = new ClickDetector(infoButton, { - consumeEvents: true, - preventDefault: true, - targetOnly: true, - }); - infoDetector.click.add(() => - this.root.hud.signals.viewShapeDetailsRequested.dispatch(definition) - ); - } + const infoButton = document.createElement("button"); + infoButton.classList.add("infoButton"); + element.appendChild(infoButton); + infoDetector = new ClickDetector(infoButton, { + consumeEvents: true, + preventDefault: true, + targetOnly: true, + }); + infoDetector.click.add(() => this.root.hud.signals.viewShapeDetailsRequested.dispatch(definition)); const amountLabel = makeDiv(element, null, ["amountLabel"], ""); diff --git a/src/js/game/hud/parts/puzzle_dlc_logo.js b/src/js/game/hud/parts/puzzle_dlc_logo.js index 69519c0d..ec50808a 100644 --- a/src/js/game/hud/parts/puzzle_dlc_logo.js +++ b/src/js/game/hud/parts/puzzle_dlc_logo.js @@ -4,7 +4,6 @@ import { BaseHUDPart } from "../base_hud_part"; export class HUDPuzzleDLCLogo extends BaseHUDPart { createElements(parent) { this.element = makeDiv(parent, "ingame_HUD_PuzzleDLCLogo"); - this.element.classList.toggle("china", G_CHINA_VERSION || G_WEGAME_VERSION); parent.appendChild(this.element); } diff --git a/src/js/game/hud/parts/shop.js b/src/js/game/hud/parts/shop.js index fa92b743..c41d51b5 100644 --- a/src/js/game/hud/parts/shop.js +++ b/src/js/game/hud/parts/shop.js @@ -123,18 +123,16 @@ export class HUDShop extends BaseHUDPart { container.appendChild(pinButton); let infoDetector; - if (!G_WEGAME_VERSION) { - const viewInfoButton = document.createElement("button"); - viewInfoButton.classList.add("showInfo"); - container.appendChild(viewInfoButton); - infoDetector = new ClickDetector(viewInfoButton, { - consumeEvents: true, - preventDefault: true, - }); - infoDetector.click.add(() => - this.root.hud.signals.viewShapeDetailsRequested.dispatch(shapeDef) - ); - } + const viewInfoButton = document.createElement("button"); + viewInfoButton.classList.add("showInfo"); + container.appendChild(viewInfoButton); + infoDetector = new ClickDetector(viewInfoButton, { + consumeEvents: true, + preventDefault: true, + }); + infoDetector.click.add(() => + this.root.hud.signals.viewShapeDetailsRequested.dispatch(shapeDef) + ); const currentGoalShape = this.root.hubGoals.currentGoal.definition.getHash(); if (shape === currentGoalShape) { diff --git a/src/js/game/hud/parts/standalone_advantages.js b/src/js/game/hud/parts/standalone_advantages.js index 81eccb29..392e2908 100644 --- a/src/js/game/hud/parts/standalone_advantages.js +++ b/src/js/game/hud/parts/standalone_advantages.js @@ -49,7 +49,7 @@ export class HUDStandaloneAdvantages extends BaseHUDPart { : "" } - @@ -99,15 +99,9 @@ export class HUDStandaloneAdvantages extends BaseHUDPart { this.inputReciever = new InputReceiver("standalone-advantages"); this.close(); - // On standalone, show popup instant - but don't do so on web, since it increases - // the amount of clicks to get into the game - if (G_IS_STEAM_DEMO) { - // show instant - this.lastShown = -1e10; - } else { - // wait for next interval - this.lastShown = 0; - } + // On standalone, show popup instant + // wait for next interval + this.lastShown = 0; this.root.signals.gameRestored.add(() => { if ( diff --git a/src/js/game/hud/parts/waypoints.js b/src/js/game/hud/parts/waypoints.js index 5aac95dc..c70d5e87 100644 --- a/src/js/game/hud/parts/waypoints.js +++ b/src/js/game/hud/parts/waypoints.js @@ -45,7 +45,7 @@ export class HUDWaypoints extends BaseHUDPart { */ createElements(parent) { // Create the helper box on the lower right when zooming out - if (this.root.app.settings.getAllSettings().offerHints && !G_WEGAME_VERSION) { + if (this.root.app.settings.getAllSettings().offerHints) { this.hintElement = makeDiv( parent, "ingame_HUD_Waypoints_Hint", @@ -121,12 +121,10 @@ export class HUDWaypoints extends BaseHUDPart { } // Catch mouse and key events - if (!G_WEGAME_VERSION) { - this.root.camera.downPreHandler.add(this.onMouseDown, this); - this.root.keyMapper - .getBinding(KEYMAPPINGS.navigation.createMarker) - .add(() => this.requestSaveMarker({})); - } + this.root.camera.downPreHandler.add(this.onMouseDown, this); + this.root.keyMapper + .getBinding(KEYMAPPINGS.navigation.createMarker) + .add(() => this.requestSaveMarker({})); /** * Stores at how much opacity the markers should be rendered on the map. diff --git a/src/js/game/modes/levels.js b/src/js/game/modes/levels.js index d6533448..e4e8068b 100644 --- a/src/js/game/modes/levels.js +++ b/src/js/game/modes/levels.js @@ -5,7 +5,6 @@ import { WEB_STEAM_SSO_AUTHENTICATED } from "../../core/steam_sso"; import { enumHubGoalRewards } from "../tutorial_goals"; export const finalGameShape = "RuCw--Cw:----Ru--"; -const chinaShapes = G_WEGAME_VERSION || G_CHINA_VERSION; //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// @@ -255,7 +254,7 @@ const STANDALONE_LEVELS = () => [ // 13 // Tunnel Tier 2 { - shape: chinaShapes ? "CuCuCuCu:CwCwCwCw:Sb--Sr--" : "RpRpRpRp:CwCwCwCw", // painting t3 + shape: "RpRpRpRp:CwCwCwCw", // painting t3 required: 3800, reward: enumHubGoalRewards.reward_underground_belt_tier_2, }, @@ -288,7 +287,7 @@ const STANDALONE_LEVELS = () => [ // 17 // Double painter { - shape: chinaShapes ? "CyCyCyCy:CyCyCyCy:RyRyRyRy:RuRuRuRu" : "CbRbRbCb:CwCwCwCw:WbWbWbWb", // miner t4 (two variants) + shape: "CbRbRbCb:CwCwCwCw:WbWbWbWb", // miner t4 (two variants) required: 20000, reward: enumHubGoalRewards.reward_painter_double, }, @@ -328,7 +327,7 @@ const STANDALONE_LEVELS = () => [ // 22 // Constant signal { - shape: chinaShapes ? "RrSySrSy:RyCrCwCr:CyCyRyCy" : "Cg----Cr:Cw----Cw:Sy------:Cy----Cy", + shape: "Cg----Cr:Cw----Cw:Sy------:Cy----Cy", required: 25000, reward: enumHubGoalRewards.reward_constant_signal, }, @@ -336,14 +335,14 @@ const STANDALONE_LEVELS = () => [ // 23 // Display { - shape: chinaShapes ? "CrCrCrCr:CwCwCwCw:WwWwWwWw:CrCrCrCr" : "CcSyCcSy:SyCcSyCc:CcSyCcSy", + shape: "CcSyCcSy:SyCcSyCc:CcSyCcSy", required: 25000, reward: enumHubGoalRewards.reward_display, }, // 24 Logic gates { - shape: chinaShapes ? "Su----Su:RwRwRwRw:Cu----Cu:CwCwCwCw" : "CcRcCcRc:RwCwRwCw:Sr--Sw--:CyCyCyCy", + shape: "CcRcCcRc:RwCwRwCw:Sr--Sw--:CyCyCyCy", required: 25000, reward: enumHubGoalRewards.reward_logic_gates, }, @@ -367,9 +366,7 @@ const STANDALONE_LEVELS = () => [ * Generates the level definitions */ export function generateLevelsForVariant(app) { - if (G_IS_STEAM_DEMO) { - return STEAM_DEMO_LEVELS(); - } else if (G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED) { + if (G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED) { return STANDALONE_LEVELS(); } return WEB_DEMO_LEVELS(app); diff --git a/src/js/game/modes/regular.js b/src/js/game/modes/regular.js index 8d5d6633..d4e549e7 100644 --- a/src/js/game/modes/regular.js +++ b/src/js/game/modes/regular.js @@ -65,8 +65,6 @@ const preparementShape = "CpRpCp--:SwSwSwSw"; // Tiers need % of the previous tier as requirement too const tierGrowth = 2.5; -const chinaShapes = G_WEGAME_VERSION || G_CHINA_VERSION; - const upgradesCache = {}; /** @@ -151,9 +149,7 @@ function generateUpgrades(limitedVersion = false, difficulty = 1) { { required: [ { - shape: chinaShapes - ? "CyCyCyCy:CyCyCyCy:RyRyRyRy:RuRuRuRu" - : "CbRbRbCb:CwCwCwCw:WbWbWbWb", + shape: "CbRbRbCb:CwCwCwCw:WbWbWbWb", amount: 50000, }, ], @@ -212,7 +208,7 @@ function generateUpgrades(limitedVersion = false, difficulty = 1) { { required: [ { - shape: chinaShapes ? "CuCuCuCu:CwCwCwCw:Sb--Sr--" : "RpRpRpRp:CwCwCwCw", + shape: "RpRpRpRp:CwCwCwCw", amount: 6500, }, ], @@ -362,9 +358,7 @@ export class RegularGameMode extends GameMode { } if (this.root.app.settings.getAllSettings().offerHints) { - if (!G_WEGAME_VERSION) { - this.additionalHudParts.tutorialHints = HUDPartTutorialHints; - } + this.additionalHudParts.tutorialHints = HUDPartTutorialHints; this.additionalHudParts.interactiveTutorial = HUDInteractiveTutorial; } @@ -379,9 +373,6 @@ export class RegularGameMode extends GameMode { get difficultyMultiplicator() { if (G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED) { - if (G_IS_STEAM_DEMO) { - return 0.75; - } return 1; } return 0.5; diff --git a/src/js/globals.d.ts b/src/js/globals.d.ts index 37eb4c3f..0878d9b9 100644 --- a/src/js/globals.d.ts +++ b/src/js/globals.d.ts @@ -10,7 +10,6 @@ declare const G_APP_ENVIRONMENT: string; declare const G_HAVE_ASSERT: boolean; declare const G_BUILD_TIME: number; declare const G_IS_STANDALONE: boolean; -declare const G_IS_STEAM_DEMO: boolean; declare const G_IS_BROWSER: boolean; declare const G_BUILD_COMMIT_HASH: string; @@ -18,10 +17,6 @@ declare const G_BUILD_VERSION: string; declare const G_ALL_UI_IMAGES: Array; declare const G_IS_RELEASE: boolean; -declare const G_CHINA_VERSION: boolean; -declare const G_WEGAME_VERSION: boolean; -declare const G_GOG_VERSION: boolean; - declare const shapez: any; declare const ipcRenderer: any; diff --git a/src/js/languages.js b/src/js/languages.js index 6e7bedf6..b91ecd63 100644 --- a/src/js/languages.js +++ b/src/js/languages.js @@ -12,9 +12,7 @@ export const LANGUAGES = { "zh-CN": { // simplified chinese name: "简体中文", - data: G_WEGAME_VERSION - ? require("./built-temp/base-zh-CN-ISBN.json") - : require("./built-temp/base-zh-CN.json"), + data: require("./built-temp/base-zh-CN.json"), code: "zh", region: "CN", }, diff --git a/src/js/mods/modloader.js b/src/js/mods/modloader.js index 1644b169..cc4e5037 100644 --- a/src/js/mods/modloader.js +++ b/src/js/mods/modloader.js @@ -105,10 +105,6 @@ export class ModLoader { } exposeExports() { - if (G_IS_STEAM_DEMO) { - return; - } - if (G_IS_DEV || G_IS_STANDALONE) { let exports = {}; const modules = require.context("../", true, /\.js$/); @@ -140,11 +136,6 @@ export class ModLoader { } async initMods() { - if (G_IS_STEAM_DEMO) { - this.initialized = true; - return; - } - if (!G_IS_STANDALONE && !G_IS_DEV) { this.initialized = true; return; diff --git a/src/js/platform/browser/game_analytics.js b/src/js/platform/browser/game_analytics.js index 894f877a..f13b8d03 100644 --- a/src/js/platform/browser/game_analytics.js +++ b/src/js/platform/browser/game_analytics.js @@ -17,7 +17,7 @@ const logger = createLogger("game_analytics"); const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.shapez.io"; // Be sure to increment the ID whenever it changes -const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin"; +const analyticsLocalFile = "shapez_token_123.bin"; const CURRENT_ABT = "abt_bsl2"; const CURRENT_ABT_COUNT = 1; @@ -33,10 +33,6 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface { return "dev"; } - if (G_IS_STEAM_DEMO) { - return "steam-demo"; - } - if (G_IS_STANDALONE) { return "steam"; } @@ -114,10 +110,6 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface { initialize() { this.syncKey = null; - if (G_WEGAME_VERSION) { - return; - } - window.setAbt = abt => { this.app.storage.writeFileAsync("shapez_" + CURRENT_ABT + ".bin", String(abt)); window.location.reload(); @@ -158,7 +150,7 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface { let authTicket = Promise.resolve(undefined); - if (G_IS_STANDALONE && !G_IS_STEAM_DEMO) { + if (G_IS_STANDALONE) { logger.log("Will retrieve auth ticket"); authTicket = ipcRenderer.invoke("steam:get-ticket"); } @@ -173,7 +165,6 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface { environment: this.environment, standalone: G_IS_STANDALONE && - !G_IS_STEAM_DEMO && this.app.achievementProvider instanceof SteamAchievementProvider, commit: G_BUILD_COMMIT_HASH, ticket, @@ -221,10 +212,6 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface { * @returns {Promise} */ sendToApi(endpoint, data) { - if (G_WEGAME_VERSION) { - return Promise.resolve(); - } - return new Promise((resolve, reject) => { const timeout = setTimeout(() => reject("Request to " + endpoint + " timed out"), 20000); @@ -263,10 +250,6 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface { * @param {string} value */ sendGameEvent(category, value) { - if (G_WEGAME_VERSION) { - return; - } - if (G_IS_DEV) { return; } diff --git a/src/js/platform/electron/steam_achievement_provider.js b/src/js/platform/electron/steam_achievement_provider.js index 638cdbc5..291bd926 100644 --- a/src/js/platform/electron/steam_achievement_provider.js +++ b/src/js/platform/electron/steam_achievement_provider.js @@ -104,10 +104,6 @@ export class SteamAchievementProvider extends AchievementProviderInterface { return Promise.resolve(); } - if (G_WEGAME_VERSION) { - return Promise.resolve(); - } - return ipcRenderer.invoke("steam:is-initialized").then(initialized => { this.initialized = initialized; @@ -126,10 +122,6 @@ export class SteamAchievementProvider extends AchievementProviderInterface { activate(key) { let promise; - if (G_WEGAME_VERSION) { - return Promise.resolve(); - } - if (!this.initialized) { promise = Promise.resolve(); } else { diff --git a/src/js/platform/electron/wrapper.js b/src/js/platform/electron/wrapper.js index 65451395..64cc8253 100644 --- a/src/js/platform/electron/wrapper.js +++ b/src/js/platform/electron/wrapper.js @@ -70,10 +70,6 @@ export class PlatformWrapperImplElectron extends PlatformWrapperImplBrowser { } initializeDlcStatus() { - if (G_WEGAME_VERSION) { - return Promise.resolve(); - } - logger.log("Checking DLC ownership ..."); // @todo: Don't hardcode the app id return ipcRenderer.invoke("steam:check-app-ownership", 1625400).then( diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 5fb4a156..00f9ba0e 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -140,7 +140,7 @@ function initializeSettings() { options: Object.keys(LANGUAGES), valueGetter: key => key, textGetter: key => LANGUAGES[key].name, - category: G_CHINA_VERSION || G_WEGAME_VERSION ? null : enumCategories.general, + category: enumCategories.general, restartRequired: true, changeCb: (app, id) => null, magicValue: "auto-detect", diff --git a/src/js/states/main_menu.js b/src/js/states/main_menu.js index 1987d0a2..aa162457 100644 --- a/src/js/states/main_menu.js +++ b/src/js/states/main_menu.js @@ -39,43 +39,25 @@ export class MainMenuState extends GameState { } getInnerHTML() { - const showLanguageIcon = !G_CHINA_VERSION && !G_WEGAME_VERSION; const showExitAppButton = G_IS_STANDALONE; - const showPuzzleDLC = - !G_WEGAME_VERSION && - (G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED) && - !G_IS_STEAM_DEMO && - !G_GOG_VERSION; - const showWegameFooter = G_WEGAME_VERSION; + const showPuzzleDLC = G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED; const hasMods = MODS.anyModsActive(); - const hasSteamBridge = !G_GOG_VERSION && !G_IS_STEAM_DEMO; let showExternalLinks = true; - if (G_IS_STANDALONE) { - if (G_WEGAME_VERSION || G_CHINA_VERSION) { - showExternalLinks = false; - } - } else { + if (!G_IS_STANDALONE) { const wrapper = /** @type {PlatformWrapperImplBrowser} */ (this.app.platformWrapper); if (!wrapper.embedProvider.externalLinks) { showExternalLinks = false; } } - let showDiscordLink = showExternalLinks; - if (G_CHINA_VERSION) { - showDiscordLink = true; - } - const showDemoAdvertisement = - (showExternalLinks || G_CHINA_VERSION) && - this.app.restrictionMgr.getIsStandaloneMarketingActive(); + showExternalLinks && this.app.restrictionMgr.getIsStandaloneMarketingActive(); const ownsPuzzleDLC = WEB_STEAM_SSO_AUTHENTICATED || (G_IS_STANDALONE && - !G_IS_STEAM_DEMO && /** @type { PlatformWrapperImplElectron}*/ (this.app.platformWrapper).dlcs.puzzle); const showShapez2 = showExternalLinks && MODS.mods.length === 0; @@ -110,17 +92,12 @@ export class MainMenuState extends GameState { } Play shapez on Steam - ${!G_IS_STEAM_DEMO ? `
` : ""} - +
`; return `
- ${ - showLanguageIcon - ? `` - : "" - } + ${showExitAppButton ? `` : ""} @@ -144,7 +121,7 @@ export class MainMenuState extends GameState {
${ - hasSteamBridge && (G_IS_STANDALONE || !WEB_STEAM_SSO_AUTHENTICATED) + G_IS_STANDALONE || !WEB_STEAM_SSO_AUTHENTICATED ? `
${ G_IS_STANDALONE @@ -158,7 +135,7 @@ export class MainMenuState extends GameState { : "" } ${ - hasSteamBridge && WEB_STEAM_SSO_AUTHENTICATED + WEB_STEAM_SSO_AUTHENTICATED ? `
${T.mainMenu.playingFullVersion} @@ -252,27 +229,11 @@ export class MainMenuState extends GameState {
- ${ - showWegameFooter - ? ` - - ` - : ` - - - ` - } `; } @@ -549,6 +507,7 @@ export class MainMenuState extends GameState { } fetchPlayerCount() { + /** @type {HTMLDivElement} */ const element = this.htmlElement.querySelector(".onlinePlayerCount"); if (!element) { return; @@ -715,13 +674,11 @@ export class MainMenuState extends GameState { downloadButton.setAttribute("aria-label", "Download"); elem.appendChild(downloadButton); - if (!G_WEGAME_VERSION) { - const renameButton = document.createElement("button"); - renameButton.classList.add("styledButton", "renameGame"); - renameButton.setAttribute("aria-label", "Rename Savegame"); - name.appendChild(renameButton); - this.trackClicks(renameButton, () => this.requestRenameSavegame(games[i])); - } + const renameButton = document.createElement("button"); + renameButton.classList.add("styledButton", "renameGame"); + renameButton.setAttribute("aria-label", "Rename Savegame"); + name.appendChild(renameButton); + this.trackClicks(renameButton, () => this.requestRenameSavegame(games[i])); const resumeButton = document.createElement("button"); resumeButton.classList.add("styledButton", "resumeGame"); diff --git a/src/js/states/mods.js b/src/js/states/mods.js index 07e47bb4..7463b5d1 100644 --- a/src/js/states/mods.js +++ b/src/js/states/mods.js @@ -16,7 +16,6 @@ export class ModsState extends TextualGameState { get modsSupported() { return ( !WEB_STEAM_SSO_AUTHENTICATED && - !G_IS_STEAM_DEMO && (G_IS_STANDALONE || (G_IS_DEV && !window.location.href.includes("demo"))) ); } diff --git a/src/js/states/preload.js b/src/js/states/preload.js index 9a4b1075..ed742a57 100644 --- a/src/js/states/preload.js +++ b/src/js/states/preload.js @@ -40,7 +40,9 @@ export class PreloadState extends GameState { this.lastHintShown = -1000; this.nextHintDuration = 0; + /** @type {HTMLElement} */ this.statusText = this.htmlElement.querySelector("#ll_preload_status"); + /** @type {HTMLElement} */ this.progressElement = this.htmlElement.querySelector("#ll_progressbar span"); this.startLoading(); @@ -63,7 +65,7 @@ export class PreloadState extends GameState { } async sendBeacon() { - if (G_IS_STANDALONE && !G_IS_STEAM_DEMO) { + if (G_IS_STANDALONE) { return; } if (queryParamOptions.campaign) { @@ -158,10 +160,6 @@ export class PreloadState extends GameState { .then(() => this.setStatus("Initializing language", 25)) .then(() => { - if (G_CHINA_VERSION || G_WEGAME_VERSION) { - return this.app.settings.updateLanguage("zh-CN"); - } - if (this.app.settings.getLanguage() === "auto-detect") { const language = autoDetectLanguageId(); logger.log("Setting language to", language); @@ -222,11 +220,7 @@ export class PreloadState extends GameState { return; } - if (G_CHINA_VERSION || G_WEGAME_VERSION) { - return; - } - - if (G_IS_STEAM_DEMO || !G_IS_STANDALONE) { + if (!G_IS_STANDALONE) { return; } @@ -289,9 +283,6 @@ export class PreloadState extends GameState { } update() { - if (G_CHINA_VERSION || G_WEGAME_VERSION) { - return; - } const now = performance.now(); if (now - this.lastHintShown > this.nextHintDuration) { this.lastHintShown = now; @@ -323,9 +314,6 @@ export class PreloadState extends GameState { setStatus(text, progress) { logger.log("✅ " + text); - if (G_CHINA_VERSION || G_WEGAME_VERSION) { - return Promise.resolve(); - } this.currentStatus = text; this.statusText.innerText = text; this.progressElement.style.width = 80 + (progress / 100) * 20 + "%"; diff --git a/src/js/states/settings.js b/src/js/states/settings.js index 0927fbf9..a7db171d 100644 --- a/src/js/states/settings.js +++ b/src/js/states/settings.js @@ -30,29 +30,16 @@ export class SettingsState extends TextualGameState { : "" } - ${ - G_WEGAME_VERSION - ? "" - : ` - ` - } + -
- - ${ - G_CHINA_VERSION || G_WEGAME_VERSION - ? "" - : ` +
- -` - }
- ${G_WEGAME_VERSION ? "" : `
${T.global.loading} ...
`} +
${T.global.loading} ...
@@ -122,14 +109,12 @@ export class SettingsState extends TextualGameState { onEnter(payload) { this.renderBuildText(); - if (!G_CHINA_VERSION && !G_WEGAME_VERSION) { - this.trackClicks(this.htmlElement.querySelector(".about"), this.onAboutClicked, { - preventDefault: false, - }); - this.trackClicks(this.htmlElement.querySelector(".privacy"), this.onPrivacyClicked, { - preventDefault: false, - }); - } + this.trackClicks(this.htmlElement.querySelector(".about"), this.onAboutClicked, { + preventDefault: false, + }); + this.trackClicks(this.htmlElement.querySelector(".privacy"), this.onPrivacyClicked, { + preventDefault: false, + }); const keybindingsButton = this.htmlElement.querySelector(".editKeybindings");