Compare commits
2 Commits
a5022443f3
...
52166fdd86
Author | SHA1 | Date |
---|---|---|
tobspr | 52166fdd86 | |
tobspr | b67f925f4f |
|
@ -49,7 +49,6 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
|
|||
: ""
|
||||
}
|
||||
</button>
|
||||
${!G_IS_STEAM_DEMO ? `<span class="specialOffer">${T.global.discountSummerSale}</span>` : ""}
|
||||
<button class="otherCloseButton" data-btn-variant="${G_IS_STEAM_DEMO ? "steam-demo" : "prod"}">${
|
||||
T.ingame.standaloneAdvantages.no_thanks
|
||||
}</button>
|
||||
|
|
|
@ -110,7 +110,6 @@ export class MainMenuState extends GameState {
|
|||
}
|
||||
Play shapez on Steam
|
||||
</a>
|
||||
${!G_IS_STEAM_DEMO ? `<span class="specialOffer">${T.global.discountSummerSale}</span>` : ""}
|
||||
${!G_IS_STEAM_DEMO ? `<div class="onlinePlayerCount"></div>` : ""}
|
||||
|
||||
`;
|
||||
|
|
|
@ -47,21 +47,19 @@ export class PreloadState extends GameState {
|
|||
}
|
||||
|
||||
async fetchDiscounts() {
|
||||
// Summer sale specific
|
||||
globalConfig.currentDiscount = 60;
|
||||
|
||||
// Regular
|
||||
// await timeoutPromise(
|
||||
// fetch("https://analytics.shapez.io/v1/discounts")
|
||||
// .then(res => res.json())
|
||||
// .then(data => {
|
||||
// globalConfig.currentDiscount = Number(data["1318690"].data.price_overview.discount_percent);
|
||||
// logger.log("Fetched current discount:", globalConfig.currentDiscount);
|
||||
// }),
|
||||
// 2000
|
||||
// ).catch(err => {
|
||||
// logger.warn("Failed to fetch current discount:", err);
|
||||
// });
|
||||
await timeoutPromise(
|
||||
fetch("https://analytics.shapez.io/v1/discounts")
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
globalConfig.currentDiscount = Number(
|
||||
data["1318690"].data.price_overview.discount_percent
|
||||
);
|
||||
logger.log("Fetched current discount:", globalConfig.currentDiscount);
|
||||
}),
|
||||
2000
|
||||
).catch(err => {
|
||||
logger.warn("Failed to fetch current discount:", err);
|
||||
});
|
||||
}
|
||||
|
||||
async sendBeacon() {
|
||||
|
|
Loading…
Reference in New Issue