diff --git a/src/css/ingame_hud/standalone_advantages.scss b/src/css/ingame_hud/standalone_advantages.scss index dc354792..bc285a30 100644 --- a/src/css/ingame_hud/standalone_advantages.scss +++ b/src/css/ingame_hud/standalone_advantages.scss @@ -84,10 +84,33 @@ } .playtimeDisclaimer { - @include S(margin-bottom, 10px); + @include S(margin-bottom, 15px); @include PlainText; } + .playtimeDisclaimerDownload { + @include SuperSmallText; + width: 100%; + box-sizing: border-box; + text-align: center; + background: #b3f2c5; + @include S(border-radius, $globalBorderRadius); + @include S(padding, 7px, 10px); + @include S(margin-bottom, 15px); + pointer-events: all; + transition: background-color 0.12s ease-in-out; + color: rgba(#000, 0.5); + + &:hover { + background: darken(#b3f2c5, 3); + } + cursor: pointer; + + strong { + color: #000; + } + } + .steamLinkButton { @include IncreasedClickArea(5px); @include S(margin, 0); diff --git a/src/css/ingame_hud/steam_capsule.scss b/src/css/ingame_hud/steam_capsule.scss deleted file mode 100644 index 6a71fc07..00000000 --- a/src/css/ingame_hud/steam_capsule.scss +++ /dev/null @@ -1,33 +0,0 @@ -#ingame_HUD_SteamCapsule { - position: absolute; - @include S(width, 150px); - @include S(height, 119px); - background: transparent center center / cover no-repeat; - - pointer-events: all; - overflow: hidden; - @include S(right, 10px); - - border: D(2px) solid #000; - @include S(border-radius, $globalBorderRadius); - cursor: pointer; - @include S(bottom, 150px); - - & { - /* @load-async */ - background-image: uiResource("res/ui/memes/cat1.png") !important; - } - - &:hover { - opacity: 0.95; - } - - @include InlineAnimation(0.5s ease-in-out) { - 0% { - transform: translateX(100%); - } - 100% { - transform: none; - } - } -} diff --git a/src/css/main.scss b/src/css/main.scss index 6ac138f8..46b6fced 100644 --- a/src/css/main.scss +++ b/src/css/main.scss @@ -57,7 +57,6 @@ @import "ingame_hud/shape_viewer"; @import "ingame_hud/sandbox_controller"; @import "ingame_hud/standalone_advantages"; -@import "ingame_hud/steam_capsule"; @import "ingame_hud/puzzle_back_to_menu"; @import "ingame_hud/puzzle_editor_review"; @import "ingame_hud/puzzle_dlc_logo"; @@ -105,7 +104,6 @@ ingame_HUD_Waypoints_Hint, ingame_HUD_WatermarkClicker, ingame_HUD_Watermark, ingame_HUD_ColorBlindBelowTileHelper, -ingame_HUD_SteamCapsule, ingame_HUD_SandboxController, // Overlays diff --git a/src/js/game/hub_goals.js b/src/js/game/hub_goals.js index 9f9c63be..3ce607fa 100644 --- a/src/js/game/hub_goals.js +++ b/src/js/game/hub_goals.js @@ -197,6 +197,13 @@ export class HubGoals extends BasicSerializableObject { if (G_IS_DEV && globalConfig.debug.allBuildingsUnlocked) { return true; } + if ( + reward === enumHubGoalRewards.reward_blueprints && + this.root.app.restrictionMgr.isLimitedVersion() + ) { + return false; + } + if (this.root.gameMode.getLevelDefinitions().length < 1) { // no story, so always unlocked return true; diff --git a/src/js/game/hud/hud.js b/src/js/game/hud/hud.js index 0a41f824..48cee7c3 100644 --- a/src/js/game/hud/hud.js +++ b/src/js/game/hud/hud.js @@ -87,9 +87,7 @@ export class GameHUD { } if (this.root.app.restrictionMgr.getIsStandaloneMarketingActive()) { - if (["1", "2"].includes(this.root.app.gameAnalytics.abtVariant)) { - this.parts.demoTimer = new HUDDemoTimer(this.root); - } + this.parts.demoTimer = new HUDDemoTimer(this.root); } const additionalParts = this.root.gameMode.additionalHudParts; @@ -219,7 +217,7 @@ export class GameHUD { * @param {DrawParameters} parameters */ drawOverlays(parameters) { - const partsOrder = ["waypoints", "watermark", "wireInfo"]; + const partsOrder = ["waypoints", "wireInfo"]; for (let i = 0; i < partsOrder.length; ++i) { if (this.parts[partsOrder[i]]) { diff --git a/src/js/game/hud/parts/demo_timer.js b/src/js/game/hud/parts/demo_timer.js index 795a6220..9421eacf 100644 --- a/src/js/game/hud/parts/demo_timer.js +++ b/src/js/game/hud/parts/demo_timer.js @@ -13,7 +13,7 @@ export class HUDDemoTimer extends BaseHUDPart { } get totalTime() { - return this.root.app.gameAnalytics.abtVariant === "1" ? 15 : 30; + return G_IS_STEAM_DEMO ? 15 : 30; } initialize() {} diff --git a/src/js/game/hud/parts/mass_selector.js b/src/js/game/hud/parts/mass_selector.js index bb032f1e..8fbc129c 100644 --- a/src/js/game/hud/parts/mass_selector.js +++ b/src/js/game/hud/parts/mass_selector.js @@ -1,6 +1,5 @@ import { globalConfig } from "../../../core/config"; import { DrawParameters } from "../../../core/draw_parameters"; -import { gMetaBuildingRegistry } from "../../../core/global_registries"; import { createLogger } from "../../../core/logging"; import { STOP_PROPAGATION } from "../../../core/signal"; import { formatBigNumberFull } from "../../../core/utils"; @@ -8,10 +7,7 @@ import { Vector } from "../../../core/vector"; import { ACHIEVEMENTS } from "../../../platform/achievement_provider"; import { T } from "../../../translations"; import { Blueprint } from "../../blueprint"; -import { MetaBlockBuilding } from "../../buildings/block"; -import { MetaConstantProducerBuilding } from "../../buildings/constant_producer"; import { enumMouseButton } from "../../camera"; -import { Component } from "../../component"; import { Entity } from "../../entity"; import { KEYMAPPINGS } from "../../key_action_mapper"; import { THEME } from "../../theme"; @@ -128,13 +124,17 @@ export class HUDMassSelector extends BaseHUDPart { this.selectedUids = new Set(); } + showBlueprintsNotUnlocked() { + this.root.hud.parts.dialogs.showInfo( + T.dialogs.blueprintsNotUnlocked.title, + T.dialogs.blueprintsNotUnlocked.desc + ); + } + startCopy() { if (this.selectedUids.size > 0) { if (!this.root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_blueprints)) { - this.root.hud.parts.dialogs.showInfo( - T.dialogs.blueprintsNotUnlocked.title, - T.dialogs.blueprintsNotUnlocked.desc - ); + this.showBlueprintsNotUnlocked(); return; } this.root.hud.signals.buildingsSelectedForCopy.dispatch(Array.from(this.selectedUids)); @@ -157,10 +157,7 @@ export class HUDMassSelector extends BaseHUDPart { confirmCut() { if (!this.root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_blueprints)) { - this.root.hud.parts.dialogs.showInfo( - T.dialogs.blueprintsNotUnlocked.title, - T.dialogs.blueprintsNotUnlocked.desc - ); + this.showBlueprintsNotUnlocked(); } else if ( !this.root.app.settings.getAllSettings().disableCutDeleteWarnings && this.selectedUids.size > 100 diff --git a/src/js/game/hud/parts/standalone_advantages.js b/src/js/game/hud/parts/standalone_advantages.js index 46980cf6..59ffee80 100644 --- a/src/js/game/hud/parts/standalone_advantages.js +++ b/src/js/game/hud/parts/standalone_advantages.js @@ -1,6 +1,7 @@ import { globalConfig, openStandaloneLink } from "../../../core/config"; import { InputReceiver } from "../../../core/input_receiver"; -import { makeDiv } from "../../../core/utils"; +import { ReadWriteProxy } from "../../../core/read_write_proxy"; +import { generateFileDownload, makeDiv } from "../../../core/utils"; import { T } from "../../../translations"; import { BaseHUDPart } from "../base_hud_part"; import { DynamicDomAttach } from "../dynamic_dom_attach"; @@ -11,23 +12,8 @@ export class HUDStandaloneAdvantages extends BaseHUDPart { // DIALOG Inner / Wrapper this.dialogInner = makeDiv(this.background, null, ["dialogInner"]); - this.title = makeDiv( - this.dialogInner, - null, - ["title"], - - ["1", "2"].includes(this.root.app.gameAnalytics.abtVariant) - ? T.ingame.standaloneAdvantages.title_expired - : T.ingame.standaloneAdvantages.title - ); - if (["1", "2"].includes(this.root.app.gameAnalytics.abtVariant)) { - this.subTitle = makeDiv( - this.dialogInner, - null, - ["subTitle"], - T.ingame.standaloneAdvantages.title - ); - } + this.title = makeDiv(this.dialogInner, null, ["title"], T.ingame.standaloneAdvantages.title_expired); + this.subTitle = makeDiv(this.dialogInner, null, ["subTitle"], T.ingame.standaloneAdvantages.title); this.contentDiv = makeDiv( this.dialogInner, @@ -49,6 +35,9 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
${T.demoBanners.playtimeDisclaimer}
+ +
${T.demoBanners.playtimeDisclaimerDownload}
+