mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Special options while running on iogames.space
This commit is contained in:
parent
a627fb9a94
commit
9033c9eb67
@ -19,6 +19,13 @@
|
|||||||
.changes {
|
.changes {
|
||||||
@include SuperSmallText;
|
@include SuperSmallText;
|
||||||
@include S(padding-left, 20px);
|
@include S(padding-left, 20px);
|
||||||
|
strong {
|
||||||
|
background: $colorBlueBright;
|
||||||
|
color: #fff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include S(padding, 1px, 2px);
|
||||||
|
@include S(margin-right, 3px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.changelogDialogEntry {
|
.changelogDialogEntry {
|
||||||
|
margin-top: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
background: #eef1f4;
|
||||||
|
|
||||||
.version {
|
.version {
|
||||||
@include Heading;
|
@include Heading;
|
||||||
}
|
}
|
||||||
@ -25,7 +28,14 @@
|
|||||||
|
|
||||||
.changes {
|
.changes {
|
||||||
@include SuperSmallText;
|
@include SuperSmallText;
|
||||||
@include S(padding-left, 20px);
|
@include S(padding-left, 15px);
|
||||||
|
strong {
|
||||||
|
background: $colorBlueBright;
|
||||||
|
color: #fff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include S(padding, 1px, 2px);
|
||||||
|
@include S(margin-right, 3px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ export const CHANGELOG = [
|
|||||||
version: "1.0.3",
|
version: "1.0.3",
|
||||||
date: "24.05.2020",
|
date: "24.05.2020",
|
||||||
entries: [
|
entries: [
|
||||||
"Balancing: I reduced the amount of shapes required for the first 5 levels, to make it easier to get into the game.",
|
"<strong>Balancing</strong> Reduced the amount of shapes required for the first 5 levels, to make it easier to get into the game.",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Math_min } from "../../core/builtins";
|
import { Math_min } from "../../core/builtins";
|
||||||
import { globalConfig, IS_MOBILE } from "../../core/config";
|
import { globalConfig, IS_MOBILE, IS_DEBUG, IS_DEMO } from "../../core/config";
|
||||||
import { createLogger } from "../../core/logging";
|
import { createLogger } from "../../core/logging";
|
||||||
import { queryParamOptions } from "../../core/query_parameters";
|
import { queryParamOptions } from "../../core/query_parameters";
|
||||||
import { clamp } from "../../core/utils";
|
import { clamp } from "../../core/utils";
|
||||||
@ -19,6 +19,8 @@ export class PlatformWrapperImplBrowser extends PlatformWrapperInterface {
|
|||||||
iframed: false,
|
iframed: false,
|
||||||
externalLinks: true,
|
externalLinks: true,
|
||||||
iogLink: true,
|
iogLink: true,
|
||||||
|
unlimitedSavegames: IS_DEMO ? false : true,
|
||||||
|
showDemoBadge: IS_DEMO,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!G_IS_STANDALONE && queryParamOptions.embedProvider) {
|
if (!G_IS_STANDALONE && queryParamOptions.embedProvider) {
|
||||||
@ -35,6 +37,8 @@ export class PlatformWrapperImplBrowser extends PlatformWrapperInterface {
|
|||||||
case "iogames.space": {
|
case "iogames.space": {
|
||||||
this.embedProvider.id = "iogames.space";
|
this.embedProvider.id = "iogames.space";
|
||||||
this.embedProvider.iogLink = true;
|
this.embedProvider.iogLink = true;
|
||||||
|
this.embedProvider.unlimitedSavegames = true;
|
||||||
|
this.embedProvider.showDemoBadge = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +75,14 @@ export class PlatformWrapperImplBrowser extends PlatformWrapperInterface {
|
|||||||
return super.initialize().then(() => this.initializeAdProvider());
|
return super.initialize().then(() => this.initializeAdProvider());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getHasUnlimitedSavegames() {
|
||||||
|
return this.embedProvider.unlimitedSavegames;
|
||||||
|
}
|
||||||
|
|
||||||
|
getShowDemoBadges() {
|
||||||
|
return this.embedProvider.showDemoBadge;
|
||||||
|
}
|
||||||
|
|
||||||
onSentryLoaded() {
|
onSentryLoaded() {
|
||||||
logger.log("Initializing sentry");
|
logger.log("Initializing sentry");
|
||||||
window.Sentry.init({
|
window.Sentry.init({
|
||||||
|
@ -29,6 +29,17 @@ export class PlatformWrapperInterface {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the user has unlimited savegames
|
||||||
|
*/
|
||||||
|
getHasUnlimitedSavegames() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
getShowDemoBadges() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the strength of touch pans with the mouse
|
* Returns the strength of touch pans with the mouse
|
||||||
*/
|
*/
|
||||||
|
@ -54,7 +54,11 @@ export class MainMenuState extends GameState {
|
|||||||
|
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="${cachebust("res/logo.png")}" alt="shapez.io Logo">
|
<img src="${cachebust("res/logo.png")}" alt="shapez.io Logo">
|
||||||
${IS_DEMO ? `<div class="demoBadge"></div>` : ""}
|
${
|
||||||
|
IS_DEMO && this.app.platformWrapper.getShowDemoBadges()
|
||||||
|
? `<div class="demoBadge"></div>`
|
||||||
|
: ""
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +108,11 @@ export class MainMenuState extends GameState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
requestImportSavegame() {
|
requestImportSavegame() {
|
||||||
if (IS_DEMO && this.app.savegameMgr.getSavegamesMetaData().length > 0) {
|
if (
|
||||||
|
IS_DEMO &&
|
||||||
|
this.app.savegameMgr.getSavegamesMetaData().length > 0 &&
|
||||||
|
!this.app.platformWrapper.getHasUnlimitedSavegames()
|
||||||
|
) {
|
||||||
this.app.analytics.trackUiClick("importgame_slot_limit_show");
|
this.app.analytics.trackUiClick("importgame_slot_limit_show");
|
||||||
this.dialogs.showWarning(T.dialogs.oneSavegameLimit.title, T.dialogs.oneSavegameLimit.desc);
|
this.dialogs.showWarning(T.dialogs.oneSavegameLimit.title, T.dialogs.oneSavegameLimit.desc);
|
||||||
return;
|
return;
|
||||||
@ -373,7 +381,11 @@ export class MainMenuState extends GameState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPlayButtonClicked() {
|
onPlayButtonClicked() {
|
||||||
if (IS_DEMO && this.app.savegameMgr.getSavegamesMetaData().length > 0) {
|
if (
|
||||||
|
IS_DEMO &&
|
||||||
|
this.app.savegameMgr.getSavegamesMetaData().length > 0 &&
|
||||||
|
!this.app.platformWrapper.getHasUnlimitedSavegames()
|
||||||
|
) {
|
||||||
this.app.analytics.trackUiClick("startgame_slot_limit_show");
|
this.app.analytics.trackUiClick("startgame_slot_limit_show");
|
||||||
this.dialogs.showWarning(T.dialogs.oneSavegameLimit.title, T.dialogs.oneSavegameLimit.desc);
|
this.dialogs.showWarning(T.dialogs.oneSavegameLimit.title, T.dialogs.oneSavegameLimit.desc);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user