UI and other changes
This commit is contained in:
parent
87b5c11fcf
commit
215e24e246
79 changed files with 70023 additions and 2201 deletions
|
|
@ -553,15 +553,13 @@ func _fallback(r: GameTestRunner, sim: FarmSim) -> void:
|
|||
sim.animals.sync_from_state()
|
||||
|
||||
|
||||
func _hud(r: GameTestRunner, farm: Node3D, sim: FarmSim) -> void:
|
||||
var hud := farm.get_node("Hud/AssetHud") as AssetHud
|
||||
func _hud(r: GameTestRunner, _farm: Node3D, sim: FarmSim) -> void:
|
||||
var s := sim.campaign.state
|
||||
hud._process(0.0)
|
||||
var before := hud.describe()
|
||||
var before := " · ".join(PauseMenu.asset_counts(s))
|
||||
s.lose_animal(s.animals_total if not s.is_animal_lost(s.animals_total) else 1)
|
||||
hud._process(0.05)
|
||||
r.check(hud.describe() == "Crops %d/%d · Animals %d/%d · Supplies %d" % [s.crops, s.crops_total, s.animals, s.animals_total, s.supplies]
|
||||
and hud.describe() != before and hud._flash[1] > 0.0 and hud._flash_color[1] == AssetHud.LOSS, "the asset HUD updates and flashes red on a loss: '%s'" % hud.describe())
|
||||
var after := " · ".join(PauseMenu.asset_counts(s))
|
||||
r.check(after == "Crops %d/%d · Animals %d/%d · Supplies %d" % [s.crops, s.crops_total, s.animals, s.animals_total, s.supplies]
|
||||
and after != before, "the pause menu's assets count the loss: '%s'" % after)
|
||||
|
||||
|
||||
## The farm is stripped when the last supplies are carried off with every crop and animal gone.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue