From 76b531d5bf47127d3cb724a80047031729208ab5 Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Sun, 15 Nov 2026 21:18:21 -0700 Subject: [PATCH] Quote the crew's wages as a cost at the bank (#282) Margaret called totalWagesPaid money the crew "brought in" and the player's "profits". It is the payroll the player has paid out, so both lines now describe it that way and aim the savings advice at what is left after payday. Co-Authored-By: Claude Opus 5.5 --- src/location/bank.py | 14 ++++++++------ tests/location/test_bank.py | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/location/bank.py b/src/location/bank.py index e253e71..da123a1 100644 --- a/src/location/bank.py +++ b/src/location/bank.py @@ -121,16 +121,18 @@ def _businessDialogue(self): "with the morning. Wages come out of your purse, not this " "account, so keep enough on you to cover them." ) + # totalWagesPaid is money the player has paid out, so it's quoted as + # a payroll, never as something the crew earned (#282). if business.currentTier(self.player) >= 3: return ( - "A whole Fishing Fleet, paying out $%d in wages so far? " - "You could retire a wealthy soul if you keep banking those " - "profits!" % self.stats.totalWagesPaid + "A whole Fishing Fleet, with $%d paid out in wages so far? " + "Bank what's left once the crew are paid and you could retire " + "a wealthy soul!" % self.stats.totalWagesPaid ) return ( - "Your crew's brought in $%d in wages paid out so far - quite the " - "little enterprise! Don't let it all burn a hole in your pocket, " - "park some of it here and let it earn interest." % self.stats.totalWagesPaid + "Your crew have drawn $%d in wages so far - quite the little " + "enterprise! Keep enough in your purse for payday, and park the " + "rest here to earn interest." % self.stats.totalWagesPaid ) def run(self): diff --git a/tests/location/test_bank.py b/tests/location/test_bank.py index 4bc8141..022da5b 100644 --- a/tests/location/test_bank.py +++ b/tests/location/test_bank.py @@ -197,6 +197,26 @@ def test_npc_business_dialogue_fleet_tier(): assert "retire a wealthy soul" in bankInstance._businessDialogue() +@pytest.mark.parametrize("tier", [1, 3]) +def test_npc_business_dialogue_quotes_wages_as_a_cost_not_income(tier): + # prepare - totalWagesPaid is money paid out to the crew, so Margaret + # mustn't call it something the crew brought in, or the player's profits + # (#282) + bankInstance = createBank() + boats.addBoat(bankInstance.player, tier) + bankInstance.player.workers = 2 + bankInstance.stats.totalWagesPaid = 240 + + # call + response = bankInstance._businessDialogue() + + # check + assert "$240" in response + assert "paid out in wages" in response or "drawn $240 in wages" in response + assert "brought in" not in response + assert "profits" not in response + + @pytest.mark.parametrize("tier", [1, 3]) def test_npc_business_dialogue_quotes_no_wages_before_the_first_payday(tier): # prepare - hired today, so no morning has paid them yet