Wire the crowd variants into per-role pools and verify every seed resolves
Full build / Import + headless tests (push) Successful in 55s
Full build / Full desktop build + optional release (push) Skipped

This commit is contained in:
zwitschi committed 2026-11-04 11:03:01 +01:00
1 parent 4e8665e25b
commit 6052ea391b
3 files changed
+35 -28

No files matched your search

+10 -3
View File
@@ -180,10 +180,12 @@ func test_pose_reaches_the_skeleton_bones() -> bool:
return a and b and c and d
func test_character_selection_is_deterministic_and_complete() -> bool:
# Seed 5 resolves each role to a fixed pool member; the routine crowd roles
# now pick from the crowd-variety pools instead of a single npc_casual.
var expected := {
Rules.NpcType.TOURIST: "npc_casual",
Rules.NpcType.CONFUSED_VISITOR: "npc_casual",
Rules.NpcType.INTOXICATED: "npc_casual",
Rules.NpcType.TOURIST: "npc_crowd_d",
Rules.NpcType.CONFUSED_VISITOR: "npc_crowd_b",
Rules.NpcType.INTOXICATED: "npc_crowd_c",
Rules.NpcType.AUTHORIZED_STAFF: "npc_jacket",
Rules.NpcType.PROTESTER: "npc_jacket",
Rules.NpcType.INFLUENCER: "npc_coat",
@@ -201,6 +203,11 @@ func test_character_selection_is_deterministic_and_complete() -> bool:
problems.append("%s missing" % model)
if NpcAvatar.character_model_for(npc_type, 5) != model:
problems.append("%d is not seed-stable" % npc_type)
# Every seed in a role's pool must resolve to a committed library model.
for seed_value in [0, 1, 2, 3, 4]:
var pooled := NpcAvatar.character_model_for(npc_type, seed_value)
if not ResourceLoader.exists(NpcAvatar.BLENDER_NPC_DIR + pooled + ".glb"):
problems.append("%d seed %d -> %s missing" % [npc_type, seed_value, pooled])
# Seed-alternating variants still resolve to a library model.
for seed_value in [1, 2, 3, 4, 5, 6]:
var variant := NpcAvatar.character_model_for(Rules.NpcType.TRESPASSER, seed_value)