Implement TODO backlog: LATE phase fix, protester, CALL_SOMEONE, door lock, flashlight, persistence, navmesh, JSON localization, and release tooling
CI / headless-tests (push) Successful in 55s

- Fix LATE shift phase (start 700s) so the violent-threat event is reachable
- Add PROTESTER archetype (rules, profile, colors, events in public venues)
- Add CALL_SOMEONE reaction (FSM -> ARGUING, influencer/trespasser/protester weights)
- Door lock: DoorState core class, L binding, red/green visual indicator,
  locked doors thwart FORCE_ENTRY
- Flashlight: G binding, SpotLight3D, perception radius bonus at evening/late
- Persistence: save shift results via Save autoload, history + best score on
  review screen, round-trip test
- Navigation: flat NavigationRegion3D navmesh, NavigationAgent3D path following
  with direct-movement fallback; steps made visual-only so NPCs reach entrance
- Localization: strings moved to content/strings.en.json (loader keeps
  lookup/fmt signatures; coverage test over all keys)
- Distribution: export_presets.cfg (Linux/Windows/macOS), tools/build_releases.sh,
  docs/RELEASING.md, prominent README Downloads section
- Remove stale signal_bus.gd (invalid static-signal experiment)
- Tests: 53 passing across 9 suites
This commit is contained in:
zwitschi committed 2026-10-31 12:51:13 +01:00
1 parent c808165302
commit 1e972a7490
27 files changed
+1044 -340

No files matched your search

+36
View File
@@ -41,6 +41,42 @@ var _spawn_count := 0
func _on_spawn(_profile: NpcProfile, _intent: String, _id: String) -> void:
_spawn_count += 1
func test_late_phase_reaches_violent_event() -> bool:
## Bug fix: the LATE phase never fired because no shift_phases entry existed.
var scenario: VenueScenario = ScenarioFactory.hollywood_building()
var coordinator := ShiftCoordinator.new()
coordinator.setup(scenario, 900.0, 1)
coordinator.start()
for i in 760:
coordinator.tick(1.0)
var a := TestUtils.check_eq(coordinator.current_phase, Rules.Phase.LATE, "LATE phase reached by 760s")
var eligible := scenario.events_in_phase(Rules.Phase.LATE)
var found := false
for e in eligible:
if e.get("id", "") == "violent_emergency_event":
found = true
var b := TestUtils.check(found, "violent event is eligible in LATE phase")
# All venues declare the LATE phase honestly.
var c := true
for venue in [ScenarioFactory.hollywood_building(), ScenarioFactory.joke_shop(), ScenarioFactory.tv_studio()]:
if not venue.shift_phases.has(Rules.Phase.LATE):
c = false
return a and b and TestUtils.check(c, "all venues declare a LATE phase")
func test_protester_archetype_present() -> bool:
var profiles := ScenarioFactory.shared_profiles()
var protester_found := false
for p in profiles:
if p.id == "protester":
protester_found = true
var a := TestUtils.check(protester_found, "protester profile defined")
var in_pool := false
for venue in [ScenarioFactory.hollywood_building(), ScenarioFactory.tv_studio()]:
for e in venue.event_pool:
if e.get("npc_type", -1) == Rules.NpcType.PROTESTER:
in_pool = true
return a and TestUtils.check(in_pool, "protester event referenced in public venues")
func test_shift_coordinator_runs_a_shift() -> bool:
var scenario: VenueScenario = ScenarioFactory.hollywood_building()
var coordinator := ShiftCoordinator.new()