test(@projects/@magic-civilization): 🐛 use typed p0 for the last two traded_luxuries clears

Lines 33/47 still assigned through the untyped GameState.players[0] Variant
(Array → Array[String] type error). Use the typed p0 (same object). Clears
test_save_load_round_trip entirely.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-24 04:38:17 -04:00
parent e3aefc9f12
commit 5e19e53936

View file

@ -30,7 +30,7 @@ func test_traded_luxuries_round_trips() -> void:
p0.traded_luxuries = lux0
SaveManagerScript.save_game(0)
GameState.players[0].traded_luxuries = []
p0.traded_luxuries = []
var err: Error = SaveManagerScript.load_game(0)
assert_eq(err, OK, "load_game must succeed")
@ -44,7 +44,7 @@ func test_traded_luxuries_empty_round_trips() -> void:
SaveManagerScript.save_game(0)
var lux_iron: Array[String] = ["iron"]
GameState.players[0].traded_luxuries = lux_iron
p0.traded_luxuries = lux_iron
var err: Error = SaveManagerScript.load_game(0)
assert_eq(err, OK, "load_game must succeed")