Plan every craftable vessel, and stop restating the point cost
#221: the planning centre listed only fleet-eligible hulls, so the two vessels that most need replacing were the two it could not plan - #216 made transporters and repair drones wear out, which is what a standing order is for. It offers everything a crafter can build now. That needed the census to see them: it counted the fleet, the hangar, garrisons and transit, but not vessels standing at a hub or a workshop. An order for a transporter would never have seen the ones already built, and the crafters would have gone on making more forever. #222: the ship lab's detail block restated the selected upgrade's research point cost, which its own card shows a few pixels higher. Removed, with the parameter and the call-site lookup that fed it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
parent
2bb46cba94
commit
f77596395b
4 changed files with 45 additions and 8 deletions
|
|
@ -2186,11 +2186,14 @@ func adjust_vessel_target(vessel_type: String, delta: int) -> int:
|
|||
return set_vessel_target(vessel_type, vessel_target(vessel_type) + delta)
|
||||
|
||||
|
||||
# #221: everything a crafter can be asked for, not just the fleet hulls.
|
||||
# #216 made transporters and repair drones ordinary craft that wear out and
|
||||
# have to be replaced, which is precisely the kind of vessel a standing order
|
||||
# is for - they were the one thing the planning centre could not plan.
|
||||
func planned_vessel_types() -> PackedStringArray:
|
||||
var out: PackedStringArray = PackedStringArray()
|
||||
for definition in VESSEL_DEFINITIONS.all():
|
||||
if bool(definition.fleet_eligible):
|
||||
out.append(String(definition.definition_id))
|
||||
for definition in VESSEL_DEFINITIONS.craftable():
|
||||
out.append(String(definition.definition_id))
|
||||
return out
|
||||
|
||||
|
||||
|
|
@ -2201,6 +2204,7 @@ func vessel_census(vessel_type: String) -> int:
|
|||
return vessel_count_in_fleet(vessel_type) \
|
||||
+ vessel_count_in_hangar(vessel_type) \
|
||||
+ vessel_count_in_garrisons(vessel_type) \
|
||||
+ vessel_count_at_stations(vessel_type) \
|
||||
+ vessel_count_in_transit(vessel_type)
|
||||
|
||||
|
||||
|
|
@ -2227,6 +2231,19 @@ func vessel_count_in_garrisons(vessel_type: String) -> int:
|
|||
return n
|
||||
|
||||
|
||||
# #221: transporters standing at hubs and drones at workshops. Without these
|
||||
# a standing order for one could never be satisfied - the census would never
|
||||
# see the vessels it had already built, and the crafters would keep making
|
||||
# more forever.
|
||||
func vessel_count_at_stations(vessel_type: String) -> int:
|
||||
var n: int = 0
|
||||
if vessel_type == VESSEL_TRANSPORTER:
|
||||
n += transporters.size()
|
||||
elif vessel_type == REPAIR_DRONE:
|
||||
n += repair_drones.size()
|
||||
return n
|
||||
|
||||
|
||||
# Both directions of flight: a finished hull on its way to the mothership,
|
||||
# and a vessel being moved to or from an outpost. All of them are vessels
|
||||
# that exist and will land somewhere.
|
||||
|
|
|
|||
Loading…
Reference in a new issue