feat(shared): add StockpileLogEntry type, pickup goal, and stockpile socket events

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-09 02:47:26 +00:00
parent 35f3b4ea37
commit 9e02cd973e
+12 -1
View File
@@ -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<string, number>) => void;
}
// Client -> Server events