From b295ef1af7d34de000cb2330d031cc15a1d6a1ac Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2026 03:03:23 +0000 Subject: [PATCH] feat: add gameTime to StateUpdate type Co-Authored-By: Claude Opus 4.6 --- shared/src/types.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shared/src/types.ts b/shared/src/types.ts index 78cb024..a664b05 100644 --- a/shared/src/types.ts +++ b/shared/src/types.ts @@ -137,13 +137,15 @@ export interface WorldState { tileSize: number; obstacles: Position[]; pointsOfInterest: { type: 'food' | 'rest'; position: Position }[]; - terrain: number[]; // flat array [y * width + x], terrain type per tile - decorations: number[]; // flat array [y * width + x], decoration tile index (-1 = none) + terrain: number[]; // flat array [y * width + x], terrain type per tile + decorations: number[]; // flat array [y * width + x], decoration tile index (-1 = none) + trunkDecorations: number[]; // flat array [y * width + x], trunk tile index (-1 = none) } export interface StateUpdate { entities: EntityState[]; tick: number; + gameTime: number; // 0.0-1.0 normalized position in day/night cycle } export interface PlayerJoined {