From 99e041d6cf7d9d1a98af95ab2b7a98ca96500408 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Mar 2026 19:18:38 +0000 Subject: [PATCH] feat: add proposal and bond types to shared protocol Co-Authored-By: Claude Opus 4.6 --- shared/src/constants.ts | 2 ++ shared/src/types.ts | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/shared/src/constants.ts b/shared/src/constants.ts index ccc2a1f..e5a3fff 100644 --- a/shared/src/constants.ts +++ b/shared/src/constants.ts @@ -59,5 +59,7 @@ export const EMOTING_DURATION = 20; // ticks (2s) export const SOCIAL_GLOBAL_COOLDOWN = 50; // ticks (5s) export const SOCIAL_PAIR_COOLDOWN = 300; // ticks (30s) +export const PROPOSAL_EMOTING_DURATION = 30; // 3 seconds - longer for dramatic effect + // Camera mode commands export const MAX_NPC_COUNT = 50; diff --git a/shared/src/types.ts b/shared/src/types.ts index 756f37c..47f2a96 100644 --- a/shared/src/types.ts +++ b/shared/src/types.ts @@ -73,7 +73,7 @@ export interface NPCBrain { goalQueue: GoalType[]; } -export type InteractionPhase = 'none' | 'facing' | 'pausing' | 'emoting'; +export type InteractionPhase = 'none' | 'facing' | 'pausing' | 'emoting' | 'proposing'; export type InteractionOutcome = 'positive' | 'negative'; export interface SocialState { @@ -84,6 +84,9 @@ export interface SocialState { globalCooldown: number; pairCooldowns: Map; lastOutcome: LastOutcome | null; + proposalCooldown: number; + pendingProposal: { targetId: EntityId; type: string } | null; + isProposalInteraction: boolean; } export interface RelationshipData { @@ -123,6 +126,7 @@ export interface EntityState { value: number; classification: string; status: 'active' | 'memory'; + bond: string | null; }>; }