Implement NPC perception, returning trespassers, responder dispatch, wand screening, and accessibility polish
CI / headless-tests (push) Successful in 2m11s
CI / headless-tests (push) Successful in 2m11s
This commit is contained in:
1 parent
439e0a4281
commit
81b5d5ce5a
22 files changed
+879
-73
No files matched your search
@@ -35,6 +35,10 @@ const NpcProfile := preload("res://src/core/npc_profile.gd")
|
||||
|
||||
@export var policy_summary: String = ""
|
||||
|
||||
## Door-staff (guard) dialogue lines specific to this venue. Keys are intent
|
||||
## or situation names; values are Arrays of line strings.
|
||||
@export var door_staff_lines: Dictionary = {}
|
||||
|
||||
func profile_for(npc_type: int) -> NpcProfile:
|
||||
for p in npc_profiles:
|
||||
if p.npc_type == npc_type:
|
||||
@@ -47,3 +51,26 @@ func events_in_phase(phase: int) -> Array[Dictionary]:
|
||||
if event.get("phase", -1) == phase:
|
||||
result.append(event)
|
||||
return result
|
||||
|
||||
## Map an NPC intent to a named venue location (Vector3). Falls back to the
|
||||
## entrance when the intent or its location is unknown. Pure and headless-safe.
|
||||
func waypoint_for_intent(intent: String) -> Vector3:
|
||||
return _location_or_default(_spot_for_intent(intent), Vector3(0, 0, 1.2))
|
||||
|
||||
func _spot_for_intent(intent: String) -> String:
|
||||
match intent:
|
||||
"enter", "arrive", "deliver", "trespass", "force_entry", "follow_authorized", "counterfeit_credential", "blend_in", "crisis", "threat":
|
||||
return "entrance"
|
||||
"photo", "film", "perform", "wander", "roam":
|
||||
return "sidewalk"
|
||||
"sit":
|
||||
return "steps_end"
|
||||
_:
|
||||
return "sidewalk"
|
||||
|
||||
func _location_or_default(spot: String, fallback: Vector3) -> Vector3:
|
||||
if locations.has(spot):
|
||||
var v: Variant = locations[spot]
|
||||
if v is Vector3:
|
||||
return v
|
||||
return fallback
|
||||
Reference in new issue
Block a user