From a903a65275361a8248b0627f562a7a392a54fae5 Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Mon, 9 Feb 2026 14:07:44 +0000 Subject: [PATCH] fix(api): fix remaining lowercase fields in NexusWeapon --- core/nexus_full_api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/nexus_full_api.py b/core/nexus_full_api.py index 2832483..702fc4e 100644 --- a/core/nexus_full_api.py +++ b/core/nexus_full_api.py @@ -51,14 +51,14 @@ class NexusWeapon(NexusItem): @classmethod def from_api(cls, data: Dict[str, Any]) -> "NexusWeapon": """Create from API response.""" - props = data.get('properties', {}) + props = data.get('Properties', {}) economy = props.get('Economy', {}) damage = props.get('Damage', {}) return cls( - id=data.get('id', 0), - name=data.get('name', 'Unknown'), - item_id=str(data.get('id', 0)), + id=data.get('Id', 0), + name=data.get('Name', 'Unknown'), + item_id=str(data.get('Id', 0)), category='weapon', damage=Decimal(str(damage.get('Total', 0))), decay=Decimal(str(economy.get('Decay', 0))), @@ -68,7 +68,7 @@ class NexusWeapon(NexusItem): cost_per_hour=Decimal(str(economy.get('CostPerHour', 0))), efficiency=Decimal(str(props.get('Efficiency', 0))), range_val=Decimal(str(props.get('Range', 0))), - type=data.get('type', ''), + type=props.get('Type', ''), )