NPCs gain phone_number and email (the phone book). A new 'phone' node type holds a directory whose terminals each bind to an NPC via npc_id (the callee reached by dialing that number) and wire to the dialogue that plays on connect. Migration 029 adds the columns/type; repositories and admin API thread contacts and the per-terminal NPC binding. Authoring foundation only — the dial runtime and tools sidebar come next. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
13 lines
692 B
SQL
13 lines
692 B
SQL
-- Phone book + phone directory nodes. NPCs gain contact details; a phone node's
|
|
-- terminals each bind to an NPC (the callee) whose number the player dials.
|
|
|
|
ALTER TABLE osint.npcs ADD COLUMN phone_number TEXT;
|
|
ALTER TABLE osint.npcs ADD COLUMN email TEXT;
|
|
|
|
ALTER TABLE osint.story_nodes DROP CONSTRAINT story_nodes_node_type_check;
|
|
ALTER TABLE osint.story_nodes ADD CONSTRAINT story_nodes_node_type_check
|
|
CHECK (node_type IN ('cutscene','dialogue','level','det_gate','llm_gate','merit','phone'));
|
|
|
|
-- A terminal on a phone node binds to the NPC you reach by dialing their number.
|
|
ALTER TABLE osint.story_node_terminals ADD COLUMN npc_id UUID REFERENCES osint.npcs(id) ON DELETE SET NULL;
|