An unarmed hauler with no weapon component - only VesselCargoComponent, so it structurally cannot fire, the same pattern that already made the shield vessel weaponless after #35. Its cargo_capacity (120, six interceptors' worth) makes it the first real payoff for #56's fleet hold cap. Wired into the crafter, hangar and ship lab menus, all of which were already generic over VesselDefinitions.fleet()/.all() - only the per-vessel UI *nodes* are hand-placed (Main.tscn), not the logic, so this repacks those three button rows to 4/4/5 columns and extends BuildController's matching onready arrays. No new signal handlers were needed. Also fixes test_vessel_composition.gd's hardcoded fleet-catalog size (3 -> 4) now that a fourth vessel is fleet-eligible.
21 lines
860 B
GDScript
21 lines
860 B
GDScript
extends Node2D
|
|
|
|
# Preview, not a test - #57's hangar menu screenshot with all 4 fleet
|
|
# vessels researched, one of each stored, and a carrier crewed into the
|
|
# fleet so both rows show the new entry.
|
|
#
|
|
# bash tests/screenshot.sh res://tests/_carrier_hangar_preview.tscn /tmp/hangar.png 20 720x1280
|
|
|
|
|
|
func _ready() -> void:
|
|
GameState.buildings.clear()
|
|
GameState.extractors.clear()
|
|
GameState.rocks = 500
|
|
GameState.vessel_levels = {"unlock_shield": 1, "unlock_gas_bomber": 1, "unlock_carrier": 1}
|
|
GameState.stored_vessels = ["shield", "gas_bomber", "carrier"]
|
|
var main: Node = load("res://Main.tscn").instantiate()
|
|
add_child(main)
|
|
var fleet: Node = main.get_node("Fleet")
|
|
fleet.spawn_ships(2, Vector2.ZERO, PackedStringArray(["interceptor", "carrier"]))
|
|
main.get_node("UI/HangarMenu").visible = true
|
|
main.get_node("BuildController")._refresh_hangar()
|