Add carrier vessel (#57)

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.
This commit is contained in:
Loïc Wisniewski 2026-08-16 16:20:39 +02:00
commit bbb1d4b0c5
13 changed files with 489 additions and 40 deletions

167
Main.tscn
View file

@ -840,8 +840,8 @@ horizontal_alignment = 1
[node name="AvailableShield" type="Control" parent="UI/HangarMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = -56
offset_right = 56
offset_left = -134
offset_right = -22
offset_top = 255
offset_bottom = 375
script = ExtResource("10")
@ -852,8 +852,8 @@ glow_color = Color(0.45, 0.8, 1, 1)
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = -96
offset_right = 96
offset_left = -174
offset_right = 18
offset_top = 380
offset_bottom = 460
theme_override_font_sizes/font_size = 22
@ -862,8 +862,8 @@ horizontal_alignment = 1
[node name="AvailableGasBomber" type="Control" parent="UI/HangarMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = 178
offset_right = 290
offset_left = 22
offset_right = 134
offset_top = 255
offset_bottom = 375
script = ExtResource("10")
@ -874,6 +874,28 @@ glow_color = Color(0.96, 0.32, 0.78, 1)
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = -18
offset_right = 174
offset_top = 380
offset_bottom = 460
theme_override_font_sizes/font_size = 22
horizontal_alignment = 1
[node name="AvailableCarrier" type="Control" parent="UI/HangarMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = 178
offset_right = 290
offset_top = 255
offset_bottom = 375
script = ExtResource("10")
icon = 34
glow_color = Color(1, 0.78, 0.3, 1)
[node name="AvailableCarrierLabel" type="Label" parent="UI/HangarMenu"]
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = 138
offset_right = 330
offset_top = 380
@ -914,8 +936,8 @@ horizontal_alignment = 1
[node name="FleetShield" type="Control" parent="UI/HangarMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = -56
offset_right = 56
offset_left = -134
offset_right = -22
offset_top = 565
offset_bottom = 685
script = ExtResource("10")
@ -926,8 +948,8 @@ glow_color = Color(0.45, 0.8, 1, 1)
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = -96
offset_right = 96
offset_left = -174
offset_right = 18
offset_top = 690
offset_bottom = 770
theme_override_font_sizes/font_size = 22
@ -936,8 +958,8 @@ horizontal_alignment = 1
[node name="FleetGasBomber" type="Control" parent="UI/HangarMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = 178
offset_right = 290
offset_left = 22
offset_right = 134
offset_top = 565
offset_bottom = 685
script = ExtResource("10")
@ -948,6 +970,28 @@ glow_color = Color(0.96, 0.32, 0.78, 1)
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = -18
offset_right = 174
offset_top = 690
offset_bottom = 770
theme_override_font_sizes/font_size = 22
horizontal_alignment = 1
[node name="FleetCarrier" type="Control" parent="UI/HangarMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = 178
offset_right = 290
offset_top = 565
offset_bottom = 685
script = ExtResource("10")
icon = 34
glow_color = Color(1, 0.78, 0.3, 1)
[node name="FleetCarrierLabel" type="Label" parent="UI/HangarMenu"]
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = 138
offset_right = 330
offset_top = 690
@ -1000,7 +1044,7 @@ script = ExtResource("24")
anchor_left = 0.5
anchor_right = 0.5
offset_left = -300
offset_right = -190
offset_right = -212
offset_top = 274
offset_bottom = 394
script = ExtResource("10")
@ -1010,8 +1054,8 @@ glow_color = Color(0.25, 0.85, 1, 1)
[node name="VesselB" type="Control" parent="UI/LabMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = -145
offset_right = -35
offset_left = -172
offset_right = -84
offset_top = 274
offset_bottom = 394
script = ExtResource("10")
@ -1021,8 +1065,8 @@ glow_color = Color(0.45, 0.8, 1, 1)
[node name="VesselC" type="Control" parent="UI/LabMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = 35
offset_right = 145
offset_left = -44
offset_right = 44
offset_top = 274
offset_bottom = 394
script = ExtResource("10")
@ -1032,14 +1076,25 @@ glow_color = Color(0.96, 0.32, 0.78, 1)
[node name="VesselD" type="Control" parent="UI/LabMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = 190
offset_right = 300
offset_left = 84
offset_right = 172
offset_top = 274
offset_bottom = 394
script = ExtResource("10")
icon = 12
glow_color = Color(0.95, 0.55, 0.85, 1)
[node name="VesselE" type="Control" parent="UI/LabMenu"]
anchor_left = 0.5
anchor_right = 0.5
offset_left = 212
offset_right = 300
offset_top = 274
offset_bottom = 394
script = ExtResource("10")
icon = 34
glow_color = Color(1, 0.78, 0.3, 1)
[node name="VesselLabel" type="Label" parent="UI/LabMenu"]
visible = false
mouse_filter = 2
@ -1057,7 +1112,7 @@ mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = -330
offset_right = -160
offset_right = -182
offset_top = 400
offset_bottom = 460
theme_override_font_sizes/font_size = 22
@ -1068,8 +1123,8 @@ text = "Interceptor"
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = -175
offset_right = -5
offset_left = -202
offset_right = -54
offset_top = 400
offset_bottom = 460
theme_override_font_sizes/font_size = 22
@ -1080,8 +1135,8 @@ text = "Shield"
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = 5
offset_right = 175
offset_left = -74
offset_right = 74
offset_top = 400
offset_bottom = 460
theme_override_font_sizes/font_size = 22
@ -1092,14 +1147,26 @@ text = "Gas Bomber"
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = 160
offset_right = 330
offset_left = 54
offset_right = 202
offset_top = 400
offset_bottom = 460
theme_override_font_sizes/font_size = 22
horizontal_alignment = 1
text = "Transporter"
[node name="VesselELabel" type="Label" parent="UI/LabMenu"]
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
offset_left = 182
offset_right = 330
offset_top = 400
offset_bottom = 460
theme_override_font_sizes/font_size = 22
horizontal_alignment = 1
text = "Carrier"
[node name="VesselUpgradeSeparator" type="ColorRect" parent="UI/LabMenu"]
mouse_filter = 2
anchor_right = 1.0
@ -1345,7 +1412,7 @@ anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = -310
offset_right = -182
offset_right = -208
offset_top = -100
offset_bottom = 48
script = ExtResource("10")
@ -1358,7 +1425,7 @@ anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = -330
offset_right = -162
offset_right = -188
offset_top = 56
offset_bottom = 136
theme_override_font_sizes/font_size = 24
@ -1370,8 +1437,8 @@ anchor_left = 0.5
anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = -148
offset_right = -20
offset_left = -174
offset_right = -72
offset_top = -100
offset_bottom = 48
script = ExtResource("10")
@ -1384,8 +1451,8 @@ anchor_left = 0.5
anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = -168
offset_right = 0
offset_left = -194
offset_right = -52
offset_top = 56
offset_bottom = 136
theme_override_font_sizes/font_size = 24
@ -1398,8 +1465,8 @@ anchor_left = 0.5
anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 14
offset_right = 142
offset_left = -38
offset_right = 64
offset_top = -100
offset_bottom = 28
script = ExtResource("10")
@ -1412,8 +1479,8 @@ anchor_left = 0.5
anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = -6
offset_right = 162
offset_left = -58
offset_right = 84
offset_top = 56
offset_bottom = 150
theme_override_font_sizes/font_size = 24
@ -1421,6 +1488,34 @@ autowrap_mode = 2
text = "Gas Bomber"
horizontal_alignment = 1
[node name="CarrierButton" type="Control" parent="UI/CraftMenu"]
anchor_left = 0.5
anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 98
offset_right = 200
offset_top = -100
offset_bottom = 48
script = ExtResource("10")
icon = 34
glow_color = Color(1, 0.78, 0.3, 1)
[node name="CarrierLabel" type="Label" parent="UI/CraftMenu"]
mouse_filter = 2
anchor_left = 0.5
anchor_right = 0.5
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 78
offset_right = 220
offset_top = 56
offset_bottom = 136
theme_override_font_sizes/font_size = 24
autowrap_mode = 2
text = "Carrier"
horizontal_alignment = 1
[node name="QueueLabel" type="Label" parent="UI/CraftMenu"]
mouse_filter = 2
anchor_left = 1.0