#219: fleet capacity is a built, supplied thing rather than a researched one. The eight fleet-size doctrines are gone; capacity is one berth free plus one per Fleet Office standing. An office charges every 25s for the vessel in its berth, priced off that vessel's own build cost so an expensive hull is expensive to keep, and drawn from its own store the way a gas burner draws gas. An office that cannot pay goes dark, its vessel is scuttled, and the player is told through the same queue quest lines use - which reaches them on a planet surface too. An empty berth is idle rather than starved: an office is only failing while there is something in it to fail, and holding it disabled would leave a berth that could never be crewed and so could never be paid for again. Ships have no hit points and a shield absorbs a hit wholesale, so the lost vessel is scuttled rather than damaged - otherwise a shielded hull would survive its own eviction. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
40 lines
1.7 KiB
GDScript
40 lines
1.7 KiB
GDScript
extends Node2D
|
|
|
|
# Preview, not a test - the full combat HUD with every ability control
|
|
# visible, so the arrangement around the fire stick can be looked at.
|
|
#
|
|
# bash tests/screenshot.sh res://tests/_hud_preview.tscn /tmp/hud.png 30 720x1280
|
|
|
|
|
|
func _ready() -> void:
|
|
GameState.buildings.clear()
|
|
GameState.extractors.clear()
|
|
GameState.vessel_levels["unlock_laser"] = 1
|
|
GameState.vessel_levels["unlock_gas_bomber"] = 1
|
|
GameState.vessel_levels["unlock_distorder"] = 1
|
|
# #219: a berth is an office now, not a doctrine.
|
|
GameState.add_building(GameState.BUILDING_FLEET_OFFICE, Vector2(2400.0, 0.0))
|
|
GameState.deposit_fleet_resource(GameState.RESOURCE_ENERGY, 200)
|
|
GameState.deposit_fleet_resource(GameState.RESOURCE_GAS, 200)
|
|
var main: Node = load("res://world/Main.tscn").instantiate()
|
|
add_child(main)
|
|
main.get_node("EnemySpawner").set_process(false)
|
|
main.get_node("AsteroidField").set_process(false)
|
|
var fleet: Node = main.get_node("Fleet")
|
|
fleet.spawn_ships(4, Vector2.ZERO, PackedStringArray([
|
|
GameState.VESSEL_INTERCEPTOR, GameState.VESSEL_LASER,
|
|
GameState.VESSEL_GAS_BOMBER, GameState.VESSEL_DISTORDER]))
|
|
main.get_node("LaserController")._process(0.0)
|
|
main.get_node("GasBombController")._process(0.0)
|
|
main.get_node("DashController")._process(0.0)
|
|
# Push the fire stick, so its knob shows deflected the way it looks in use.
|
|
var stick: Control = main.get_node("UI/FireStick")
|
|
var press := InputEventScreenTouch.new()
|
|
press.index = 4
|
|
press.pressed = true
|
|
press.position = stick.global_position + stick.size * 0.5
|
|
stick.handle_touch(press)
|
|
var drag := InputEventScreenDrag.new()
|
|
drag.index = 4
|
|
drag.position = press.position + Vector2(46.0, -52.0)
|
|
stick.handle_drag(drag)
|