From 553442e953ca88f20eb8ad3e93a1eb5c481409a0 Mon Sep 17 00:00:00 2001 From: tobspr Date: Wed, 3 Jun 2020 10:06:13 +0200 Subject: [PATCH] Add weekly contests, bump to 1.1.5 --- src/css/ingame_hud/dialogs.scss | 10 +++++- src/css/states/main_menu.scss | 57 ++++++++++++++++++++++++--------- src/js/changelog.js | 5 +++ src/js/core/config.js | 2 +- src/js/states/main_menu.js | 33 ++++++++++++------- translations/base-en.yaml | 34 ++++++++++++++------ version | 2 +- 7 files changed, 105 insertions(+), 38 deletions(-) diff --git a/src/css/ingame_hud/dialogs.scss b/src/css/ingame_hud/dialogs.scss index c40db728..eef87505 100644 --- a/src/css/ingame_hud/dialogs.scss +++ b/src/css/ingame_hud/dialogs.scss @@ -118,7 +118,7 @@ pointer-events: all; @include S(width, 350px); - > strong { + strong { font-weight: bold; } @@ -139,6 +139,14 @@ background-color: rgb(250, 206, 206); } } + + ul.bucketList { + padding-left: 30px; + + li { + display: list-item; + } + } } > .buttons { diff --git a/src/css/states/main_menu.scss b/src/css/states/main_menu.scss index e5d8bbef..41199b95 100644 --- a/src/css/states/main_menu.scss +++ b/src/css/states/main_menu.scss @@ -60,28 +60,17 @@ .mainWrapper { @include S(padding, 0, 10px); - align-items: center; + align-items: start; justify-items: center; - &.noDemo { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - } - - &.demo { - @include S(grid-column-gap, 10px); - display: grid; - grid-template-columns: 1fr 1fr; - } + @include S(grid-column-gap, 10px); + display: grid; + grid-template-columns: 1fr 1fr; .standaloneBanner { background: rgb(255, 234, 245); @include S(border-radius, $globalBorderRadius); - height: 100%; box-sizing: border-box; - @include S(width, 300px); @include S(padding, 15px); display: flex; @@ -165,6 +154,44 @@ border: #{D(2px)} solid rgba(0, 10, 20, 0.1); } + .sideContainer { + display: flex; + flex-direction: column; + @include S(width, 300px); + + .standaloneBanner { + flex-grow: 1; + @include S(margin-bottom, 10px); + } + + .contest { + flex-grow: 1; + background: rgb(32, 187, 166); + @include S(padding, 15px); + + h3 { + @include Heading; + color: #fff; + font-weight: bold; + text-transform: uppercase; + @include S(margin-bottom, 5px); + } + p { + color: #fff; + @include Text; + strong { + font-weight: bold; + } + @include S(margin-bottom, 5px); + } + + button { + background: #fff; + color: #333538; + } + } + } + .mainContainer { display: flex; align-items: center; diff --git a/src/js/changelog.js b/src/js/changelog.js index 81a23875..163aac14 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -1,4 +1,9 @@ export const CHANGELOG = [ + { + version: "1.1.5", + date: "03.06.2020", + entries: ["Added weekly contests!"], + }, { version: "1.1.4", date: "01.06.2020", diff --git a/src/js/core/config.js b/src/js/core/config.js index 48591055..7663ac69 100644 --- a/src/js/core/config.js +++ b/src/js/core/config.js @@ -83,7 +83,7 @@ export const globalConfig = { debug: { /* dev:start */ - fastGameEnter: true, + // fastGameEnter: true, // noArtificialDelays: true, // disableSavegameWrite: true, // showEntityBounds: true, diff --git a/src/js/states/main_menu.js b/src/js/states/main_menu.js index 808c05ac..ea0148ec 100644 --- a/src/js/states/main_menu.js +++ b/src/js/states/main_menu.js @@ -24,10 +24,6 @@ export class MainMenuState extends GameState {

${T.demoBanners.intro}

- - Get the shapez.io standalone! `; @@ -54,18 +50,22 @@ export class MainMenuState extends GameState {
- - ${IS_DEMO ? `
${bannerHtml}
` : ""} +
+ ${IS_DEMO ? `
${bannerHtml}
` : ""} +
+

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

+

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

+ +
+
+
${ isSupportedBrowser() @@ -220,6 +220,8 @@ export class MainMenuState extends GameState { this.trackClicks(qs(".settingsButton"), this.onSettingsButtonClicked); this.trackClicks(qs(".changelog"), this.onChangelogClicked); + this.trackClicks(qs(".participateContest"), this.onContestClicked); + if (G_IS_STANDALONE) { this.trackClicks(qs(".exitAppButton"), this.onExitAppButtonClicked); } @@ -267,6 +269,15 @@ export class MainMenuState extends GameState { this.moveToState("ChangelogState"); } + onContestClicked() { + this.app.analytics.trackUiClick("contest_click"); + + this.dialogs.showInfo( + T.mainMenu.contests.contest_01_03062020.title, + T.mainMenu.contests.contest_01_03062020.longDesc + ); + } + renderSavegames() { const oldContainer = this.htmlElement.querySelector(".mainContainer .savegames"); if (oldContainer) { diff --git a/translations/base-en.yaml b/translations/base-en.yaml index 07d22844..6f66894b 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -64,15 +64,9 @@ global: demoBanners: # This is the "advertisement" shown in the main menu and other various places - title: Hey! + title: Demo Version intro: >- - If you enjoy this game, please consider buying the full version! - advantages: - - Unlimited savegames - - Waypoints - - Dark mode & more - - >- - Allow me to further develop shapez.io ❤️ + Get the standalone to unlock all features! mainMenu: play: Play @@ -88,6 +82,28 @@ mainMenu: savegameLevel: Level savegameLevelUnknown: Unknown Level + contests: + contest_01_03062020: + title: "Contest #01" + desc: Win $25 for the coolest base! + longDesc: >- + To give something back to you, I thought it would be cool to make weekly contests! +

+ This weeks topic: Build the coolest base! +

+ Here's the deal:
+
    +
  • Submit a screenshot of your base to contest@shapez.io
  • +
  • Bonus points if you share it on social media!
  • +
  • I will choose 5 screenshots and propose it to the discord community to vote.
  • +
  • The winner gets $25 (Paypal, Amazon Gift Card, whatever you prefer)
  • +
  • Deadline: 07.06.2020 12:00 CEST
  • +
+
+ I'm looking forward to seeing your awesome creations! + + showInfo: Participate + dialogs: buttons: ok: OK @@ -153,7 +169,7 @@ dialogs: leaveNotPossibleInDemo: title: Demo version - desc: Your game was saved but you will not be able to restore it in the demo. Restoring your savegames is only possible in the full version. Are you sure? + desc: Your game has been saved, but you will not be able to restore it in the demo. Restoring your savegames is only possible in the full version. Are you sure? newUpdate: title: Update available diff --git a/version b/version index 1b87bcd0..314c3d71 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.1.4 \ No newline at end of file +1.1.5 \ No newline at end of file