P06-01: Fix review r01 findings for A06 reserve
Settle Mana raised above capacity between boundaries as recorded overflow instead of rejecting saves or latching a fault, exclude destroyed facilities from upkeep demand, and keep the depletion drill's outage sustained. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
65534cfd15
commit
f247d19325
@@ -1,4 +1,5 @@
|
||||
extends SceneTree
|
||||
const ManaOutage = preload("res://tests/helpers/mana_outage.gd")
|
||||
var checks := 0
|
||||
var failures := 0
|
||||
func _initialize() -> void:
|
||||
@@ -31,11 +32,12 @@ func _run() -> void:
|
||||
runtime.free(); clock.free(); state.free(); quit(failures); return
|
||||
# Only reserve depletion is a diagnostic input; no numeric generation policy
|
||||
# is asserted by this test. Everything else advances through Runtime ticks.
|
||||
state.set_resource(&"mana", 0)
|
||||
ManaOutage.hold(runtime, state)
|
||||
# Pre-fix saves legitimately contain zero reserve with old powered flags.
|
||||
var legacy: Dictionary = runtime.create_snapshot()
|
||||
var legacy_data: Dictionary = legacy[&"systems"][&"runtime"]
|
||||
legacy_data[&"runtime_schema_version"] = 9
|
||||
legacy_data.erase(&"mana_reserve")
|
||||
preload("res://tests/fixtures/pre_upkeep_runtime.gd").strip_empty_upkeep(legacy_data)
|
||||
var source_copy := legacy.duplicate(true)
|
||||
var old_reception_id := reception.instance_id
|
||||
@@ -65,7 +67,7 @@ func _run() -> void:
|
||||
var room_id := room.instance_id
|
||||
var reception_id := reception.instance_id
|
||||
runtime.facility_service.set_operational_status(room_id, {&"suspension_reason": &"DESTROYED"}, clock.absolute_minute)
|
||||
state.set_resource(&"mana", 1)
|
||||
ManaOutage.release(runtime, state, 1)
|
||||
clock.advance_minutes(1)
|
||||
room = runtime.facility_service.get_instance(room_id)
|
||||
reception = runtime.facility_service.get_instance(reception_id)
|
||||
|
||||
Reference in New Issue
Block a user