Resolve final STINIT object payloads
This commit is contained in:
@@ -646,6 +646,12 @@ def attach_stage_object_placements(
|
||||
and definition["uses_runtime_state_sprite_row"]
|
||||
and "0xe73bb" in payload):
|
||||
obj["initial_object_state_id"] = payload.pop("0xe73bb")
|
||||
elif type_id == 27 and payload:
|
||||
# FIELD's dedicated otherworld-gate branch consumes the common
|
||||
# schedule and coordinates, then calls ADDEN's hard-coded slot-0
|
||||
# special-unit path. It never reads either tagged payload cell.
|
||||
obj["ignored_payload_fields"] = payload
|
||||
payload = {}
|
||||
unknown = payload
|
||||
if unknown:
|
||||
obj["unknown_fields"] = unknown
|
||||
@@ -781,7 +787,8 @@ def write_data_index(data_dir: Path) -> None:
|
||||
"STINIT additionally joins confirmed parallel buffers into per-slot `object_placements`",
|
||||
"and `enemy_spawns`. Its object type ids join to OBINIT's authoritative names and",
|
||||
"available descriptions; consumer-proven tagged payload variants receive semantic names while",
|
||||
"unresolved type-specific/mode parameters remain in `unknown_fields`.",
|
||||
"engine-dead tagged writes remain in `ignored_payload_fields` and unresolved",
|
||||
"type-specific/mode parameters remain in `unknown_fields`.",
|
||||
"Use `tools/init_table_profile.py <TABLE> --build` to generate value/population and",
|
||||
"direct-consumer evidence.",
|
||||
"",
|
||||
|
||||
@@ -186,10 +186,17 @@ def test_real_mixed_table() -> None:
|
||||
check(spike["initial_object_state_id"] == 2
|
||||
and "non_triggering_faction_id" not in spike,
|
||||
"STINIT spikes expose state without inventing the excluded faction gate")
|
||||
ignored_objects = [
|
||||
obj for obj in all_objects if "ignored_payload_fields" in obj
|
||||
]
|
||||
check(len(ignored_objects) == 3
|
||||
and {obj["type_id"] for obj in ignored_objects} == {27}
|
||||
and {tuple(obj["ignored_payload_fields"].items()) for obj in ignored_objects}
|
||||
== {(("0xe73bb", 2),)},
|
||||
"STINIT preserves explicitly written but engine-ignored type-27 payloads")
|
||||
unknown_objects = [obj for obj in all_objects if "unknown_fields" in obj]
|
||||
check(len(unknown_objects) == 3
|
||||
and {obj["type_id"] for obj in unknown_objects} == {27},
|
||||
"STINIT preserves unresolved tagged object payloads as raw evidence")
|
||||
check(not unknown_objects,
|
||||
"STINIT has no unresolved populated tagged object payloads")
|
||||
extract_init.attach_stage_enemy_spawns(records)
|
||||
first_spawn = records[0]["enemy_spawns"][0]
|
||||
check(first_spawn == {
|
||||
|
||||
Reference in New Issue
Block a user