mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-07 10:03:59 +00:00
Further abt testing
This commit is contained in:
parent
94253c9370
commit
e9e88241b4
@ -17,7 +17,6 @@ export const THIRDPARTY_URLS = {
|
|||||||
|
|
||||||
privacyPolicy: "https://tobspr.io/privacy.html",
|
privacyPolicy: "https://tobspr.io/privacy.html",
|
||||||
|
|
||||||
standaloneStorePage: "https://store.steampowered.com/app/1318690/shapezio/",
|
|
||||||
stanaloneCampaignLink: "https://get.shapez.io",
|
stanaloneCampaignLink: "https://get.shapez.io",
|
||||||
puzzleDlcStorePage: "https://store.steampowered.com/app/1625400/shapezio__Puzzle_DLC",
|
puzzleDlcStorePage: "https://store.steampowered.com/app/1625400/shapezio__Puzzle_DLC",
|
||||||
|
|
||||||
|
@ -610,20 +610,13 @@ export class RegularGameMode extends GameMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get difficultyMultiplicator() {
|
get difficultyMultiplicator() {
|
||||||
switch (this.root.app.gameAnalytics.abtVariant) {
|
if (G_IS_STANDALONE) {
|
||||||
case "0":
|
if (G_IS_STEAM_DEMO) {
|
||||||
return 0.2;
|
|
||||||
case "1":
|
|
||||||
return 0.5;
|
|
||||||
case "2":
|
|
||||||
return 0.75;
|
return 0.75;
|
||||||
case "3":
|
|
||||||
return 1;
|
|
||||||
case "4":
|
|
||||||
return 1.25;
|
|
||||||
case "5":
|
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { globalConfig } from "../../core/config";
|
import { globalConfig, THIRDPARTY_URLS } 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 { randomInt } from "../../core/utils";
|
import { randomInt } from "../../core/utils";
|
||||||
@ -18,8 +18,8 @@ const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.sha
|
|||||||
// Be sure to increment the ID whenever it changes
|
// Be sure to increment the ID whenever it changes
|
||||||
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
|
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
|
||||||
|
|
||||||
const CURRENT_ABT = "abt_dif";
|
const CURRENT_ABT = "abt_spl";
|
||||||
const CURRENT_ABT_COUNT = 6;
|
const CURRENT_ABT_COUNT = 2;
|
||||||
|
|
||||||
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||||
constructor(app) {
|
constructor(app) {
|
||||||
@ -52,7 +52,9 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetchABVariant() {
|
fetchABVariant() {
|
||||||
return this.app.storage.readFileAsync("shapez_" + CURRENT_ABT + ".bin").then(
|
return this.app.storage
|
||||||
|
.readFileAsync("shapez_" + CURRENT_ABT + ".bin")
|
||||||
|
.then(
|
||||||
abt => {
|
abt => {
|
||||||
if (typeof queryParamOptions.abtVariant === "string") {
|
if (typeof queryParamOptions.abtVariant === "string") {
|
||||||
this.abtVariant = queryParamOptions.abtVariant;
|
this.abtVariant = queryParamOptions.abtVariant;
|
||||||
@ -74,7 +76,12 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
|||||||
this.app.storage.writeFileAsync("shapez_" + CURRENT_ABT + ".bin", this.abtVariant);
|
this.app.storage.writeFileAsync("shapez_" + CURRENT_ABT + ".bin", this.abtVariant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
.then(() => {
|
||||||
|
if (this.abtVariant === "1") {
|
||||||
|
THIRDPARTY_URLS.stanaloneCampaignLink = "https://get.shapez.io/bundle";
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user