Skip to content

Add achievements system with Discord UI and persistence - #26

Open
Appurupai3 wants to merge 6 commits into
mainfrom
codex-y390um
Open

Add achievements system with Discord UI and persistence#26
Appurupai3 wants to merge 6 commits into
mainfrom
codex-y390um

Conversation

@Appurupai3

Copy link
Copy Markdown
Owner

Motivation

  • Provide an in-app achievements catalogue and UI so players can view unlocked and progress achievements for economy games.
  • Persist unlocked achievements to a scoreboard file so progress is stored across runs.

Description

  • Add a new dcrbot/achievements.py that defines an Achievement dataclass, a large ACHIEVEMENTS catalogue, checks for many game-specific stats, functions to load/save records to leaderboard/info/achievements.json, and sync_user_achievement_records that writes newly unlocked achievements.
  • Implement build_achievement_embed to generate Discord embeds for overall or per-game achievement views and add AchievementGameSelect and AchievementView UI components for selection and display.
  • Wire the new feature into bot.py by importing AchievementView and build_achievement_embed and adding Achievement buttons to EconomyMenu and GameMenu that call open_account then send the achievement embed/view.

Testing

  • No automated tests were executed for this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant