Forgejo #13: releasing the stick paused, then moved again before settling. stop() aims each ship at a braking point ahead of it, but the ship's own velocity was ~0 - the anchor had been carrying it - so it started from REST, accelerated into its own stopping distance, and halted a second time. Measured: 0 -> 45 -> 90 -> 135 -> 180 -> brake. stop() now hands the fleet's motion to the ship, so the release is one continuous decelerating coast (222 -> 0) to the identical endpoint. test_joystick_control now asserts the speed one frame after release is a real fraction of cruise, and never rises afterwards. Forgejo #21: unresearched structures are no longer listed greyed out. They are hidden, and the menu repacks around what is left - a fixed grid with entries hidden would otherwise leave holes where they used to be. An entry alone on its row is centred rather than hanging in the left column. Researched-but-not-usable is still shown greyed: an extractor with no planet under the fleet is "not now", not "not yet". This reverses a documented decision (the old comment argued that always listing everything stops the player wondering whether the game has it at all), so test_skill_tree's matching assertion was updated from greyed-but-listed to hidden. The gate itself is unchanged and still refuses a build forced past the menu. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
22 lines
872 B
GDScript
22 lines
872 B
GDScript
extends Node2D
|
|
|
|
# Preview, not a test. Opens the build menu itself, so the three-row layout
|
|
# added for the Transport Hub (#18) can be checked for fit on the real phone
|
|
# viewport - every button, label and price moved, and a bad offset is
|
|
# invisible to a headless test.
|
|
#
|
|
# bash tests/screenshot.sh res://tests/_build_menu_preview.tscn /tmp/menu.png 20 720x1280
|
|
|
|
|
|
func _ready() -> void:
|
|
GameState.buildings.clear()
|
|
GameState.extractors.clear()
|
|
GameState.rocks = 500
|
|
# Everything researched, so nothing is greyed out and the whole menu is
|
|
# legible at full strength.
|
|
# Partly researched, to show the menu repacking around what is hidden.
|
|
GameState.unlocked = ["shipyards", "logistics"]
|
|
var main: Node = load("res://Main.tscn").instantiate()
|
|
add_child(main)
|
|
main.get_node("UI/BuildMenu").visible = true
|
|
main.get_node("BuildController")._refresh_build_status()
|