Backup before cleanup
This commit is contained in:
@@ -158,6 +158,7 @@ async def _get_enriched_inventory(player_id: int):
|
||||
"unique_stats": unique_stats,
|
||||
"hp_restore": item.effects.get('hp_restore') if item.effects else None,
|
||||
"stamina_restore": item.effects.get('stamina_restore') if item.effects else None,
|
||||
"effects": item.effects,
|
||||
"damage_min": item.stats.get('damage_min') if item.stats else None,
|
||||
"damage_max": item.stats.get('damage_max') if item.stats else None,
|
||||
"stats": item.stats,
|
||||
@@ -183,6 +184,10 @@ async def get_game_state(current_user: dict = Depends(get_current_user)):
|
||||
if not player:
|
||||
raise HTTPException(status_code=404, detail="Player not found")
|
||||
|
||||
# Get player status effects
|
||||
status_effects = await db.get_player_effects(player_id)
|
||||
player['status_effects'] = status_effects
|
||||
|
||||
# Get location
|
||||
location = LOCATIONS.get(player['location_id'])
|
||||
|
||||
@@ -274,6 +279,7 @@ async def get_game_state(current_user: dict = Depends(get_current_user)):
|
||||
"tier": tier if tier is not None else None,
|
||||
"hp_restore": item.effects.get('hp_restore') if item.effects else None,
|
||||
"stamina_restore": item.effects.get('stamina_restore') if item.effects else None,
|
||||
"effects": item.effects,
|
||||
"damage_min": item.stats.get('damage_min') if item.stats else None,
|
||||
"damage_max": item.stats.get('damage_max') if item.stats else None
|
||||
})
|
||||
@@ -325,6 +331,10 @@ async def get_player_profile(current_user: dict = Depends(get_current_user)):
|
||||
player = await db.get_player_by_id(player_id)
|
||||
if not player:
|
||||
raise HTTPException(status_code=404, detail="Player not found")
|
||||
|
||||
# Get player status effects
|
||||
status_effects = await db.get_player_effects(player_id)
|
||||
player['status_effects'] = status_effects
|
||||
|
||||
# Get capacity metrics (weight/volume) using the helper function
|
||||
# We don't need the inventory array itself, just the capacity calculations
|
||||
|
||||
Reference in New Issue
Block a user