Connect physical elevators and staff commutes to construction, saves, and cutaway UI
This commit is contained in:
@@ -93,7 +93,7 @@ func _run() -> void:
|
||||
_test_corridors_and_primary_world_coexistence()
|
||||
_test_staff_door_access_and_stable_ids()
|
||||
_test_project_unproject_replay_and_defensive_queries()
|
||||
_test_vertical_topology_rejects_unchanged()
|
||||
_test_vertical_topology_projects_without_walk_bypass()
|
||||
_test_definition_and_instance_crosslink_validation()
|
||||
_test_project_and_unproject_failures_roll_back_exactly()
|
||||
_test_callback_reentry_tamper_and_quarantine_recovery()
|
||||
@@ -202,21 +202,17 @@ func _test_project_unproject_replay_and_defensive_queries() -> void:
|
||||
_expect(context.projector.projection_revision == 2, "project and unproject each advance exactly once")
|
||||
|
||||
|
||||
func _test_vertical_topology_rejects_unchanged() -> void:
|
||||
func _test_vertical_topology_projects_without_walk_bypass() -> void:
|
||||
var context := _context([Vector3i(0, 0, PathType.FRONT)])
|
||||
var before_projector: Dictionary = context.projector.create_snapshot()
|
||||
var before_source: Dictionary = context.source.create_snapshot()
|
||||
var before_adapter: Dictionary = context.adapter.create_snapshot()
|
||||
var before_path: Dictionary = context.path.create_snapshot()
|
||||
var guest_instance := _instance(GUEST_ELEVATOR, &"facility_00000005", Vector3i(4, 4, PathType.FRONT), 40, &"construction_00000005")
|
||||
var guest = context.projector.project_facility(&"guest_elevator", GUEST_ELEVATOR, guest_instance)
|
||||
_expect(guest.code == CommandResultType.Code.VALIDATION_FAILED and guest.details[&"reason"] == context.projector.REASON_UNSUPPORTED_VERTICAL_TOPOLOGY, "guest elevator explicitly reports unsupported vertical topology")
|
||||
_expect(guest.is_success(), "guest elevator projects completed shaft topology")
|
||||
var service_instance := _instance(SERVICE_ELEVATOR, &"facility_00000006", Vector3i(8, 4, PathType.BACK), 41, &"construction_00000006")
|
||||
var service = context.projector.project_facility(&"service_elevator", SERVICE_ELEVATOR, service_instance)
|
||||
_expect(service.code == CommandResultType.Code.VALIDATION_FAILED and service.details[&"reason"] == context.projector.REASON_UNSUPPORTED_VERTICAL_TOPOLOGY, "service elevator explicitly reports unsupported vertical topology")
|
||||
_expect(context.projector.create_snapshot() == before_projector, "unsupported vertical facilities leave projector state unchanged")
|
||||
_expect(context.source.create_snapshot() == before_source and context.adapter.create_snapshot() == before_adapter and context.path.create_snapshot() == before_path, "unsupported vertical facilities leave all authoritative dependencies unchanged")
|
||||
_expect(context.projector.get_processed_request_ids().is_empty(), "unsupported vertical rejection does not consume request IDs")
|
||||
_expect(service.is_success(), "service elevator projects completed shaft topology")
|
||||
_expect(context.path.find_path(Vector3i(4, 4, 0), Vector3i(4, 5, 0)).is_empty(), "guest shaft cannot be climbed without its separately owned cabin connector")
|
||||
_expect(context.path.find_path(Vector3i(8, 4, 1), Vector3i(8, 5, 1)).is_empty(), "service shaft cannot be climbed by ordinary walk edges")
|
||||
_expect(context.path.get_vertical_walk_blockers().size() == 2 and context.projector.validate_invariants()[&"ok"], "both completed elevator footprints retain authoritative owned shaft restrictions")
|
||||
|
||||
|
||||
func _test_definition_and_instance_crosslink_validation() -> void:
|
||||
|
||||
Reference in New Issue
Block a user