P08-02: 旧配置の安全な変更
This commit is contained in:
Vendored
+6
@@ -11,6 +11,12 @@ The fixture derives and records this deficit from the actual registry/catalogs
|
||||
in identity.diagnostic_budget before using the existing change_resources command.
|
||||
No price or production coefficient is changed.
|
||||
|
||||
Stair preparation proceeds from floor 1 through floor 3. Each pair finishes
|
||||
using the maximum registered stair build_minutes before the next floor is
|
||||
ordered. Ground landings use initialized world paths; upper landings are
|
||||
created by completed stairs through build_facility, with a local path check
|
||||
before each pair. Failed commands include kind, payload and result details.
|
||||
|
||||
The first legacy premium job progresses while the six actor/transport facets
|
||||
are prepared. The second is paid and reserved immediately before saving, with
|
||||
zero progress; the dormitory is already complete. All three stages share the
|
||||
|
||||
Vendored
+8
-2
@@ -21,7 +21,9 @@ func expect(ok: bool, label: String) -> bool:
|
||||
func command(kind: StringName, payload: Dictionary) -> bool:
|
||||
serial += 1
|
||||
var result: CommandResult = runtime.submit_command(kind, payload, &"player", &"", 0, -1, StringName("p08.%d" % serial))
|
||||
return expect(result.is_success(), String(kind) + ": " + result.message)
|
||||
var label := String(kind) + ": " + result.message
|
||||
if not result.is_success(): label += " payload=" + var_to_str(payload) + " details=" + var_to_str(result.details)
|
||||
return expect(result.is_success(), label)
|
||||
func registry(old: bool) -> void:
|
||||
var paths: Array[String] = FacilityCatalog.FACILITY_PATHS + FacilityCatalog.INFRASTRUCTURE_FACILITY_PATHS + FacilityCatalog.RESCUE_FACILITY_PATHS
|
||||
paths.append_array(["res://tests/fixtures/legacy_premium_room.tres", "res://tests/fixtures/legacy_staff_dormitory.tres"] if old else ["res://data/facilities/expansion/premium_room.tres", "res://data/facilities/expansion/staff_dormitory.tres"])
|
||||
@@ -102,9 +104,13 @@ func setup(operations: bool) -> bool:
|
||||
for row: Array in [[&"warehouse",Vector3i(-8,0,1)],[&"kitchen",Vector3i(2,0,1)],[&"infirmary",Vector3i(6,0,1)],[&"staff_door",Vector3i(0,0,1)],[&"reception",Vector3i(-6,0,0)],[&"reception",Vector3i(5,0,0)],[&"guest_elevator",Vector3i.ZERO]]:
|
||||
if not build(row[0],row[1],false): return false
|
||||
clock.advance_minutes(180)
|
||||
# Completed stairs supply the next floor's landing through the domain projector.
|
||||
# Ground-floor landings come from the initialized world; never inject path cells.
|
||||
var stair_minutes: int = maxi(runtime.definition_registry.get_facility(&"service_stairs").build_minutes,runtime.definition_registry.get_facility(&"guest_stairs").build_minutes)
|
||||
for y: int in [1,2,3]:
|
||||
if not expect(runtime.path_service.has_cell(Vector3i(-9,y-1,1)) and runtime.path_service.has_cell(Vector3i(4,y-1,0)),"completed lower stair landings for floor %d" % y): return false
|
||||
if not build(&"service_stairs",Vector3i(-9,y,1),false) or not build(&"guest_stairs",Vector3i(4,y,0),false): return false
|
||||
clock.advance_minutes(runtime.definition_registry.get_facility(&"guest_stairs").build_minutes)
|
||||
clock.advance_minutes(stair_minutes)
|
||||
if not build(&"staff_dormitory",Vector3i(-8,2,1)): return false
|
||||
identity[&"dorm"] = instance(&"staff_dormitory").instance_id
|
||||
if not build(&"premium_room",Vector3i(-6,2,0),false): return false
|
||||
|
||||
Reference in New Issue
Block a user