mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
1.1.19 release
This commit is contained in:
parent
1092975f08
commit
60aa5b06b4
@ -199,7 +199,8 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.timedButton {
|
&.timedButton,
|
||||||
|
&.timedButtonSlow {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -214,6 +215,10 @@
|
|||||||
content: " ";
|
content: " ";
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background: rgba(#fff, 0.6);
|
background: rgba(#fff, 0.6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.timedButton::after {
|
||||||
@include InlineAnimation(5s linear) {
|
@include InlineAnimation(5s linear) {
|
||||||
0% {
|
0% {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -223,8 +228,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.timedButtonSlow::after {
|
||||||
|
@include InlineAnimation(10s linear) {
|
||||||
|
0% {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
width: 0%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
export const CHANGELOG = [
|
export const CHANGELOG = [
|
||||||
|
{
|
||||||
|
version: "1.1.9",
|
||||||
|
date: "02.07.2020",
|
||||||
|
entries: [
|
||||||
|
"There are now notifications every 15 minutes in the demo version to buy the full version (For further details and the reason, check the #surveys channel in the discord)",
|
||||||
|
"I'm still working on the wires update, I hope to release it mid july!",
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
version: "1.1.18",
|
version: "1.1.18",
|
||||||
date: "27.06.2020",
|
date: "27.06.2020",
|
||||||
|
@ -151,6 +151,7 @@ export class Dialog {
|
|||||||
|
|
||||||
const params = (rawParams || "").split("/");
|
const params = (rawParams || "").split("/");
|
||||||
const useTimeout = params.indexOf("timeout") >= 0;
|
const useTimeout = params.indexOf("timeout") >= 0;
|
||||||
|
const useTimeoutSlow = params.indexOf("timeoutSlow") >= 0;
|
||||||
|
|
||||||
const isEnter = params.indexOf("enter") >= 0;
|
const isEnter = params.indexOf("enter") >= 0;
|
||||||
const isEscape = params.indexOf("escape") >= 0;
|
const isEscape = params.indexOf("escape") >= 0;
|
||||||
@ -167,6 +168,16 @@ export class Dialog {
|
|||||||
}, 5000);
|
}, 5000);
|
||||||
this.timeouts.push(timeout);
|
this.timeouts.push(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (useTimeoutSlow) {
|
||||||
|
button.classList.add("timedButtonSlow");
|
||||||
|
const timeout = setTimeout(() => {
|
||||||
|
button.classList.remove("timedButtonSlow");
|
||||||
|
arrayDeleteValue(this.timeouts, timeout);
|
||||||
|
}, 10000);
|
||||||
|
this.timeouts.push(timeout);
|
||||||
|
}
|
||||||
|
|
||||||
if (isEnter || isEscape) {
|
if (isEnter || isEscape) {
|
||||||
// if (this.app.settings.getShowKeyboardShortcuts()) {
|
// if (this.app.settings.getShowKeyboardShortcuts()) {
|
||||||
// Show keybinding
|
// Show keybinding
|
||||||
|
@ -38,6 +38,7 @@ import { HUDColorBlindHelper } from "./parts/color_blind_helper";
|
|||||||
import { HUDShapeViewer } from "./parts/shape_viewer";
|
import { HUDShapeViewer } from "./parts/shape_viewer";
|
||||||
import { HUDWiresOverlay } from "./parts/wires_overlay";
|
import { HUDWiresOverlay } from "./parts/wires_overlay";
|
||||||
import { HUDChangesDebugger } from "./parts/debug_changes";
|
import { HUDChangesDebugger } from "./parts/debug_changes";
|
||||||
|
import { HUDStandaloneReminder } from "./parts/standalone_reminder";
|
||||||
|
|
||||||
export class GameHUD {
|
export class GameHUD {
|
||||||
/**
|
/**
|
||||||
@ -103,6 +104,7 @@ export class GameHUD {
|
|||||||
|
|
||||||
if (IS_DEMO) {
|
if (IS_DEMO) {
|
||||||
this.parts.watermark = new HUDWatermark(this.root);
|
this.parts.watermark = new HUDWatermark(this.root);
|
||||||
|
this.parts.standaloneReminder = new HUDStandaloneReminder(this.root);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_IS_DEV && globalConfig.debug.renderChanges) {
|
if (G_IS_DEV && globalConfig.debug.renderChanges) {
|
||||||
|
40
src/js/game/hud/parts/standalone_reminder.js
Normal file
40
src/js/game/hud/parts/standalone_reminder.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { BaseHUDPart } from "../base_hud_part";
|
||||||
|
import { T } from "../../../translations";
|
||||||
|
import { THIRDPARTY_URLS } from "../../../core/config";
|
||||||
|
|
||||||
|
// How often to show the dialog
|
||||||
|
const DIALOG_INTERVAL = 15;
|
||||||
|
|
||||||
|
// When to start showing the dialogs
|
||||||
|
const DIALOG_START_INTERVAL = 15;
|
||||||
|
|
||||||
|
export class HUDStandaloneReminder extends BaseHUDPart {
|
||||||
|
initialize() {
|
||||||
|
this.lastMinutesHintShown = DIALOG_START_INTERVAL - DIALOG_INTERVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
getMinutesPlayed() {
|
||||||
|
return Math.floor(this.root.time.now() / 60.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
showHint() {
|
||||||
|
this.root.app.analytics.trackUiClick("demonotice_show");
|
||||||
|
const { getStandalone } = this.root.hud.parts.dialogs.showWarning(
|
||||||
|
T.dialogs.buyFullVersion.title,
|
||||||
|
T.dialogs.buyFullVersion.desc.replace("<minutes>", "" + this.getMinutesPlayed()),
|
||||||
|
["later:bad:timeoutSlow", "getStandalone:good"]
|
||||||
|
);
|
||||||
|
getStandalone.add(() => {
|
||||||
|
this.root.app.analytics.trackUiClick("demonotice_click");
|
||||||
|
this.root.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.standaloneStorePage);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
update() {
|
||||||
|
const minutesPlayed = this.getMinutesPlayed();
|
||||||
|
if (this.lastMinutesHintShown + DIALOG_INTERVAL < minutesPlayed) {
|
||||||
|
this.lastMinutesHintShown = minutesPlayed;
|
||||||
|
this.showHint();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -268,6 +268,11 @@ dialogs:
|
|||||||
title: Export screenshot
|
title: Export screenshot
|
||||||
desc: You requested to export your base as a screenshot. Please note that this can be quite slow for a big base and even crash your game!
|
desc: You requested to export your base as a screenshot. Please note that this can be quite slow for a big base and even crash your game!
|
||||||
|
|
||||||
|
buyFullVersion:
|
||||||
|
title: Enjoy the game?
|
||||||
|
desc: >-
|
||||||
|
You are already playing the demo for <minutes> minutes! Please get the standalone on steam for all features and to support me!<br><br>PS: It has a dark mode, and you can import your savegame to continue where you left! :P
|
||||||
|
|
||||||
ingame:
|
ingame:
|
||||||
# This is shown in the top left corner and displays useful keybindings in
|
# This is shown in the top left corner and displays useful keybindings in
|
||||||
# every situation
|
# every situation
|
||||||
|
Loading…
Reference in New Issue
Block a user