Skip to content

Have a crew member describe their own boat, not the fleet's best - #241

Merged
dmccoystephenson merged 1 commit into
mainfrom
fix/crew-boat-dialogue-own-boat
Oct 29, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
fix/crew-boat-dialogue-own-boat

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • boatDialogue in src/npc/villagers.py now looks up the speaker's own boat with boats.boatFor(player, name) and stages its line on that boat's tier, instead of business.currentTier(player) (the fleet's best hull). This mirrors the change Fix role-blind crew dialogue and remove three dead symbols #164 made to the sibling workDialogue.
  • A hand who is hired but unassigned gets an ashore line rather than praise for a boat they are not on.
  • The ambition question's fleet-wide gate is about the outfit rather than the speaker's berth, so it is left unchanged.

Closes #240

Test plan

  • New test_createCrewNPC_boat_dialogue_is_about_the_hands_own_boat: a Rowboat plus a Fishing Fleet, with the hand on the Rowboat. The answer names the Rowboat and not the Fishing Fleet.
  • New test_createCrewNPC_boat_dialogue_handles_an_unassigned_hand: a hand unassigned from a Fishing Fleet gets the ashore line.
  • Both new tests were confirmed to FAIL with the villagers.py change stashed and to PASS with it restored.
  • The existing test_createCrewNPC_boat_dialogue_is_staged_by_tier (one boat per tier) still passes unchanged.
  • Full suite run locally with the dummy SDL drivers: 1065 passed (1063 on main, plus 2 new).

Notes

  • black --check src/npc/villagers.py reports drift that already exists on main (the long ROLES[...] line in workDialogue). It was left alone to keep this diff to its scope.
  • No persisted field, schema or protected path is touched. README and PLANNING do not describe crew dialogue at this level, so neither needed an update.
  • Triage at the start of the cycle found no open issues. Crew boat dialogue describes the fleet's best hull, not the hand's own boat #240 was filed during this cycle after the gap was spotted while comparing workDialogue with boatDialogue.

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

"How's the boat treating you?" staged its answer on business.currentTier,
the best hull in the fleet, so a hand on a Rowboat in a fleet that also
held a Fishing Fleet praised the Fishing Fleet, and a hand ashore praised
whatever the best boat was. #164 moved the sibling work answer onto
boats.boatFor; the boat answer now does the same, with an ashore line
for an unassigned hand.

Closes #240

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

Copy link
Copy Markdown
Member Author

Self-review rubric (an inline review by the authoring session, not an independent review):

  • Scope: PASS. Two files change: src/npc/villagers.py (the boatDialogue lookup) and its mirror test file. No unrelated formatting was introduced. The black drift that already exists in villagers.py on main was left untouched.
  • Tests-new: PASS. No new public function was added. The new ashore branch is exercised by test_createCrewNPC_boat_dialogue_handles_an_unassigned_hand.
  • Tests-fix: PASS. With src/npc/villagers.py stashed, both new tests FAIL ('Rowboat' in "A whole Fishing Fleet! ..." and 'ashore' in "A whole Fishing Fleet! ..."). With the file restored, both PASS.
  • Sibling structure: PASS. The new tests follow the # prepare / # call / # check layout and the createEmployedPlayer factory used by neighbouring tests. The fix mirrors workDialogue's boatFor / None shape.
  • Sibling renames: PASS (not applicable). Nothing was renamed.
  • Docs: PASS. README and PLANNING do not describe crew dialogue at this level. No schema or persisted field is involved.
  • Issue resolution: PASS. Crew boat dialogue describes the fleet's best hull, not the hand's own boat #240 names boatDialogue and asks for an own-boat lookup plus an ashore line. Both are in the diff.
  • CI: PASS. test (1m23s) and docker are both green on the PR head.
  • Schema-sync: PASS (not applicable). Nothing is persisted.
  • Money-format: PASS (not applicable). No money display was added.
  • Deterministic-tests: PASS. The new tests involve no randomness.
  • Headless-pygame: PASS (not applicable).
  • camelCase: PASS. No new identifiers use snake_case.

Observation outside this diff, not acted on: the tier-2 line ("room to stow the catch") and the tier-1 line still describe a fishing boat whatever the boat's role is. A hand on a piracy Trawler therefore talks about stowing the catch. This is flavour rather than a wrong figure, and #164 only treated quoted numbers as a correctness issue, so it is recorded here and not fixed.

Summary: a one-function fix that matches the precedent #164 set. The regression tests have been confirmed to fail without the fix. No protected 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

@dmccoystephenson
dmccoystephenson merged commit 2f2e787 into main Oct 29, 2026
2 checks passed
@dmccoystephenson
dmccoystephenson deleted the fix/crew-boat-dialogue-own-boat branch October 29, 2026 03:16
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.

Crew boat dialogue describes the fleet's best hull, not the hand's own boat

1 participant