Nothing can attack a structure that cannot be hurt, so this is the floor the rest of #97 stands on. max_hp is per definition - an extractor bolted to a rock is not the mothership - and the current value lives on the RECORD in GameState, not on the Building node. Main.tscn is torn down and rebuilt on every trip to a planet surface, so damage kept on a node would heal itself the moment the player landed. A record written before this carries no hp field at all. That reads as undamaged rather than as zero, or an existing save would open on a field of wrecks. The mothership cannot be destroyed - it floors at 1hp. The bank, the hangar and research all live there and a wiped fleet rebuilds there, so losing it would be a soft-lock with no route back. Keyed on the "bank" capability rather than on the type: whatever building holds the bank is the one that cannot be lost. Destroying a hub retires its transporters. Everything else keyed on a building id already copes with the building being gone - a transporter mid-delivery puts its cargo back rather than destroying it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
21 lines
773 B
Text
21 lines
773 B
Text
[gd_resource type="Resource" script_class="BuildingDefinition" load_steps=3 format=3]
|
|
[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"]
|
|
[ext_resource type="PackedScene" path="res://buildings/ShipLabBuildingVisual.tscn" id="2"]
|
|
[resource]
|
|
script = ExtResource("1")
|
|
definition_id = "ship_lab"
|
|
display_name = "Ship Lab"
|
|
description = "Fly the fleet onto it to upgrade each vessel type and unlock new vessel designs."
|
|
cost = 35
|
|
action_icon = 13
|
|
menu_icon = 13
|
|
visual_scene = ExtResource("2")
|
|
capabilities = PackedStringArray("vessel_research")
|
|
map_color = Color(0.55, 0.95, 0.9, 1)
|
|
map_sides = 3
|
|
map_radius = 7.5
|
|
map_phase = -1.570796
|
|
menu_button_name = "ShipLabButton"
|
|
menu_label_name = "ShipLabLabel"
|
|
menu_cost_name = "ShipLabCost"
|
|
max_hp = 90
|