feat: add superlatives types and socket events to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user