Connect physical elevators and staff commutes to construction, saves, and cutaway UI
This commit is contained in:
@@ -384,13 +384,13 @@ func _test_snapshot_roundtrip_and_atomic_rejection() -> void:
|
||||
)
|
||||
original.record_actor_progress(&"off_graph_actor", Vector3i(4, 4, 0), 12)
|
||||
var snapshot := original.create_snapshot()
|
||||
_expect(int(snapshot[&"schema_version"]) == 3, "request-safe traffic snapshot uses schema version 3")
|
||||
_expect(int(snapshot[&"schema_version"]) == 4, "shaft-safe traffic snapshot uses schema version 4")
|
||||
_expect(snapshot.has(&"cell_traffic") and snapshot.has(&"actor_cells"), "snapshot persists traffic and occupancy projection")
|
||||
_expect(not snapshot.has(&"graph") and not snapshot.has(&"cache"), "snapshot still excludes derived graph and cache")
|
||||
var restored = PathServiceScript.new()
|
||||
_expect(restored.restore_snapshot(snapshot), "v3 snapshot restores before authoritative world graph")
|
||||
_expect(restored.restore_snapshot(snapshot), "v4 snapshot restores before authoritative world graph")
|
||||
_expect(restored.rebuild_graph([from_cell, to_cell]), "restored traffic validates against authoritative cells")
|
||||
_expect(restored.create_snapshot() == snapshot, "v3 snapshot roundtrip is exact")
|
||||
_expect(restored.create_snapshot() == snapshot, "v4 snapshot roundtrip is exact")
|
||||
_expect(restored.get_current_density(from_cell) == 1, "restored density is derived consistently from actors")
|
||||
_expect(restored.elevator_queue_size(&"lift_save") == 1, "restored elevator retains its request queue")
|
||||
|
||||
@@ -407,6 +407,7 @@ func _test_snapshot_roundtrip_and_atomic_rejection() -> void:
|
||||
v2_snapshot[&"schema_version"] = 2
|
||||
v2_snapshot.erase(&"known_elevator_request_ids")
|
||||
v2_snapshot.erase(&"active_elevator_units")
|
||||
v2_snapshot.erase(&"vertical_walk_blockers")
|
||||
var v2_restored = PathServiceScript.new()
|
||||
_expect(v2_restored.restore_snapshot(v2_snapshot), "schema v2 snapshot remains readable")
|
||||
_expect(v2_restored.rebuild_graph([from_cell, to_cell]), "schema v2 traffic validates against authoritative cells")
|
||||
|
||||
Reference in New Issue
Block a user