Skip to content

Add operator mode for testing without money constraints#102

Merged
dmccoystephenson merged 2 commits into
mainfrom
feature/operator-mode
Jul 4, 2026
Merged

Add operator mode for testing without money constraints#102
dmccoystephenson merged 2 commits into
mainfrom
feature/operator-mode

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • Adds a Player.operatorMode flag (defaults from the FISHE_OPERATOR_MODE env var, e.g. FISHE_OPERATOR_MODE=1 python3 src/fishE.py) with canAfford()/spendMoney() helpers.
  • Every money-gated action — buying bait/rod, buying a boat, hiring/paying workers, drinking, gambling, and bank deposits — now routes through these helpers, so with operator mode on you can do all of it regardless of cash on hand, and workers never quit for missed payroll.
  • Not persisted to save files; it's a runtime/testing toggle, not game progress.
  • Surfaces an [OPERATOR MODE] indicator in the console, pygame, and web front-ends so it's obvious when it's active.

Test plan

  • python3 -m pytest -q — 213 passed, 11 pre-existing pygame failures (no video device in this sandbox; confirmed present on main too, unrelated to this change)
  • Manual script verifying operator mode bypasses canAfford/spendMoney/worker-quit logic with $0 on hand
  • Manual script verifying default (non-operator) behavior is unchanged

🤖 Generated with Claude Code

dmccoystephenson and others added 2 commits July 4, 2026 12:34
Adds a Player.operatorMode flag (enabled via FISHE_OPERATOR_MODE env var)
with canAfford()/spendMoney() helpers that bypass every money gate across
the shop, docks, tavern, bank, and business systems, so testers can buy
gear, hire crew, and gamble without needing cash. Not persisted to saves.
Surfaces an [OPERATOR MODE] indicator in all three front-ends.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds Player.hasEnergy()/spendEnergy() (mirroring canAfford/spendMoney) so
fishing works regardless of energy in operator mode, and skips the shop's
daily buy-budget check when selling fish, so testers can fish and sell
without running into either resource gate.
@dmccoystephenson dmccoystephenson merged commit 62a79b9 into main Jul 4, 2026
1 check passed
@dmccoystephenson dmccoystephenson deleted the feature/operator-mode branch July 4, 2026 18:46
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.

1 participant