Repository navigation
Make supply hubs easier to start and link any hubs by rail - #100
Conversation
A guild's first hub does nothing alone, and nothing told players that. Building away from the capital before the guild has a capital hub now shows a one-time tutorial with a [Got It] button, and every build says what the new hub linked to. Train track now links any two hubs, whatever their installations: a port or airport on a line links to a station. Ports still link by sea and airports by air; a pair that has both gets the stronger link. The hub limit and upkeep move into the branches so players can see them: Supply Lines gives 2 hubs at level 0 and 15d per hub, and each level of Supply Lines or Storehouses adds a little upkeep per hub. Every hub costs the same; the cost no longer grows per hub. Freight Yards becomes Counting Houses (lower trade upkeep). Hub production moves to Supply Lines. Guilds saved with freight_yards keep their levels. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (23)
💤 Files with no reviewable changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughSupply hub limits and flat upkeep now use guild modifiers. Transport links identify their source and destination installations by faction and installation IDs. Guild commands can display a supply hub tutorial and save a player’s dismissal state. ChangesSupply hub systems
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Player
participant SupplyHubCommands
participant Guild
participant Database
Player->>SupplyHubCommands: Run /guild hub gotit
SupplyHubCommands->>Guild: Record tutorial dismissal
SupplyHubCommands->>Database: Save faction
Database->>Guild: Persist dismissal IDs in GuildData
SupplyHubCommands->>Player: Prompt another build attempt
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change moves supply hub limits and upkeep to branch modifiers, links hubs by rail across installation types, and adds a dismissible placement tutorial. No concrete merge-blocking defect was identified. Server operators must update their branches.yml files for Supply Lines, Storehouses and Counting Houses, because the jar does not update them. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Upgrading without updating existing branch settings can reduce hub limits and eliminate upkeep charges. The new transport behavior retains ownership and permit checks, but configuration compatibility and some ownership-change recovery paths remain uncertain. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
Comment |
Why
A guild's first supply hub does nothing on its own, and the game never said so. Players could build a hub, pay upkeep, see "Active", and get no trade. Hubs also only linked to hubs of the same kind, the default limit of 2 was hidden in config, and upkeep grew with every hub.
What changes
Telling the player what a hub does
/guild hub buildaway from the capital province, while the guild has no hub in its capital, shows a one-time tutorial with a[Got It]button and does not build. After Got It the build goes through, with a one-line note that the guild still has no capital hub. Once the guild has a capital hub there is no placement advice./guild hub listand the hub menu show "Not linked to another hub" on an active hub with no link.Rail joins any two hubs
Limit and upkeep come from the branches
hub_limit; Supply Lines is nowhub_limit 2 0.5, so the 2 shows in the branch. The limit does not shrink while a guild is inactive.hub_upkeepmodifier: upkeep per hub per day. Supply Lines ishub_upkeep 15 1, Storehouseshub_upkeep 0 0.5. Every hub costs the same.supply-hubs.base-limit,base-upkeepandupkeep-growthare removed from config (old files still load).Branches
counting_houses):trade_upkeep 0 -0.01.hub_production 0 0.08moves to Supply Lines;hub_tradeis0 0.05, as on the live server.freight_yardsloads ascounting_houseswith its level.Deploying
plugins/SimpleFactions/Guilds/branches.ymlon a server is not updated by the jar. It needs the new Supply Lines, Storehouses and Counting Houses lines, or guilds get a hub limit of 0 and free hubs.Testing
mvn verify: 2513 tests pass. Tested on the dev server with a bot: tutorial, Got It, build messages, list output, upkeep.🤖 Generated with Claude Code