Fix team builder issues, Added startup import checks for consistency
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
08f7aa8ea8
commit
39ba55832d
5 changed files with 192 additions and 60 deletions
|
|
@ -515,6 +515,19 @@ class Database:
|
|||
|
||||
return False
|
||||
|
||||
async def check_all_achievements(self, player_id: int) -> List[Dict]:
|
||||
"""Check and award ALL possible achievements for a player"""
|
||||
all_new_achievements = []
|
||||
|
||||
# Check all achievement types that might be available
|
||||
achievement_types = ["catch_type", "catch_total", "explore_count"]
|
||||
|
||||
for achievement_type in achievement_types:
|
||||
new_achievements = await self.check_player_achievements(player_id, achievement_type, "")
|
||||
all_new_achievements.extend(new_achievements)
|
||||
|
||||
return all_new_achievements
|
||||
|
||||
async def get_player_achievements(self, player_id: int) -> List[Dict]:
|
||||
"""Get all achievements earned by player"""
|
||||
async with aiosqlite.connect(self.db_path) as db:
|
||||
|
|
|
|||
|
|
@ -529,6 +529,10 @@ class GameEngine:
|
|||
"""Check for new achievements after player actions"""
|
||||
return await self.database.check_player_achievements(player_id, action_type, data)
|
||||
|
||||
async def check_all_achievements(self, player_id: int):
|
||||
"""Check and award ALL possible achievements for a player"""
|
||||
return await self.database.check_all_achievements(player_id)
|
||||
|
||||
async def get_weather_modified_spawns(self, location_id: int, spawns: list) -> list:
|
||||
"""Apply weather modifiers to spawn rates"""
|
||||
weather = await self.database.get_location_weather(location_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue