From a2ee16589f0eb42a6ad12c49c191e94731cbd56b Mon Sep 17 00:00:00 2001 From: tobspr Date: Sun, 7 Jun 2020 12:56:02 +0200 Subject: [PATCH] Switch to steam --- gulp/webpack.production.config.js | 2 +- src/css/ingame_hud/watermark.scss | 2 +- src/css/states/main_menu.scss | 4 ++-- src/css/states/mobile_warning.scss | 2 +- src/js/changelog.js | 9 +++++++++ src/js/core/config.js | 9 ++++----- src/js/game/hud/parts/watermark.js | 2 +- src/js/game/hud/parts/waypoints.js | 10 +++++----- src/js/states/main_menu.js | 24 ++++++++++++++++++------ src/js/states/mobile_warning.js | 8 ++++---- translations/base-en.yaml | 5 ++++- version | 2 +- 12 files changed, 51 insertions(+), 28 deletions(-) diff --git a/gulp/webpack.production.config.js b/gulp/webpack.production.config.js index 14c6598a..312923f0 100644 --- a/gulp/webpack.production.config.js +++ b/gulp/webpack.production.config.js @@ -237,7 +237,7 @@ module.exports = ({ pattern: /globalConfig\.beltSpeedItemsPerSecond/g, replacement: () => "2.0", }, - { pattern: /globalConfig\.itemSpacingOnBelts/g, replacement: () => "0.8" }, + { pattern: /globalConfig\.itemSpacingOnBelts/g, replacement: () => "0.63" }, { pattern: /globalConfig\.debug/g, replacement: () => "''" }, ], }), diff --git a/src/css/ingame_hud/watermark.scss b/src/css/ingame_hud/watermark.scss index 4d0e83a2..d14a7fc8 100644 --- a/src/css/ingame_hud/watermark.scss +++ b/src/css/ingame_hud/watermark.scss @@ -1,6 +1,6 @@ #ingame_HUD_Watermark { position: absolute; - background: uiResource("get_on_itch_io.svg") center center / contain no-repeat; + background: uiResource("get_on_steam.png") center center / contain no-repeat; @include S(width, 110px); @include S(height, 40px); @include S(top, 10px); diff --git a/src/css/states/main_menu.scss b/src/css/states/main_menu.scss index 41199b95..6466500c 100644 --- a/src/css/states/main_menu.scss +++ b/src/css/states/main_menu.scss @@ -103,9 +103,9 @@ .steamLink { width: 100%; - @include S(height, 50px); + @include S(height, 40px); - background: uiResource("get_on_itch_io.svg") center center / contain no-repeat; + background: uiResource("get_on_steam.png") center center / contain no-repeat; overflow: hidden; display: block; text-indent: -999em; diff --git a/src/css/states/mobile_warning.scss b/src/css/states/mobile_warning.scss index 2e68b56a..6dc84e3c 100644 --- a/src/css/states/mobile_warning.scss +++ b/src/css/states/mobile_warning.scss @@ -30,7 +30,7 @@ width: 200px; height: 80px; min-height: 40px; - background: uiResource("get_on_itch_io.svg") center center / contain no-repeat; + background: uiResource("get_on_steam.png") center center / contain no-repeat; overflow: hidden; display: block; text-indent: -999em; diff --git a/src/js/changelog.js b/src/js/changelog.js index 00c6b599..bbf9cb74 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -1,4 +1,13 @@ export const CHANGELOG = [ + { + version: "1.1.8", + date: "07.06.2020", + entries: [ + "You can now purchase the standalone on steam! View steam page", + "Added ability to create markers in the demo, but only two.", + "Contest #01 has ended! I'll now work through the entries, select the 5 I like most and present them to the community to vote for!", + ], + }, { version: "1.1.7", date: "04.06.2020", diff --git a/src/js/core/config.js b/src/js/core/config.js index 2d70fd18..540bccfd 100644 --- a/src/js/core/config.js +++ b/src/js/core/config.js @@ -15,8 +15,7 @@ export const THIRDPARTY_URLS = { discord: "https://discord.gg/HN7EVzV", github: "https://github.com/tobspr/shapez.io", - // standaloneStorePage: "https://steam.shapez.io", - standaloneStorePage: "https://tobspr.itch.io/shapez.io", + standaloneStorePage: "https://store.steampowered.com/app/1318690/shapezio/", }; export const globalConfig = { @@ -45,8 +44,8 @@ export const globalConfig = { // Belt speeds // NOTICE: Update webpack.production.config too! - beltSpeedItemsPerSecond: 1, - itemSpacingOnBelts: 0.63, + beltSpeedItemsPerSecond: 2, + itemSpacingOnBelts: 0.8, minerSpeedItemsPerSecond: 0, // COMPUTED undergroundBeltMaxTilesByTier: [5, 8], @@ -83,7 +82,7 @@ export const globalConfig = { debug: { /* dev:start */ - // fastGameEnter: true, + fastGameEnter: true, // noArtificialDelays: true, // disableSavegameWrite: true, // showEntityBounds: true, diff --git a/src/js/game/hud/parts/watermark.js b/src/js/game/hud/parts/watermark.js index 94df6257..0b5b85bc 100644 --- a/src/js/game/hud/parts/watermark.js +++ b/src/js/game/hud/parts/watermark.js @@ -13,7 +13,7 @@ export class HUDWatermark extends BaseHUDPart { } onWatermarkClick() { - this.root.app.analytics.trackUiClick("watermark_click"); + this.root.app.analytics.trackUiClick("watermark_click_2"); this.root.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.standaloneStorePage); } diff --git a/src/js/game/hud/parts/waypoints.js b/src/js/game/hud/parts/waypoints.js index d981d33e..82187e55 100644 --- a/src/js/game/hud/parts/waypoints.js +++ b/src/js/game/hud/parts/waypoints.js @@ -133,11 +133,6 @@ export class HUDWaypoints extends BaseHUDPart { * @param {Vector=} worldPos Override the world pos, otherwise it is the camera position */ requestCreateMarker(worldPos = null) { - if (IS_DEMO) { - this.root.hud.parts.dialogs.showFeatureRestrictionInfo(T.demo.features.creatingMarkers); - return; - } - const markerNameInput = new FormElementInput({ id: "markerName", label: null, @@ -157,6 +152,11 @@ export class HUDWaypoints extends BaseHUDPart { const center = worldPos || this.root.camera.center; dialog.buttonSignals.ok.add(() => { + if (IS_DEMO && this.waypoints.length > 2) { + this.root.hud.parts.dialogs.showFeatureRestrictionInfo("", T.dialogs.markerDemoLimit.desc); + return; + } + this.waypoints.push({ label: markerNameInput.getValue(), center: { x: center.x, y: center.y }, diff --git a/src/js/states/main_menu.js b/src/js/states/main_menu.js index ea0148ec..8ca023b2 100644 --- a/src/js/states/main_menu.js +++ b/src/js/states/main_menu.js @@ -27,7 +27,8 @@ export class MainMenuState extends GameState { Get the shapez.io standalone! `; - return ` + return ( + ` @@ -57,13 +58,20 @@ export class MainMenuState extends GameState {
${IS_DEMO ? `
${bannerHtml}
` : ""} +

${T.mainMenu.contests.contest_01_03062020.title}

-

${T.mainMenu.contests.contest_01_03062020.desc}

+ ` + + /*

${T.mainMenu.contests.contest_01_03062020.desc}

+ }*/ + + ` +

${T.mainMenu.contests.contestOver}

+
+
@@ -104,7 +112,8 @@ export class MainMenuState extends GameState {
- `; + ` + ); } requestImportSavegame() { @@ -220,7 +229,10 @@ export class MainMenuState extends GameState { this.trackClicks(qs(".settingsButton"), this.onSettingsButtonClicked); this.trackClicks(qs(".changelog"), this.onChangelogClicked); - this.trackClicks(qs(".participateContest"), this.onContestClicked); + const contestButton = qs(".participateContest"); + if (contestButton) { + this.trackClicks(contestButton, this.onContestClicked); + } if (G_IS_STANDALONE) { this.trackClicks(qs(".exitAppButton"), this.onExitAppButtonClicked); @@ -256,7 +268,7 @@ export class MainMenuState extends GameState { } onSteamLinkClicked() { - this.app.analytics.trackUiClick("main_menu_steam_link"); + this.app.analytics.trackUiClick("main_menu_steam_link_2"); this.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.standaloneStorePage); return false; } diff --git a/src/js/states/mobile_warning.js b/src/js/states/mobile_warning.js index c6903164..de17578a 100644 --- a/src/js/states/mobile_warning.js +++ b/src/js/states/mobile_warning.js @@ -13,11 +13,11 @@ export class MobileWarningState extends GameState {

- I'm sorry, but shapez.io is not yet available on mobile devices! - (There is also no estimate when this will change, but feel to make a contribution! It's -  open source!)

+ I'm sorry, but shapez.io is not available on mobile devices yet! + There is also no estimate when this will change, but feel to make a contribution! It's +  open source!

-

If you want to play on your computer, you can also get the standalone on itch.io:

+

If you want to play on your computer, you can also get the standalone on steam: