Update game analytics key

pull/33/head
tobspr 4 years ago
parent 241b4b42d9
commit 862c69eade

@ -9,8 +9,12 @@ import { GameRoot } from "../../game/root";
import { StaticMapEntityComponent } from "../../game/components/static_map_entity";
const logger = createLogger("game_analytics");
const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.shapez.io";
const analyticsLocalFile = "analytics_token.bin";
// Be sure to increment the ID whenever it changes to make sure all
// users are tracked
const analyticsLocalFile = "analytics_token.2.bin";
export class ShapezGameAnalytics extends GameAnalyticsInterface {
/**
@ -115,6 +119,10 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
}
const savegameId = savegame.internalId;
if (!gameState.core) {
logger.warn("Game state has no core");
return;
}
const root = gameState.core.root;
if (!root) {
logger.warn("Root is not initialized");

Loading…
Cancel
Save