Implement control pass: focus cone, action wheel, named inputs, boot fixes
Full build / Import + headless tests (push) Successful in 22s
Full build / Full desktop build + optional release (push) Skipped

- Venue-correct access artifacts (AccessLoadout) and screened-aware verify
- Cone focus on NPC heads with billboarded ring + display name (ADR-0008)
- Action wheel with de-escalation-first slices (ADR-0009); Esc/RMB cancel
- Procedural NPC face/hair/neck/shoes (ADR-0010); named input actions
- Fix GameManager parse error (radial typed as ActionRadial)
- Fix first-person camera height and guard spawning inside the building
- Move building volume back so the door/awning/marquee are visible
- Pull the event scheduler once per simulated second; cap live NPCs
- Regenerate README screenshots; update TODO/DONE/MEMORY/README; 77 tests

Adds src/test/smoke_focus_radial.gd for the windowed focus/radial smoke.
This commit is contained in:
zwitschi committed 2026-10-31 15:58:01 +01:00
1 parent 69484866db
commit f11b441c07
28 files changed
+1433 -249

No files matched your search

+62 -5
View File
@@ -39,14 +39,17 @@ func _init() -> void:
func get_npc_controller() -> NPCController:
return npc
func setup(profile: NpcProfile, intent: String, seed_value: int, p_spawn: Vector3, p_target: Vector3, p_door: Vector3 = Vector3(0, 0.5, 1.2)) -> void:
npc.setup("npc_%d" % seed_value, profile, intent, seed_value)
func setup(profile: NpcProfile, intent: String, seed_value: int, p_spawn: Vector3, p_target: Vector3, p_door: Vector3 = Vector3(0, 0.5, 1.2), p_npc_id: String = "", p_override: Dictionary = {}) -> void:
var id := p_npc_id if p_npc_id != "" else "npc_%d" % seed_value
npc.setup(id, profile, intent, seed_value)
npc.access_override = p_override
_visual_seed = seed_value
spawn_position = p_spawn
target_position = p_target
door_position = p_door
position = p_spawn
npc.fsm.state_changed.connect(_on_state_changed)
add_to_group("npc")
_build_body(profile.npc_type)
_nav_usable = false
_nav_try_frames = 0
@@ -62,9 +65,10 @@ func setup(profile: NpcProfile, intent: String, seed_value: int, p_spawn: Vector
var collider := CollisionShape3D.new()
var shape := CapsuleShape3D.new()
shape.radius = 0.35
shape.height = 1.6
var height_scale: float = _rig.scale.y if _rig else 1.0
shape.height = 1.6 * height_scale
collider.shape = shape
collider.position = Vector3(0, 0.8, 0)
collider.position = Vector3(0, 0.8 * height_scale, 0)
add_child(collider)
var _visual_seed := 0
@@ -72,8 +76,11 @@ var _rig: Node3D = null
var _head: Node3D = null
var _bob_phase := 0.0
var _guard_ref: Node3D = null
var _ring: MeshInstance3D = null
var _name_tag: Label3D = null
const SKIN_TONE := Color(0.88, 0.72, 0.60)
const PANTS_COLOR := Color(0.22, 0.22, 0.26)
const HAIR_COLORS := [Color(0.12, 0.1, 0.08), Color(0.35, 0.22, 0.12), Color(0.55, 0.42, 0.28), Color(0.15, 0.15, 0.18)]
func _build_body(npc_type: int) -> void:
_rig = Node3D.new()
@@ -96,14 +103,60 @@ func _build_body(npc_type: int) -> void:
# Arms
_add_capsule(_rig, 0.09, 0.7, Vector3(-0.42, 1.28, 0), limbs_color, 8.0)
_add_capsule(_rig, 0.09, 0.7, Vector3(0.42, 1.28, 0), limbs_color, -8.0)
# Head
# Neck, head, face, hair, shoes so the body reads as a person (ADR-0010).
_add_capsule(_rig, 0.08, 0.16, Vector3(0, 1.48, 0), SKIN_TONE)
_head = Node3D.new()
_head.name = "Head"
_head.position = Vector3(0, 1.62, 0)
_add_sphere(_head, 0.17, Vector3.ZERO, SKIN_TONE)
var hair_i := (_visual_seed * 7) % HAIR_COLORS.size()
_add_sphere(_head, 0.18, Vector3(0, 0.08, -0.02), HAIR_COLORS[hair_i])
_add_sphere(_head, 0.035, Vector3(-0.06, 0.02, 0.14), Color(0.08, 0.08, 0.1))
_add_sphere(_head, 0.035, Vector3(0.06, 0.02, 0.14), Color(0.08, 0.08, 0.1))
_rig.add_child(_head)
_add_box_prop(_rig, Vector3(0.16, 0.08, 0.28), Vector3(-0.16, 0.05, 0.02), Color(0.12, 0.12, 0.14))
_add_box_prop(_rig, Vector3(0.16, 0.08, 0.28), Vector3(0.16, 0.05, 0.02), Color(0.12, 0.12, 0.14))
_build_focus_ring()
_add_props(npc_type)
func _build_focus_ring() -> void:
_ring = MeshInstance3D.new()
_ring.name = "FocusRing"
var torus := TorusMesh.new()
torus.inner_radius = 0.16
torus.outer_radius = 0.20
torus.rings = 12
torus.ring_segments = 16
_ring.mesh = torus
var mat := StandardMaterial3D.new()
mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
mat.albedo_color = Color(0.95, 0.82, 0.28, 0.9)
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
_ring.material_override = mat
_ring.position = Vector3(0, 0.28, 0)
_ring.visible = false
_head.add_child(_ring)
_name_tag = Label3D.new()
_name_tag.name = "NameTag"
_name_tag.text = npc.profile.display_name if npc and npc.profile else ""
_name_tag.font_size = 28
_name_tag.pixel_size = 0.004
_name_tag.billboard = BaseMaterial3D.BILLBOARD_ENABLED
_name_tag.position = Vector3(0, 0.42, 0)
_name_tag.modulate = Color(0.95, 0.95, 0.9, 0.9)
_name_tag.visible = false
_head.add_child(_name_tag)
func set_focus_visual(focused: bool, menu_open: bool = false) -> void:
if _ring:
_ring.visible = focused
var mat := _ring.material_override as StandardMaterial3D
if mat:
mat.albedo_color = Color(1.0, 0.92, 0.35, 1.0) if menu_open else Color(0.95, 0.82, 0.28, 0.85)
_ring.scale = Vector3.ONE * (1.15 if menu_open else 1.0)
if _name_tag:
_name_tag.visible = focused
func _add_capsule(parent: Node3D, radius: float, height: float, pos: Vector3, color: Color, z_rot: float = 0.0) -> void:
var mi := MeshInstance3D.new()
var mesh := CapsuleMesh.new()
@@ -187,6 +240,10 @@ func _animate(delta: float) -> void:
_bob_phase = 0.0
_rig.position.y = lerpf(_rig.position.y, 0.0, 0.2)
_rig.rotation.x = lerpf(_rig.rotation.x, 0.0, 0.2)
if _ring and _ring.visible:
var cam := get_viewport().get_camera_3d() if get_viewport() else null
if cam:
_ring.look_at(cam.global_position, Vector3.UP)
# Attention cue: head turns toward the guard when awareness was raised.
if _head != null and npc.guard_noticed:
if _guard_ref == null or not is_instance_valid(_guard_ref):