Charge more for each berth, and show the bill

#220: every berth past the first paid one costs 1.12x the one before it, on
top of the flat per-vessel charge. A linear bill makes the tenth hull no more
of a decision than the second; compounding weighs each addition against the
whole fleet behind it. Shallow on purpose - the thirteenth berth costs about
three and a half times the second, the twentieth about seven and a half.

Fleet Offices gain a menu naming the whole bill per minute, a line per paying
berth with its multiplier, and the arithmetic in words. It renders
fleet_upkeep_breakdown(), which is the calculation the charging loop itself
runs: a readout that summed independently could quote a bill the game does
not take, which is the thing worth preventing here. The test pins that what
the menu quotes for a berth is what that office is charged.

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 22:36:21 +02:00
commit 2bb46cba94
9 changed files with 369 additions and 5 deletions

View file

@ -34,6 +34,8 @@ const HUD_ROW_GAP := 16.0
@onready var garrison_menu: Control = get_node("../UI/GarrisonMenu")
# #216: where a hub or a workshop is told how many craft to keep.
@onready var station_menu: Control = get_node("../UI/StationMenu")
# #220: what the fleet costs to keep, and the arithmetic behind it.
@onready var upkeep_menu: Control = get_node("../UI/FleetUpkeepMenu")
@onready var scanner_menu: Control = get_node("../UI/ScannerMenu")
var pending_build_type: String = ""
@ -114,7 +116,7 @@ func _seat_hud_columns() -> void:
func _menu_is_open() -> bool:
for menu in [build_menu, craft_menu, lab_menu, transfer_menu, hangar_menu,
formation_menu, skill_menu, planning_menu, garrison_menu, scanner_menu,
station_menu]:
station_menu, upkeep_menu]:
if menu.visible:
return true
return false
@ -319,6 +321,8 @@ func _on_action_pressed() -> void:
scanner_menu.open_menu()
elif building_action == "staff":
station_menu.open_for(building_id)
elif building_action == "upkeep":
upkeep_menu.open_for(building_id)
func _on_scan_requested(definition_id: String) -> void:
@ -797,6 +801,7 @@ func _layout_hangar() -> void:
func _refresh_garrison() -> void:
garrison_menu.refresh()
station_menu.refresh()
upkeep_menu.refresh()
func _refresh_planning() -> void: