P14-02: Split warps into guest FRONT and staff BACK service warp (A08)
The FRONT Mana warp is guest-only: its connectors carry the "!staff" access, which path access checks treat as open to everyone except staff. A new 2x2 BACK service warp links only to other service warps for staff, with A07 values. Registry and palette now hold 25 definitions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
619b5e07ed
commit
8917c190cf
@@ -66,7 +66,7 @@ func _test_tick_command_execution() -> void:
|
||||
|
||||
func _test_starter_world_layers() -> void:
|
||||
_reset_runtime()
|
||||
_expect(_runtime.definition_registry.facility_count() == 24, "Runtime loads baseline sixteen plus stairs, the infirmary, premium room/dormitory, chapel and A07 warp")
|
||||
_expect(_runtime.definition_registry.facility_count() == 25, "Runtime loads baseline sixteen plus stairs, the infirmary, premium room/dormitory, chapel and A07/A08 warps")
|
||||
_expect(_runtime.definition_registry.has_facility(&"chapel"), "Runtime exposes the original chapel definition")
|
||||
var front_start := Vector3i(-2, 0, WorldService.LAYER_FRONT)
|
||||
var back_goal := Vector3i(2, 0, WorldService.LAYER_BACK)
|
||||
|
||||
@@ -16,7 +16,7 @@ func _run() -> void:
|
||||
_state = load("res://autoload/game_state.gd").new()
|
||||
_reset()
|
||||
_expect(_runtime.path_service.get_vertical_walk_requires_connector(), "new Runtime requires explicit vertical transport")
|
||||
_expect(_runtime.definition_registry.facility_count() == 24, "Runtime registers baseline16, stairs, infirmary, premium room/dormitory, chapel and A07 warp")
|
||||
_expect(_runtime.definition_registry.facility_count() == 25, "Runtime registers baseline16, stairs, infirmary, premium room/dormitory, chapel and A07/A08 warps")
|
||||
var before: Dictionary = _runtime.create_snapshot()
|
||||
var invalid := _command(&"build_facility", {&"definition_id": &"guest_stairs", &"origin": Vector3i(4, 3, 0)})
|
||||
_expect(not invalid.is_success() and invalid.details.get(&"reason") == &"STAIR_LANDING_MISSING", "stairs without a lower landing reject before any construction")
|
||||
|
||||
@@ -65,7 +65,7 @@ func _warp_events() -> Array[Dictionary]:
|
||||
|
||||
|
||||
func _write() -> void:
|
||||
_expect(_cmd(&"change_resources", {&"deltas": {&"gold": 6000, &"materials": 40}}).is_success(), "fund two warps for the fixture")
|
||||
_expect(_cmd(&"change_resources", {&"deltas": {&"gold": 12000, &"materials": 100}}).is_success(), "fund four warps for the fixture")
|
||||
var gold_before: int = _state.get_resource(&"gold")
|
||||
if not _build(&"mana_warp", Vector3i(0, 0, 0)) or not _build(&"reception", Vector3i(2, 0, 0)):
|
||||
return
|
||||
@@ -86,6 +86,17 @@ func _write() -> void:
|
||||
_expect(connector[&"from"] == Vector3i(0, 0, 0) and connector[&"to"] == Vector3i(0, 2, 0) and connector[&"operational_state"] == PathService.CONNECTOR_OPERATIONAL, "connector joins both warp origins and is operational")
|
||||
_expect(_runtime.path_service.find_path(Vector3i(0, 0, 0), Vector3i(0, 2, 0)) == [Vector3i(0, 0, 0), Vector3i(0, 2, 0)], "path crosses floors in one instant step")
|
||||
_expect(_runtime.mana_network_service.get_total_consumer_demand() >= 2, "each warp registers 1 Mana upkeep")
|
||||
_expect(_runtime.path_service.find_path(Vector3i(0, 0, 0), Vector3i(0, 2, 0), [WorldService.LAYER_FRONT, WorldService.LAYER_BACK], [&"staff"]).is_empty(), "staff routes never use the guest warp (A08)")
|
||||
_expect(_build(&"service_warp", Vector3i(0, 0, 1)), "build lower BACK service warp")
|
||||
_clock.advance_minutes(360)
|
||||
_expect(_build(&"service_warp", Vector3i(0, 2, 1)), "build upper BACK service warp on the completed one")
|
||||
_clock.advance_minutes(360)
|
||||
_clock.advance_minutes(10 - int(_clock.absolute_minute) % 10)
|
||||
_expect(_warp_connectors().size() == 2, "service warps link only to each other, never to guest warps")
|
||||
var staff_route: Array = _runtime.path_service.find_path(Vector3i(0, 0, 1), Vector3i(0, 2, 1), [WorldService.LAYER_FRONT, WorldService.LAYER_BACK], [&"staff"])
|
||||
_expect(staff_route == [Vector3i(0, 0, 1), Vector3i(0, 2, 1)], "staff cross floors through the BACK service warp")
|
||||
_expect(_runtime.path_service.find_path(Vector3i(0, 0, 1), Vector3i(0, 2, 1)).is_empty(), "guests cannot use the service warp")
|
||||
_expect(_runtime.call(&"_warp_step_connector", Vector3i(0, 0, 1), Vector3i(0, 2, 1), [&"staff"] as Array[StringName]) != &"", "a staff step through the service warp is fare-bearing")
|
||||
|
||||
# Outage and an unaffordable fare both remove the warp from routing.
|
||||
var before_outage: Dictionary = _runtime.create_snapshot()
|
||||
|
||||
@@ -131,8 +131,8 @@ func _run() -> void:
|
||||
)
|
||||
await _test_defense_notice()
|
||||
var palette := _main.find_child("BuildPalette", true, false) as GridContainer
|
||||
_expect(palette.get_child_count() == 24, "all24 facilities including the cleaning room and A07 warp appear in the build palette")
|
||||
_expect((_main.get("build_buttons") as Dictionary).has(&"mana_warp"), "Mana warp is buildable from the ordinary palette")
|
||||
_expect(palette.get_child_count() == 25, "all25 facilities including the cleaning room and both A07/A08 warps appear in the build palette")
|
||||
_expect((_main.get("build_buttons") as Dictionary).has(&"mana_warp") and (_main.get("build_buttons") as Dictionary).has(&"service_warp"), "guest and service Mana warps are buildable from the ordinary palette")
|
||||
var iconized_build_buttons := 0
|
||||
for build_button_value: Variant in (_main.get("build_buttons") as Dictionary).values():
|
||||
if (build_button_value as Button).icon != null:
|
||||
|
||||
Reference in New Issue
Block a user