Research the Fleet Office, and give it one hull

Fleet Offices sit behind a new Berth Authority doctrine. It costs ore and no
research points, deliberately: points come only from conquering a planet,
conquering needs a fleet, and the fleet caps at its opening hull until an
office exists - so pricing the fleet's own gate in them would lock a player
behind a fight that one vessel has to win first. The research unlocks the
STRUCTURE; capacity is still the built, supplied thing #219 made it.

The tree gains a sixth lane for it, so the branch that fleet size vacated is
occupied again rather than reading as a hole.

Also fixes a shape #216 exposed: a stationed transporter drew a hull written
into its own script while a delivered one drew the definition's, and the
transporter's definition declared none at all - so one in flight was an
empty polygon. Both vessels now draw the definition, and a test pins that
the two paths agree. The repair drone had the same fault, off by two units.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
Loïc Wisniewski 2026-09-05 21:57:53 +02:00
commit cc71811d89
8 changed files with 161 additions and 64 deletions

View file

@ -62,16 +62,38 @@ func _process(delta: float) -> bool:
if game_state.max_fleet_size() != 1:
return _fail("an unbuilt fleet caps at %d, expected 1" % game_state.max_fleet_size())
# The whole tree, researched, must not add a single berth: #219
# moved fleet size out of research entirely.
# --- the gate on the office ----------------------------------
# Fleet Offices are researched (Berth Authority), but the research
# only unlocks the STRUCTURE - it grants no capacity by itself.
if game_state.is_building_unlocked(GameState.BUILDING_FLEET_OFFICE):
return _fail("Fleet Offices are buildable with nothing researched")
var gate: Dictionary = game_state.skill_node("berth_authority")
if gate.is_empty():
return _fail("no skill node unlocks the Fleet Office")
# Ore only, deliberately: research points come solely from
# conquering a planet, and conquering one needs a fleet. Pricing
# the fleet's own gate in them would lock the player at their
# opening hull behind a fight that hull has to win first.
if int(gate.get("research_points", 0)) != 0:
return _fail("Berth Authority costs %d research points - unreachable with one vessel" \
% int(gate.get("research_points", 0)))
for cost_resource in game_state.skill_costs("berth_authority"):
if String(cost_resource) != GameState.RESOURCE_ORE:
return _fail("Berth Authority asks for %s, which needs a built economy first" \
% cost_resource)
# The whole tree, researched, must still not add a single berth:
# #219 moved fleet SIZE out of research and onto the structure.
for node in GameState.SKILL_TREE:
if int(node.get("fleet_bonus", 0)) != 0:
return _fail("skill node '%s' still grants fleet capacity" % node.id)
game_state.unlocked.append(String(node.id))
if not game_state.is_building_unlocked(GameState.BUILDING_FLEET_OFFICE):
return _fail("researching Berth Authority did not unlock the Fleet Office")
if game_state.max_fleet_size() != 1:
return _fail("researching the entire tree raised the fleet cap to %d" \
% game_state.max_fleet_size())
print("a new game: 1 vessel, 1 berth, and no research anywhere raises it")
print("a new game: 1 vessel, 1 berth; research unlocks the office, not the berth")
# --- B. offices are the berths -------------------------------
for i in range(3):