Implement Phase 8: Rig Relocation and Component Modularization
- Moved the rig scene from `res://master_rig.tscn` to `res://scenes/stickman_rig.tscn`, preserving its UID. - Split the `StickmanRig` controller into three components: `StickmanLocomotion`, `StickmanRagdoll`, and `StickmanActionRunner`. - Updated the architecture to ensure `StickmanRig` acts as the public facade for the new components. - Created a new test suite `test_phase8_rig_modularization.gd` to verify the integrity of the relocated rig and its components. - Added checks for scene loading, component resolution, action queue delegation, and state authority.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# test_phase3b_library.gd
|
||||
# Headless tests for Phase 3b Asset Library (no pixel rendering):
|
||||
# 1. StickmanLibrary.scan() returns 3 entries (test/basic/break) sorted by
|
||||
# 1. StickmanLibrary.scan() returns the 4 checked-in entries sorted by
|
||||
# display name; empty stickman_name falls back to the filename basename.
|
||||
# 2. Corrupt / body-parts-less .stk files are skipped (scan dir override).
|
||||
# 3. make_entry() valid path -> name+data; missing/corrupt path -> {}.
|
||||
@@ -70,11 +70,11 @@ func _test_scan() -> void:
|
||||
print("--- StickmanLibrary.scan() ---")
|
||||
var lib = STICKMAN_LIBRARY.new()
|
||||
var entries: Array[Dictionary] = lib.scan()
|
||||
_check(entries.size() == 3, "scan returns 3 entries (got %d)" % entries.size())
|
||||
_check(entries.size() == 4, "scan returns 4 entries (got %d)" % entries.size())
|
||||
var names: Array[String] = []
|
||||
for e: Dictionary in entries:
|
||||
names.append(String(e["name"]))
|
||||
_check(names == ["Basic", "break", "test"],
|
||||
_check(names == ["Basic", "Basic Broken", "break", "test"],
|
||||
"entries sorted by display name (got %s)" % str(names))
|
||||
_check(String(_by_path(entries, "basic.stk")["name"]) == "Basic",
|
||||
"basic.stk display name is 'Basic' (stickman_name)")
|
||||
|
||||
Reference in New Issue
Block a user