From 215eb66c23f7ef6da245042c97a403d7b2b7b351 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2026 04:37:07 +0000 Subject: [PATCH] feat: add superlatives types and socket events to shared Co-Authored-By: Claude Opus 4.6 --- shared/src/types.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/shared/src/types.ts b/shared/src/types.ts index a664b05..d41369c 100644 --- a/shared/src/types.ts +++ b/shared/src/types.ts @@ -164,6 +164,26 @@ export interface PlayerInput { targetEntityId?: EntityId; } +export interface SuperlativeEntry { + entityId: EntityId; + name: string; + value: number; +} + +export interface SuperlativesData { + mostLoved: SuperlativeEntry | null; + mostPopular: SuperlativeEntry | null; + mostReviled: SuperlativeEntry | null; + mostAnnoying: SuperlativeEntry | null; + shyest: SuperlativeEntry | null; + mostOutgoing: SuperlativeEntry | null; + biggestHeartbreaker: SuperlativeEntry | null; + mostDevoted: SuperlativeEntry | null; + loneliest: SuperlativeEntry | null; + mostPolarizing: SuperlativeEntry | null; + socialButterfly: SuperlativeEntry | null; +} + // Server -> Client events export interface ServerEvents { 'world-state': (data: WorldState) => void; @@ -171,10 +191,13 @@ export interface ServerEvents { 'player-joined': (data: PlayerJoined) => void; 'player-left': (data: PlayerLeft) => void; 'npc-recomposed': (data: { entityId: EntityId; appearance: Appearance }) => void; + 'superlatives-update': (data: SuperlativesData) => void; } // Client -> Server events export interface ClientEvents { 'player-input': (data: PlayerInput) => void; 'spawn-npc': (data: { x: number; y: number }) => void; + 'superlatives-subscribe': () => void; + 'superlatives-unsubscribe': () => void; }