Add supply auto-purchase and preserve save recovery state
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
extends RefCounted
|
||||
|
||||
## A genuine pre-v14 fixture must have no player automatic purchase intent.
|
||||
static func strip_empty(data: Dictionary) -> void:
|
||||
assert(data.has(&"auto_purchase_plans"))
|
||||
var plans: Dictionary = data[&"auto_purchase_plans"]
|
||||
assert(plans[&"version"] == 1 and (plans[&"plans"] as Array).is_empty())
|
||||
data.erase(&"auto_purchase_plans")
|
||||
@@ -0,0 +1 @@
|
||||
uid://dqjyetek8aurm
|
||||
Vendored
+1
@@ -2,6 +2,7 @@ extends RefCounted
|
||||
|
||||
## Build a genuine pre-v10 fixture only when no upkeep ledger history exists.
|
||||
static func strip_empty_upkeep(data: Dictionary) -> void:
|
||||
preload("res://tests/fixtures/pre_auto_purchase_runtime.gd").strip_empty(data)
|
||||
for entry: Dictionary in data[&"economy"][&"entries"]:
|
||||
assert(String(entry.get(&"category", "")) not in ["MAINTENANCE_ACCRUAL", "MAINTENANCE_PAYMENT"])
|
||||
data.erase(&"weather")
|
||||
|
||||
Reference in New Issue
Block a user