Build the logistics crews, and let them burn energy
#216: transport hubs and spacial workshops no longer conjure their crews. Transporters and repair drones are ordered at a ship crafter, assigned per building through a new Station menu, flown out from the mothership hangar, and spent by the work they do - 20 runs, 12 repairs, counted where the run ENDS so nothing retires with cargo in the air or a building half repaired. A spent vessel is gone, so the structure is short again and the player has to build another. The menu shows what each one has left, worst first. Craftability needed its own flag: "the crafter can make it" and "it can take a berth in the fleet" stopped being the same question. #217: transporters crawl at 120 rather than 150, and a Burn Drive lets them carry energy and spend it to travel far faster. Fetching it is a leg of its own, to the nearest store that has any - so a refuelling transporter cannot be dispatched mid-errand - and the leg flown to COLLECT fuel is not charged for it. Unresearched, nothing detours and nothing changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
parent
1f5fecd371
commit
265e121cb0
31 changed files with 1180 additions and 141 deletions
|
|
@ -7,8 +7,12 @@ script = ExtResource("1")
|
|||
definition_id = "repair_drone"
|
||||
display_name = "Repair Drone"
|
||||
description = "Workshop-owned tender. Flies out to damaged structures and puts them back together, spending ore delivered to its workshop. Cannot be crafted - a workshop brings its own."
|
||||
build_cost = 0
|
||||
build_time = 0.0
|
||||
build_cost = 10
|
||||
build_resource_costs = {
|
||||
"ore": 10
|
||||
}
|
||||
support_craftable = true
|
||||
build_time = 11.0
|
||||
icon = 43
|
||||
glow_color = Color(0.5, 0.95, 0.8, 1)
|
||||
hull_points = PackedVector2Array(0, -14, 9, -4, 7, 10, -7, 10, -9, -4)
|
||||
|
|
|
|||
12
vessels/TransportBurnUpgrade.tres
Normal file
12
vessels/TransportBurnUpgrade.tres
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_resource type="Resource" script_class="VesselUpgradeDefinition" load_steps=2 format=3]
|
||||
[ext_resource type="Script" path="res://vessels/VesselUpgradeDefinition.gd" id="1"]
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
upgrade_id = "trn_burn"
|
||||
display_name = "Burn Drive"
|
||||
description = "Transporters carry energy and burn it in flight, travelling far faster while it lasts. They fetch it themselves from the nearest store that has any."
|
||||
base_cost = 45
|
||||
max_level = 2
|
||||
research_point_cost = 1
|
||||
icon = 18
|
||||
multiplicative_modifiers = {"fuel_boost": 1.9}
|
||||
|
|
@ -1,19 +1,24 @@
|
|||
[gd_resource type="Resource" script_class="VesselDefinition" load_steps=6 format=3]
|
||||
[gd_resource type="Resource" script_class="VesselDefinition" load_steps=7 format=3]
|
||||
[ext_resource type="Script" path="res://vessels/VesselDefinition.gd" id="1"]
|
||||
[ext_resource type="PackedScene" path="res://vessels/VesselCargoComponent.tscn" id="2"]
|
||||
[ext_resource type="PackedScene" path="res://vessels/VesselTransportComponent.tscn" id="3"]
|
||||
[ext_resource type="Resource" path="res://vessels/TransportCapacityUpgrade.tres" id="4"]
|
||||
[ext_resource type="Resource" path="res://vessels/TransportSpeedUpgrade.tres" id="5"]
|
||||
[ext_resource type="Resource" path="res://vessels/TransportBurnUpgrade.tres" id="6"]
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
definition_id = "transporter"
|
||||
display_name = "Transporter"
|
||||
description = "Hub-owned logistics vessel that moves resources automatically."
|
||||
build_cost = 0
|
||||
build_time = 0.0
|
||||
build_cost = 8
|
||||
build_resource_costs = {
|
||||
"ore": 8
|
||||
}
|
||||
build_time = 9.0
|
||||
support_craftable = true
|
||||
icon = 12
|
||||
glow_color = Color(0.95, 0.55, 0.85, 1)
|
||||
capabilities = PackedStringArray("cargo", "transport")
|
||||
component_scenes = Array[PackedScene]([ExtResource("2"), ExtResource("3")])
|
||||
base_stats = {"max_speed": 690.0, "acceleration": 2025.0, "cargo_capacity": 20.0, "transport_speed": 150.0, "delivery_speed": 180.0}
|
||||
upgrades = Array[Resource]([ExtResource("4"), ExtResource("5")])
|
||||
base_stats = {"max_speed": 690.0, "acceleration": 2025.0, "cargo_capacity": 20.0, "fuel_capacity": 6.0, "fuel_boost": 1.0, "transport_speed": 120.0, "delivery_speed": 180.0}
|
||||
upgrades = Array[Resource]([ExtResource("4"), ExtResource("5"), ExtResource("6")])
|
||||
|
|
|
|||
|
|
@ -24,6 +24,12 @@ extends Resource
|
|||
Vector2(0, -22), Vector2(-14, 16), Vector2(14, 16),
|
||||
])
|
||||
@export var fleet_eligible: bool = false
|
||||
# #216: orderable at a ship crafter without joining the fleet. Transporters
|
||||
# and repair drones used to appear with their building for nothing; they are
|
||||
# built now, and they staff a structure rather than flying with the player.
|
||||
# Separate from fleet_eligible because "the crafter can make it" and "it can
|
||||
# take a berth in the fleet" stopped being the same question.
|
||||
@export var support_craftable: bool = false
|
||||
# What one of these keeps beside it when stationed at an outpost, and which
|
||||
# resource that is. Data here rather than a table in the outpost, so a new
|
||||
# armed vessel brings its own magazine with it and the outpost never has to
|
||||
|
|
|
|||
|
|
@ -30,6 +30,16 @@ static func fleet() -> Array:
|
|||
result.append(definition)
|
||||
return result
|
||||
|
||||
# Everything a ship crafter can be asked for: the fleet hulls, plus #216's
|
||||
# support craft. Ordered fleet-first so the craft menu's own rows do not move
|
||||
# when a support vessel is added.
|
||||
static func craftable() -> Array:
|
||||
var result: Array = fleet()
|
||||
for definition in all():
|
||||
if definition.support_craftable and not definition.fleet_eligible:
|
||||
result.append(definition)
|
||||
return result
|
||||
|
||||
static func with_capability(capability: String) -> Resource:
|
||||
for definition in all():
|
||||
if definition.has_capability(capability):
|
||||
|
|
|
|||
Loading…
Reference in a new issue