Skip to content

Have Gilbert say so when none of the crew are fishing - #246

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/gilbert-zero-catch
Oct 31, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/gilbert-zero-catch

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • Shop._crewDialogue now returns its own line when boats.fleetDailyCatch is 0. That covers crew on hauling, transport or piracy boats, hands ashore and unassigned, and a crewed fishing boat away at sea. Before this change the line read "That I have! Word is your crew hauls in about 0 fish a day. Keep that up and I might need a bigger vault!"
  • Whenever the daily catch is above zero, the "That I have!" line is unchanged.
  • test_npc_crew_dialogue_ignores_non_fishing_boats no longer pins the "0 fish a day" string. It still asserts that the best hull's rate isn't reported. Two tests were added for the crew-ashore and boat-at-sea states.

Closes #245

Test plan

  • python3 -m compileall -q src
  • Full suite under dummy SDL drivers: 1071 passed (1069 on main + 2 new)
  • With the fix stashed, the 3 changed/new tests fail; with it restored, they pass
  • CI Run Unit Tests green on the PR head

Notes

  • No persisted fields, schemas or reader/writers are touched. No money display is changed. The menu order is unchanged.
  • black --check src/location/shop.py already fails on main because of two long % tuples in _sellPitchDialogue and _sellingTipsDialogue. Those lines are outside this change and were left alone.
  • No other open issues existed at triage, so nothing was deferred.

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

Gilbert's answer to "Have you noticed my crew hauling in fish?" only
special-cased no boat and no workers, so a crew on hauling, transport
or piracy, ashore unassigned, or aboard a boat away at sea got "That I
have! ... about 0 fish a day. Keep that up". Give the zero-catch state
its own line pointing at the fishing boats instead.

Closes #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (performed inline in the dispatching session, not by an independent reviewer):

  • Scope: PASS — both changed files belong to Gilbert praises a crew landing 0 fish a day when no hired hand is fishing #245: the _crewDialogue branch and its tests. The existing black drift in shop.py (two long % tuples in _sellPitchDialogue/_sellingTipsDialogue) was confirmed to fail on main too, and was left untouched.
  • Tests-new: PASS — no new public method. The new branch is exercised by three tests, one per zero-catch cause: non-fishing role, crew ashore, boat at sea.
  • Tests-fix: PASS — with src/location/shop.py stashed, -k crew_dialogue gave 3 failed, 3 passed. Restored, all 6 passed.
  • Sibling structure: PASS — the new tests follow the file's createShop() + # prepare / # check layout.
  • Sibling renames: PASS — nothing was renamed.
  • Docs: PASS — README, PLANNING.md and schemas/*.json have no claim about this dialogue line. Gilbert is mentioned at README lines 85 and 146, about selling fish and the daily cash cap, and neither is affected.
  • Issue resolution: PASS — Gilbert praises a crew landing 0 fish a day when no hired hand is fishing #245 asked for a separate zero-catch line, the positive line unchanged when the catch is above zero, and the "0 fish a day" pin replaced. All three are in the diff.
  • CI: PASS — test (1m21s) and docker are green on the PR head.
  • Schema-sync: PASS (n/a) — no persisted field was touched.
  • Money-format: PASS (n/a) — no money display was added.
  • Deterministic-tests: PASS — _crewDialogue and fleetDailyCatch don't use random.
  • Headless-pygame: PASS (n/a) — no pygame path was touched.
  • camelCase: PASS — no new identifiers apart from test function names, which follow the file's test_npc_crew_dialogue_* pattern.
  • Menu-order: PASS — no menu was touched. The dialogue question list is unchanged.

Findings:

  • src/location/shop.py:170 — the boat-at-sea branch can probably not be reached from the shop during normal play. The player is the captain while atSea is set (adventures.startVoyage/line 632). The test still keeps _crewDialogue consistent with fleetDailyCatch's own definition of "at home", so it was kept.
  • src/location/shop.py:161 (outside the diff) — with crew still hired after the last boat is sold, hasBoat is False, so Gilbert says "Get yourself a boat and a crew". That reads slightly off for a player who already has a crew. It is not misleading, so it was left out of scope.
  • Piracy boats can still seize a few fish a day (_runPiracyDay). The new line says "none of your crew are fishing" and "no steady catch", which stays accurate for that case.

Summary: the change is small and green, no protected paths are touched, and it is ready to merge.

This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 2cb1b92 into main Oct 31, 2026
2 checks passed
@dmccoystephenson
dmccoystephenson deleted the feature/gilbert-zero-catch branch October 31, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gilbert praises a crew landing 0 fish a day when no hired hand is fishing

1 participant