mirror of
https://github.com/tobspr-games/shapez.io.git
synced 2026-01-10 19:21:18 -08:00
Update game analytics key
This commit is contained in:
parent
241b4b42d9
commit
862c69eade
1 changed files with 9 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue