Buy fleet berths with Fleet Offices

#219: fleet capacity is a built, supplied thing rather than a researched
one. The eight fleet-size doctrines are gone; capacity is one berth free
plus one per Fleet Office standing. An office charges every 25s for the
vessel in its berth, priced off that vessel's own build cost so an expensive
hull is expensive to keep, and drawn from its own store the way a gas burner
draws gas. An office that cannot pay goes dark, its vessel is scuttled, and
the player is told through the same queue quest lines use - which reaches
them on a planet surface too.

An empty berth is idle rather than starved: an office is only failing while
there is something in it to fail, and holding it disabled would leave a
berth that could never be crewed and so could never be paid for again.

Ships have no hit points and a shield absorbs a hit wholesale, so the lost
vessel is scuttled rather than damaged - otherwise a shielded hull would
survive its own eviction.

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 17:09:27 +02:00
commit 1f5fecd371
60 changed files with 695 additions and 243 deletions

View file

@ -45,8 +45,18 @@ func _process(delta: float) -> bool:
for skill in GameState.SKILL_TREE:
if not state.is_unlocked(String(skill.id)):
return _fail("unlock-all missed %s" % skill.id)
# #219: capacity is Fleet Offices, not research, so unlocking the
# whole tree must NOT move it. The sandbox tool is about doctrines.
if state.max_fleet_size() != GameState.BASE_FLEET_SIZE:
return _fail("unlock-all moved the fleet cap to %d - capacity is not research any more" \
% state.max_fleet_size())
# The berths the rest of this test needs come from offices.
for berth in range(GameState.DEFAULT_FORMATION.size() - GameState.BASE_FLEET_SIZE):
state.add_building(GameState.BUILDING_FLEET_OFFICE,
Vector2(3000.0 + 300.0 * float(berth), 3000.0))
if state.max_fleet_size() != GameState.DEFAULT_FORMATION.size():
return _fail("unlock-all did not expose the complete fleet capacity")
return _fail("offices for every formation position gave %d berths" \
% state.max_fleet_size())
for definition in VESSEL_DEFINITIONS.fleet():
menu.fleet_add_requested.emit(String(definition.definition_id))