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