Add transfer amounts and active gas vents

This commit is contained in:
Loïc Wisniewski 2026-08-14 13:44:10 +02:00
commit e4df9bc41a
8 changed files with 147 additions and 12 deletions

View file

@ -180,11 +180,22 @@ func _process(delta: float) -> bool:
# The handler working while the BUTTON is inert is the exact bug
# class this project keeps hitting, so one press goes the long way.
var bank_at_tap: int = game_state.rocks
_tap(scene.get_node("UI/TransferMenu/ResourceList/OreToFleetButton"))
var resource_list: Node = scene.get_node("UI/TransferMenu/ResourceList")
# Default is ALL. One minus selects 25, proving the amount control
# affects a real transfer rather than only changing its caption.
_tap(resource_list.get_node("OreDecreaseButton"))
_tap(resource_list.get_node("OreToFleetButton"))
_expect(game_state.fleet_cargo == mini(GameState.CARGO_LOAD_BATCH, bank_at_tap),
"selected 25 but the real tap loaded %d" % game_state.fleet_cargo)
_expect(game_state.rocks == bank_at_tap - game_state.fleet_cargo,
"the bank did not pay the selected transfer amount")
# Back to ALL and move the remainder, preserving the original
# end-to-end all-transfer coverage as well.
_tap(resource_list.get_node("OreIncreaseButton"))
_tap(resource_list.get_node("OreToFleetButton"))
_expect(game_state.fleet_cargo == bank_at_tap,
"a real tap did not load all banked ore")
_expect(game_state.rocks == 0,
"the bank did not pay for the tapped withdrawal")
"switching back to ALL did not load the remainder")
_expect(game_state.rocks == 0, "ALL left ore in the bank")
# --- 7. conservation ----------------------------------------
_expect(_total() == total_before,