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

@ -2,14 +2,8 @@ extends SceneTree
# Headless gameplay test: run with
# godot --headless -s res://tests/test_planet_prompt_map_interaction.gd
# Regression test for a real bug: EnterAtmosphereButton (shown while
# standing on a planet, bottom-center) and the world map's own
# RecenterButton (also bottom-center) occupy the exact same screen
# position. Opening the map while standing on a planet must suppress the
# enter-atmosphere prompt entirely - not just let it sit hidden behind
# the map's backdrop, since closing the map would then abruptly reveal it
# at the same instant RecenterButton disappears (which is what most
# plausibly explains "buttons blinking/disappearing").
# Opening the map while standing on a planet must suppress the shared
# contextual action and planet label, then restore them after closing.
var main_scene: Node
var fleet: Node
@ -48,7 +42,7 @@ func _initialize() -> void:
world_map = main_scene.get_node("UI/WorldMap")
map_button = main_scene.get_node("UI/MapButton")
planet_name_label = main_scene.get_node("UI/PlanetNameLabel")
enter_button = main_scene.get_node("UI/EnterAtmosphereButton")
enter_button = main_scene.get_node("UI/BuildActionButton")
func _process(delta: float) -> bool: