From 9e02cd973e64b345f65f64be712f3f783f7b62b9 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2026 02:47:26 +0000 Subject: [PATCH] feat(shared): add StockpileLogEntry type, pickup goal, and stockpile socket events Co-Authored-By: Claude Opus 4.6 --- shared/src/types.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/shared/src/types.ts b/shared/src/types.ts index 02c60e5..954d61c 100644 --- a/shared/src/types.ts +++ b/shared/src/types.ts @@ -80,7 +80,7 @@ export interface StatModifiers { } export type MovementState = 'idle' | 'walking'; -export type GoalType = 'wander' | 'eat' | 'rest' | 'gather' | 'craft' | 'build' | 'dropoff'; +export type GoalType = 'wander' | 'eat' | 'rest' | 'gather' | 'craft' | 'build' | 'dropoff' | 'pickup'; export interface Movement { state: MovementState; @@ -227,6 +227,14 @@ export interface InventionSummary { day: number; } +export interface StockpileLogEntry { + npcName: string; + action: 'dropoff' | 'pickup'; + itemId: string; + quantity: number; + tick: number; +} + // Server -> Client events export interface ServerEvents { 'world-state': (data: WorldState) => void; @@ -243,6 +251,9 @@ export interface ServerEvents { 'memory-history': (data: { entityId: EntityId; events: MemoryEvent[] }) => void; 'invention-event': (data: InventionSummary) => void; 'invention-history': (data: InventionSummary[]) => void; + 'stockpile-event': (data: StockpileLogEntry) => void; + 'stockpile-history': (data: StockpileLogEntry[]) => void; + 'stockpile-summary': (data: Record) => void; } // Client -> Server events