feat(economy): add /achievements milestone badges

15 one-time achievements over the lifetime stat counters (work/wealth/gambling/
crime/heists/fishing/streaks/prestige), each paying a modest one-time coin reward
when unlocked. Detection is lazy - opening /achievements claims any newly earned
(like quests roll on view) - so no per-command hook is needed, and rewards are a
bounded, one-time coin source.

- New achievements.py: ACHIEVEMENTS table, pure newly_earned/achievements_view,
  and locked do_check_achievements. New achievements_earned schema field.
- /achievements command (own view claims; viewing others is read-only) with
  progress bars, db_error handling, and an "unlocked" banner.

8 tests: threshold detection, one-time claim (no double pay), multi-unlock,
view progress capping.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VbAVsrZuYesea99mPMmPT
This commit is contained in:
Rene Arumetsa
2026-09-04 02:57:34 +03:00
parent 42bbdbd93d
commit 570d8b7cbd
9 changed files with 261 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ from .economy import (
VANITY_UI,
LOOTBOX_UI,
BANK_UI,
ACHIEVEMENTS_UI,
JAILED_UI,
SHOP_BTN,
DAILY_UI,
@@ -156,6 +157,7 @@ __all__ = [
'VANITY_UI',
'LOOTBOX_UI',
'BANK_UI',
'ACHIEVEMENTS_UI',
'JAILED_UI',
'SHOP_BTN',
'DAILY_UI',