Add PLAN verbs and fix dead incident recording
Verbs (PLAN levels 1-3) - Eye contact: own Level 1 radial slice, logged as "eye contact". - Recognition is a player decision: "Recognize" sets NPCController.player_recognized, writes access evidence, and GameManager only then appends a RECOGNITION artifact. It is no longer implied by NPC type. - Body camera: real flag (off by default) driving the REC overlay; B toggles it and a formal warning arms it automatically, writing a body_camera incident event. - Blocking stations the guard 0.9 m from the person toward the entrance and turns to face them, instead of only emitting the escalation level. - Request reason: Level 3 ask answered from the NPC's seeded dialogue_lines. - Radial grows to 12 slices (174 px outer radius, centered labels). Incident recording fix - IncidentRecorder.start_incident() was never called, so add_event / add_access_evidence / add_escalation silently no-opped and the shift review always reported zero incidents. Incidents now open on focus (guarded by has_open_incident), verbs call _ensure_incident, and ShiftCoordinator closes leftovers as "unresolved" before building the review. Copy and docs - 9 new string keys (eye contact, body camera, recognition, reason, station). - README controls, 26-step smoke checklist, test count, status lists. - TODO section moved to DONE; MEMORY records the verb design and the recorder bug. Verification: headless 98/98, smoke_plan_verbs.gd + smoke_session_shell.gd + windowed smoke_focus_radial.gd all pass. Version bumped to 0.2.3.
This commit is contained in:
1 parent
028f608298
commit
f5ad1642b5
16 files changed
+500
-37
No files matched your search
@@ -34,6 +34,11 @@ var guard_noticed := false
|
||||
|
||||
## Whether this NPC has passed the handheld wand screening (The Joke Shop).
|
||||
var screened := false
|
||||
## Whether the guard has declared they recognize this person (a player decision
|
||||
## recorded as evidence, PLAN.md: Authorized Access).
|
||||
var player_recognized := false
|
||||
## Last reply the NPC gave when asked for their reason for entry.
|
||||
var last_reason_reply := ""
|
||||
## Event-level access payload (`has_id`, `has_ticket`, statuses). Empty means
|
||||
## venue/type defaults from AccessLoadout.
|
||||
var access_override: Dictionary = {}
|
||||
@@ -150,6 +155,16 @@ func tick_return(delta: float) -> bool:
|
||||
func decide_leave() -> bool:
|
||||
return leave_requested
|
||||
|
||||
## Level 3 ask: request the person's reason for entry (PLAN.md). Pure and
|
||||
## headless-testable; returns the line this NPC answers with ("" if silent).
|
||||
func request_reason() -> String:
|
||||
var lines: Array[String] = profile.dialogue_lines if profile else []
|
||||
if lines.is_empty():
|
||||
last_reason_reply = ""
|
||||
return ""
|
||||
last_reason_reply = lines[rng.randi_range(0, lines.size() - 1)]
|
||||
return last_reason_reply
|
||||
|
||||
## Perception pass: given the guard's distance (meters), return a perception
|
||||
## result describing how the NPC reacts to the guard's presence. Pure and
|
||||
## headless-testable; the presentation layer feeds it the real distance.
|
||||
|
||||
Reference in new issue
Block a user