Repository navigation
Send export runs only on a boat that can sail - #281
Merged
Merged
Conversation
Export picked the biggest hold in the fleet and gated markets on the fleet's best hull, both ignoring hull damage, so a boat the docks call "too damaged to sail" still made the crossing - and a laid-up Fishing Fleet kept Thornhaven open for a run that went out on a Trawler. The run now sails on the seaworthy (and not at-sea) boat with the biggest hold, the same hull test Take the Helm uses; that boat sets the capacity and the reachable markets. A refusal for a big-enough hull that is only damaged points at the repair instead of a bigger boat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head
Judgment notes, not blocking:
Summary: ready to merge. CI is green, the stash check confirmed FAIL→PASS, and no do-not-auto-merge path is touched. This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/business/export.py: an export run is now sent only on a boat that can sail.canSailuses the same test as Take the Helm (Docks.readyToSail): seaworthy and not at sea. No crew is required, because the player sails the run.exportBoatpicks the seaworthy boat with the biggest hold, andexportCapacityandcanExportfollow from it. The hold calculation that used to be duplicated is nowholdFor.runnerTier), not onbusiness.currentTier, the fleet's best hull. A laid-up Fishing Fleet no longer keeps Thornhaven open for a run that goes out on a Trawler.runExportreturns a newboat_too_damagedreason when a hull big enough for the market exists but is only damaged.Docks._exportRefusalturns that into "The crossing to X needs a Y, and yours is too damaged to sail. Repair her under Manage Fleet first." instead of "You'd need a Y".Shop._dailyBudgetDialogue,_leftoverAdvice) go throughcanExport/availableMarkets, so he no longer points the player at the other villages while the only crossing-capable boat is laid up.Closes #279
Test plan
python3 -m compileall -q srcpytest.main): 1130 passed (was 1121 on main; 9 new tests), matched by CI on the head SHAsrc/changes stashed, 6 of the new tests fail (damaged-only boat, at-sea boat, damaged Fleet + sound Trawler, the refusal wording, the hidden menu option, the status line naming the sound boat). All pass with the fix. A direct test of the new helpers was added after the stash check. The other 2 new tests are guards that pass either way: just under the damage threshold still exports, and a damaged Rowboat still gets the small-boat refusal.black --checkpasses on the changed test files and ondocks.py.src/business/export.pyalready failsblack --checkonmain(one missing blank line afterEXPORT_MARKETS). That is left out of scope.Deferred issues
schemas/*.json,*JsonReaderWriter.py) and needs a human merge decision.No protected path is modified by this PR.
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson