Mitigate CI cache timeouts and wire venue door-staff dialogue
Full build / Import + headless tests (push) Successful in 33s
Full build / Full desktop build + optional release (push) Skipped

- Drop actions/cache@v4 from the checks job: the Gitea runner cannot reach
  GitHub's cache service (/twirp/...CacheService timeouts, ~2min retries);
  Godot import is fast enough without it. Add GODOT_SILENCE_ROOT_WARNING=1.
- Document the cache situation and re-enable path in docs/RELEASING.md
- VenueScenario.door_staff_line(context, rng): seeded-random venue lines
- GameManager logs id/ticket/wand-check, refusal, and prohibited-item lines
  from the venue scenario (Joke Shop flavor) during inspection/screening
- Test coverage: all Joke Shop contexts, unknown contexts, empty venues,
  deterministic seeded picks (54 tests pass)
This commit is contained in:
zwitschi committed 2026-10-31 13:13:25 +01:00
1 parent a3768c2ce4
commit 0b5cd772a5
8 files changed
+142 -7

No files matched your search

+17
View File
@@ -68,6 +68,23 @@ func _spot_for_intent(intent: String) -> String:
_:
return "sidewalk"
## Pick a random door-staff line for a context key (e.g. "id_check",
## "ticket_check", "wand_check", "refusal", "prohibited_item"). Returns ""
## when the venue has no lines for that context. Deterministic when a seeded
## RNG is injected; otherwise returns the first line.
func door_staff_line(context: String, rng: RandomNumberGenerator = null) -> String:
if not door_staff_lines.has(context):
return ""
var lines: Variant = door_staff_lines[context]
if not (lines is Array):
return ""
var pool: Array = lines
if pool.is_empty():
return ""
if rng != null:
return str(pool[rng.randi_range(0, pool.size() - 1)])
return str(pool[0])
func _location_or_default(spot: String, fallback: Vector3) -> Vector3:
if locations.has(spot):
var v: Variant = locations[spot]
+30
View File
@@ -50,11 +50,15 @@ var current_npc_truth := {"weapons_seen": false, "danger_level": 0}
const VENUE_ORDER := ["hollywood_building", "joke_shop", "tv_studio"]
var _venue_index := 0
## RNG for venue door-staff lines so repeated interactions vary.
var _door_rng := RandomNumberGenerator.new()
## Aim-free targeting: cycle through nearby NPCs with Tab (accessibility).
const NEARBY_RADIUS := 12.0
var _nearby_index := -1
func _ready() -> void:
_door_rng.randomize()
scene_root = Node3D.new()
scene_root.name = "SceneRoot"
add_child(scene_root)
@@ -469,6 +473,10 @@ func _toggle_inspection() -> void:
var artifacts := _artifacts_for(controller)
var result: Dictionary = verifier.verify(artifacts, selected_scenario.access_policy)
hud.show_inspection(controller, artifacts, result)
# Venue door-staff flavor: an applicable check line (PLAN.md: door-staff dialogue).
var line := _door_context_line()
if line != "":
hud.log(line)
# ------------------------------------------------------------- wand screening --
@@ -490,6 +498,9 @@ func _toggle_wand_screening() -> void:
var result: Dictionary = wand_screener.screen(items)
wand_open = true
hud.show_wand(controller, result)
var wand_line := selected_scenario.door_staff_line("wand_check", _door_rng)
if wand_line != "":
hud.log(wand_line)
## Resolve a wand screening: the player decides whether to admit the guest.
func decide_wand(allowed: bool) -> void:
@@ -514,6 +525,11 @@ func decide_wand(allowed: bool) -> void:
if decision.get("prohibited", false) and allowed:
hud.log(Strings.fmt("wand.admitted_prohibited", [name]))
coordinator.reputation.apply("security_failure", -5.0, "admitted prohibited item")
elif decision.get("prohibited", false) and not allowed:
var ban_line := selected_scenario.door_staff_line("prohibited_item", _door_rng)
if ban_line != "":
hud.log(ban_line)
coordinator.reputation.apply("access_judgment", 1.0, "correct prohibited-item refusal")
elif decision.get("false_alarm", false) and not allowed:
hud.log(Strings.fmt("wand.denied_false_alarm", [name]))
coordinator.reputation.apply("complaint", -2.0, "false-alarm refusal")
@@ -557,6 +573,9 @@ func decide_access(allowed: bool) -> void:
audio.play_confirm()
else:
hud.log(Strings.fmt("access.denied", ["; ".join(result.get("issues", []))]))
var refusal_line := selected_scenario.door_staff_line("refusal", _door_rng)
if refusal_line != "":
hud.log(refusal_line)
coordinator.reputation.apply("access_judgment", 1.0, "correct refusal")
if audio:
audio.play_deny()
@@ -571,6 +590,17 @@ func decide_access(allowed: bool) -> void:
hud.hide_inspection()
inspection_open = false
## Venue-specific opening line for the access inspection (e.g. The Joke Shop's
## ID / ticket check lines). Returns "" when the venue has no matching lines.
func _door_context_line() -> String:
if selected_scenario == null:
return ""
if selected_scenario.access_policy.require_id:
return selected_scenario.door_staff_line("id_check", _door_rng)
if selected_scenario.access_policy.requires(Rules.AccessKind.TICKET):
return selected_scenario.door_staff_line("ticket_check", _door_rng)
return ""
func _artifacts_for(controller: Object) -> Array:
var profile: Object = controller.profile
var npc_type: int = profile.npc_type if profile else -1
+24
View File
@@ -63,6 +63,30 @@ func test_late_phase_reaches_violent_event() -> bool:
c = false
return a and b and TestUtils.check(c, "all venues declare a LATE phase")
func test_door_staff_lines_available() -> bool:
var scenario: VenueScenario = ScenarioFactory.joke_shop()
var rng := RandomNumberGenerator.new()
rng.seed = 7
var ok := true
for context in ["id_check", "ticket_check", "wand_check", "refusal", "prohibited_item"]:
var line: String = scenario.door_staff_line(context, rng)
if line == "":
ok = false
var a := TestUtils.check(ok, "all joke-shop contexts have a door-staff line")
var b := TestUtils.check_eq(scenario.door_staff_line("unknown_context", rng), "", "unknown context returns empty")
var b_country := ScenarioFactory.hollywood_building()
var c := TestUtils.check_eq(b_country.door_staff_line("refusal", rng), "", "venue without lines returns empty")
# Same seed picks the same line.
var r0 := RandomNumberGenerator.new()
r0.seed = 11
var r1 := RandomNumberGenerator.new()
r1.seed = 11
var d := TestUtils.check_eq(
scenario.door_staff_line("wand_check", r0),
scenario.door_staff_line("wand_check", r1),
"seeded door-staff pick is deterministic")
return a and b and c and d
func test_protester_archetype_present() -> bool:
var profiles := ScenarioFactory.shared_profiles()
var protester_found := false