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
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:
1 parent
c808165302
commit
1e972a7490
27 files changed
+1044
-340
No files matched your search
@@ -0,0 +1,34 @@
|
||||
extends RefCounted
|
||||
## Headless tests for the procedural world and navigation mesh.
|
||||
|
||||
const WorldBuilder := preload("res://src/game/world_builder.gd")
|
||||
|
||||
func test_navmesh_built() -> bool:
|
||||
var root := Node3D.new()
|
||||
WorldBuilder.new(root).build()
|
||||
var region: NavigationRegion3D = root.find_child("NavRegion", true, false) as NavigationRegion3D
|
||||
if region == null:
|
||||
return TestUtils.fail("no NavRegion in world")
|
||||
var mesh: NavigationMesh = region.navigation_mesh
|
||||
if mesh == null:
|
||||
return TestUtils.fail("NavRegion has no navigation mesh")
|
||||
var a := TestUtils.check(mesh.get_polygon_count() > 0, "navmesh has polygons")
|
||||
var b := TestUtils.check(mesh.get_vertices().size() >= 4, "navmesh has vertices")
|
||||
root.free()
|
||||
return a and b
|
||||
|
||||
func test_door_indicator_built() -> bool:
|
||||
var root := Node3D.new()
|
||||
var builder := WorldBuilder.new(root)
|
||||
builder.build()
|
||||
var a := TestUtils.check(builder.door_indicator != null, "door indicator mesh exists")
|
||||
if builder.door_indicator != null:
|
||||
builder.set_door_locked(true)
|
||||
var mat: StandardMaterial3D = builder.door_indicator.material_override as StandardMaterial3D
|
||||
var b := TestUtils.check(mat != null and mat.albedo_color.r > 0.5, "indicator turns red when locked")
|
||||
builder.set_door_locked(false)
|
||||
var c := TestUtils.check(mat != null and mat.albedo_color.g > 0.5, "indicator turns green when open")
|
||||
root.free()
|
||||
return a and b and c
|
||||
root.free()
|
||||
return a
|
||||
Reference in new issue
Block a user