Refine context actions and preserve fleet landings

This commit is contained in:
Loïc Wisniewski 2026-08-14 23:15:12 +02:00
commit 663648d949
20 changed files with 197 additions and 103 deletions

View file

@ -48,11 +48,13 @@ func _process(delta: float) -> bool:
1:
if elapsed < 1.2:
return false
if controller.current_extractor_index != extractor_index or not controller.action_button.visible:
return _fail("extractor did not expose a contextual action")
if not scene.get_node("UI/EnterAtmosphereButton").visible:
return _fail("extractor action hid the separate landing action")
controller._on_context_action_pressed()
if controller.current_extractor_index != extractor_index or not controller.transfer_button.visible:
return _fail("extractor did not expose the transfer shortcut")
if not controller.action_button.visible \
or controller.action_button.icon != controller.landing_button.icon \
or controller.landing_button.visible:
return _fail("landing was not folded into the shared action control")
controller._on_transfer_pressed()
if not controller.transfer_menu.visible or controller.transfer_list.extractor_index != extractor_index:
return _fail("transfer panel did not bind to the extractor")
var before: int = state.fleet_resource(resource_type)
@ -61,7 +63,7 @@ func _process(delta: float) -> bool:
return _fail("fleet did not fetch five resources from extractor")
if state.extractor_resource(extractor_index, resource_type) < 7:
return _fail("extractor transfer removed too much stock")
print("fleet fetched %s from extractor while landing remained available" % resource_type)
print("fleet fetched %s while landing remained the contextual action" % resource_type)
print("TEST_EXTRACTOR_TRANSFER: PASS")
quit(0)
return true