Commit Graph

233 Commits

Author SHA1 Message Date
LemonNexus a349a85cbe fix(ui): use Decimal for armor decay calculation to avoid type error
- Fixed: Decimal * float is not supported
- Now using Decimal for all operands in decay calculation
2026-02-09 19:04:21 +00:00
LemonNexus 297552fd1c fix(ui): improve armor set piece slot detection
- Added name-based slot detection as fallback when Type field doesn't match
- Added more slot mapping variations (chest, armguards, thighguards, etc.)
- Added _get_slot_from_name() helper for name-based detection
- Now correctly equips all 7 pieces of armor sets like Frontier Adjusted
2026-02-09 19:01:23 +00:00
LemonNexus 4375a00f0f fix(api): correct NexusArmorSet parser for actual API structure
- Fixed field name: API uses 'Armors' not 'Pieces'
- Fixed protection location: API uses 'Defense' not per-piece protection
- Armors is array of arrays, now properly flattened
- Added set bonus parsing from EffectsOnSetEquip
2026-02-09 18:55:38 +00:00
LemonNexus f2d1162d27 fix(ui): correct attribute name for armor slots in loadout manager
- Changed self.armor_slots to self.slot_widgets to match actual attribute name
- Fixes AttributeError when selecting full armor sets
2026-02-09 18:52:00 +00:00
LemonNexus 3bdf86ab4c fix(api): handle absorber-specific fields (absorption instead of decay)
- Absorbers don't have Decay in Economy, only Absorption
- Updated parser to set decay=0 and absorption from Economy.Absorption for absorbers
- Updated UI to show absorption % in Decay column for absorbers
- Updated preview panel to display absorption for absorbers
2026-02-09 17:16:29 +00:00
LemonNexus 7f1e111a83 fix(ui): remove attachment_type overwrite in loader to preserve parsed type
- Removed code that was overwriting attachment_type for all items
- Type is now correctly parsed from API (scope vs sight)
- Sights tab now correctly shows items with Type='Sight'
2026-02-09 17:14:47 +00:00
LemonNexus c7afde4d41 chore: remove debug script 2026-02-09 17:12:58 +00:00
LemonNexus e8f0d7860e fix(api): correct attachment field parsing for all attachment types
- Fixed NexusAttachment.from_api() to parse correct API structure:
  - Amplifiers: Damage values from Properties.Damage
  - Scopes: Skill bonuses from Properties.SkillModification/SkillBonus, zoom from Properties.Zoom
  - Absorbers: Absorption from Economy.Absorption
- Added zoom and absorption fields to NexusAttachment
- Updated attachment selector UI to show type-specific columns
- Added zoom and absorption to preview panel
2026-02-09 17:12:44 +00:00
LemonNexus 4ef03d96c8 fix(api): improve NexusAttachment field parsing for weapon amplifiers
- Updated from_api() to check multiple possible field names
- Added fallback checks for Damage, Range, Decay, Efficiency fields
- Type detection from both API Type field and item name
- Improved display formatting in attachment selector
2026-02-09 17:07:31 +00:00
LemonNexus 1be69b1879 feat(ui): add armor set selection to armor selector
- Added tabs to ArmorSelectorDialog: Individual Pieces and Full Sets
- Armor sets show total protection across all 7 pieces
- Selecting a full set auto-populates all 7 armor slots in loadout manager
- Added armor_set_selected signal for full set selection
- Shows summary of equipped pieces and any missing ones
2026-02-09 17:04:21 +00:00
LemonNexus 1ba8acb7e2 feat(db): add database migration script for loadout support
- migrate_db.py adds loadout_id, mindforce_cost_ped, hits_taken, heals_used columns
- Creates loadouts table if not exists
- Updates schema version to 3
2026-02-09 16:55:38 +00:00
LemonNexus 1b176b96a8 feat(hud): integrate loadout-based cost tracking in HUD
- Added LoadoutSelectionDialog for choosing loadout when starting session
- Added set_cost_tracker() method to HUDOverlay for SessionCostTracker integration
- Added new display row for loadout metrics: $/shot, $/hit, $/heal, hits, heals
- Added mindforce cost support
- Updated start_session() to accept loadout_id and per-action costs
- Updated _refresh_display() to show new cost metrics
2026-02-09 16:14:51 +00:00
LemonNexus af624b26e0 feat(core): add loadout-session integration and cost tracking
- Added loadouts table to schema with full gear configuration
- Created LoadoutDatabase for CRUD operations on loadouts
- Created SessionCostTracker for real-time cost tracking based on loadout
- Added cost per shot/hit/heal tracking to HUDStats
- Added mindforce cost support throughout
- Database schema updated with loadout_id foreign key in hunting_sessions
2026-02-09 16:11:15 +00:00
LemonNexus b58af87533 feat(loadout): add mindforce implant field and tier-based enhancers to LoadoutConfig
- Added mindforce_implant and mindforce_decay_pec fields
- Changed enhancers from list to Dict[int, NexusEnhancer] for tier-based system
- Updated get_total_decay_per_shot() to include enhancer and mindforce decay
- Max 10 tiers, 1 enhancer per tier
2026-02-09 16:01:16 +00:00
LemonNexus 1e115db548 feat(ui): add armor set and mindforce implant selectors
- Created ArmorSetSelectorDialog for browsing full armor sets
- Created MindforceImplantSelectorDialog for MF chips/implants
- Both dialogs integrate with Entropia Nexus API
- Filter by type, search, and preview functionality included
2026-02-09 15:59:29 +00:00
LemonNexus 6bcd0ca799 feat(api): add armor sets and mindforce implants endpoints
- Added NexusArmorSet dataclass with pieces list and total protection
- Added NexusMindforceImplant dataclass for MF chips/implants
- Added get_all_armor_sets() method using /armorsets endpoint
- Added get_all_mindforce_implants() method using /mindforceimplants endpoint
- Added cache variables for both new endpoints
2026-02-09 15:55:55 +00:00
LemonNexus a5f286a76b fix(ui): update attachment selector to use new API endpoints
- Updated AttachmentLoaderThread to fetch from separate endpoints:
  - /weaponamplifiers for amplifiers
  - /weaponvisionattachments for scopes
  - /absorbers for absorbers
- Fixed get_all_attachments() AttributeError
2026-02-09 15:49:11 +00:00
LemonNexus b8fc0a8033 fix(api): fix NexusPlate dataclass - add missing protection_acid and protection_electric fields
- Added protection_acid and protection_electric to NexusPlate dataclass
- Updated hardcoded plates to use individual protection fields
- Fixed plate selector crash when sorting by protection
2026-02-09 15:47:53 +00:00
LemonNexus cf95732fff fix(api): update endpoints to match Entropia Nexus API structure
- Plates: /plates → /armorplatings
- Absorbers: Now using /absorbers (was /attachments)
- Amplifiers: Now using /weaponamplifiers (was /attachments)
- Scopes: Now using /weaponvisionattachments (was /attachments)
- Healing: Now fetches both /medicaltools AND /medicalchips

Added separate cache variables and methods for:
- _absorbers_cache, get_all_absorbers()
- _amplifiers_cache, get_all_amplifiers()
- _scopes_cache, get_all_scopes()
- _healing_chips_cache, get_all_healing_chips()
2026-02-09 15:35:54 +00:00
LemonNexus c38d577675 feat(api): add hardcoded plates data since API lacks plates endpoint
Added 20 common armor plates organized by protection type:
- Impact plates (Mk. 5B, 10A, 25A, 50A)
- Cut/Stab plates (Mk. 5C, 10C, 25C, 50C)
- Elemental plates (Electric, Burn, Acid, Cold)
- Shrapnel plates (Mk. 10S, 25S)
- Penetration plates (Mk. 10P, 25P)

Plates selector now works with fallback data.
2026-02-09 15:29:18 +00:00
LemonNexus cdadb7f081 fix(api): correct healing tools parser to use MaxHeal/MinHeal fields
API uses MaxHeal and MinHeal directly in Properties (not nested Heal object).
Parser now correctly reads heal amounts and calculates economy.
Also added type detection for chips vs FAPs based on item name.
2026-02-09 15:27:09 +00:00
LemonNexus 09e07984a0 fix(calc): correct PEC to PED conversion for cost/shot display
Cost per shot was showing PEC values labeled as PED (100x too high).
Now properly converts PEC to PED by dividing by 100 before display.

Before: 916.80 PEC displayed as 9.1680 PED (wrong)
After: 916.80 PEC displayed as 0.0917 PED (correct)
2026-02-09 15:12:39 +00:00
LemonNexus bd6abd60c2 refactor(ui): replace per-hour metrics with per-action cost metrics
Removed confusing per-hour calculations and replaced with practical
per-action metrics that players actually need:

New Metrics Displayed:
- ⚔️ Weapon: Cost/Shot (PED), DPS, DPP
- 🛡️ Armor: Cost/Hit (PED), Protection
- 💚 Healing: Cost/Heal (PED), HP/PEC

Removed:
- Activity Settings section (Shots/Hour, Hits/Hour, Heals/Hour)
- Per-hour cost calculations

The Break-Even calculator remains based on mob HP.

These metrics represent actual costs per action taken:
- Each shot fired costs X PED
- Each hit taken costs Y PED
- Each heal used costs Z PED

Much more intuitive for tracking hunt profitability.
2026-02-09 15:02:56 +00:00
LemonNexus 2183b79ce8 feat(ui): add separate Left/Right ring slots in loadout manager
- Split accessories section into Left Ring and Right Ring selectors
- Added Clothing and Pet buttons
- Updated AccessoriesSelectorDialog to accept slot_filter parameter
- Filter rings by Left Finger/Right Finger slot when selecting
- Store current_left_ring and current_right_ring in loadout
- Display ring effects (multi-effect support) in the UI

Ring effects like 'Decreased Critical Damage Taken 4%, Increased
Dodge Chance 4%' are now properly displayed.
2026-02-09 14:46:35 +00:00
LemonNexus 1db965f92a fix(ui): update ring selection to use effects dict
Fixed AttributeError in _on_ring_selected - NexusRing now uses
effects dict instead of effect_type/effect_value fields.
2026-02-09 14:39:50 +00:00
LemonNexus 9decd0ba5d fix(api): handle null/None values in API parsing
Added safe_decimal() helper to handle None/empty values from API
that were causing decimal.ConversionSyntax errors.

Fixed parsers:
- NexusHealingTool: Uses safe_decimal for decay/heal amounts
- NexusRing: Uses safe_decimal for max_tt/min_tt
- NexusClothing: Safely handles None buff values

Errors were occurring when API returned null for numeric fields
instead of 0.
2026-02-09 14:35:12 +00:00
LemonNexus ad3d8e535a fix(api): correct rings endpoint to /clothings with Type=Ring filter
- Changed endpoint from /rings to /clothings (correct plural form)
- Filter clothings for Type=Ring to get actual ring data
- Updated NexusRing dataclass to match API structure:
  - slot: 'Left Finger', 'Right Finger'
  - gender: 'Both', 'Male', 'Female'
  - effects: Dict of effect name -> value
  - max_tt/min_tt: PED values from Economy
- Updated UI to display effects dict properly
- Maintained hardcoded fallback
2026-02-09 14:28:14 +00:00
LemonNexus 366104b5a6 feat(api): add hardcoded ring data since API lacks rings endpoint
Added 20 common rings (Ares, Hermetic, Courage, Perseus, Zeus, Apollo,
Artemis, Hephaestus, Aphrodite, Dionysus) with Limited variants.
Fallback when /rings endpoint returns 404.
2026-02-09 14:20:54 +00:00
LemonNexus 032245ccad fix(ui): emit LoadoutConfig object instead of just name
The loadout_saved signal was emitting a string (loadout name) but
on_loadout_selected expected an object with .name attribute.
Now emits the full LoadoutConfig so all gear data is available.
2026-02-09 14:18:19 +00:00
LemonNexus 499c4c7383 fix(ui): show message when rings/clothing API data unavailable
The Entropia Nexus API doesn't have /rings or /clothing endpoints (404).
Added placeholder messages in the accessories selector instead of showing
empty lists. Pets endpoint works correctly (84 pets loaded).
2026-02-09 14:17:06 +00:00
LemonNexus 4d7d4e7545 fix(ui): add missing QComboBox import in accessories_selector.py
Selector dialog was failing to open due to NameError on QComboBox.
2026-02-09 14:14:02 +00:00
LemonNexus 36bc075e95 fix(armor): correct decay_per_hit to decay_per_hp field name
Fixed AttributeError where code was referencing non-existent 'decay_per_hit'
instead of the correct 'decay_per_hp' field on ArmorPiece and ArmorPlate.

- ui/loadout_manager.py: _get_current_config() plate/piece copy
- core/armor_system.py: equip_armor_selection() piece copy
2026-02-09 14:13:07 +00:00
LemonNexus a903a65275 fix(api): fix remaining lowercase fields in NexusWeapon 2026-02-09 14:07:44 +00:00
LemonNexus 27c3e5ad6e fix(api): use TitleCase for API field names (Id, Name, Properties)
- Nexus API returns TitleCase keys, not lowercase
- Fixed all from_api() methods to use correct case
- Armor, Healing, Plate, Attachment, Enhancer, Ring, Clothing, Pet
2026-02-09 14:05:56 +00:00
LemonNexus d9921993c8 fix(ui): remove non-existent AttachmentManagerWidget from imports 2026-02-09 13:44:59 +00:00
LemonNexus 48bce51d0f fix(loadout): add missing Nexus imports
- NexusAttachment, NexusEnhancer, NexusRing, NexusClothing, NexusPet
2026-02-09 13:08:01 +00:00
LemonNexus ad9cd2cd4c fix(loadout): remove leftover code causing indentation error
- Removed old attachment selection dialog code
- Fixed _on_attach() method
2026-02-09 13:06:05 +00:00
LemonNexus 78234da448 feat(loadout): complete data model for all gear types
- LoadoutConfig now includes:
  - weapon_enhancers: List of up to 10 enhancer configs
  - armor_plates: Dict of plate configs per slot
  - left_ring, right_ring: Ring selections
  - clothing_items: List of clothing
  - pet: Selected pet

- Cost calculations updated:
  - get_total_decay_per_shot() includes enhancer decay
  - calculate_armor_cost_per_hour() includes plate decay

- Serialization updated:
  - to_dict() handles enhancers and plates
  - from_dict() handles all new fields with defaults
2026-02-09 12:05:16 +00:00
LemonNexus cf7c4ab5de feat(loadout): add plate search button to each armor slot
- Each armor slot now has a 🔍 button for plate selection
- Opens PlateSelectorDialog filtered by armor's highest protection type
- Selected plates from API are added to the slot's combo box
- Plates auto-selected after API selection
2026-02-09 11:59:06 +00:00
LemonNexus 88a3c8b551 feat(loadout): wire ALL selectors into LoadoutManager
- Attachment buttons now open AttachmentSelectorDialog (API-based)
- NEW: Enhancer selection button with warning about breakage
- NEW: Accessories section (Rings, Clothing, Pets)
- Methods for all selectors:
  - _on_select_attachment() - Amps, Scopes, Absorbers
  - _on_select_enhancer() - Weapon/Armor enhancers
  - _on_select_accessories() - Rings, Clothing, Pets
  - _on_ring_selected(), _on_clothing_selected(), _on_pet_selected()

Complete gear selection now available!
2026-02-09 11:57:27 +00:00
LemonNexus c490a84982 feat(selectors): add enhancer and accessories selectors
- NEW: ui/enhancer_selector.py - Weapon/Armor enhancer browser
  - Filter by type (Damage, Economy, Range, etc.)
  - Filter by tier (1-5+)
  - Risk level indicator (Low/Medium/High break chance)
  - Warning about enhancer breakage

- NEW: ui/accessories_selector.py - Rings, Clothing, Pets browser
  - Tabbed interface: Rings / Clothing / Pets
  - Rings: Limited items highlighted
  - Clothing: Buff display, cosmetic indicator
  - Pets: Effect display, level requirements
2026-02-09 11:54:00 +00:00
LemonNexus 1c0d684c4c feat(selectors): add plate and attachment selectors
- NEW: ui/plate_selector.py - Searchable plate browser
  - Filter by protection type (Impact, Cut, etc.)
  - Filter by minimum protection
  - Highlights plates matching mob damage type

- NEW: ui/attachment_selector.py - Tabbed attachment browser
  - Tabs: All, Amplifiers, Scopes, Sights, Absorbers
  - Search within each category
  - Color-coded by attachment type
2026-02-09 11:50:45 +00:00
LemonNexus 649aa77bc9 feat(loadout): wire armor and healing API selectors into LoadoutManager
- Added 'Search Entropia Nexus Armors' button
- Added 'Search Healing Tools from Nexus' button
- New methods: _on_select_armor_from_api(), _on_select_healing_from_api()
- Armor selection shows durability and protection summary
- Healing selection auto-updates cost and heal amount fields
2026-02-09 11:47:51 +00:00
LemonNexus dceafbc69f feat(api): full Entropia Nexus API integration + searchable selectors
- NEW: core/nexus_full_api.py - Complete API for all gear types
  - Weapons, Armors, Plates, Attachments, Enhancers
  - Healing Tools, Rings, Clothing, Pets
  - Search across all categories

- NEW: ui/armor_selector.py - Searchable armor browser
  - Real-time search, filter by protection type
  - Preview panel with economy info

- NEW: ui/healing_selector.py - Searchable healing tool browser
  - Filter by type (FAP/Chip/Limited)
  - Filter by heal amount
  - Color-coded economy ratings

All gear now searchable like weapons!
2026-02-09 11:43:25 +00:00
LemonNexus 6a6d50e5f8 fix(armor): add decay_per_hp field to ArmorPlate
- Added decay_per_hp field with default 0.05
- Changed constants to ClassVar like ArmorPiece
2026-02-09 11:26:49 +00:00
LemonNexus 62e9fa4a38 fix(armor): replace old slot names with new Nexus slot names
- CHEST -> TORSO
- LEFT_ARM/RIGHT_ARM -> ARMS
- LEFT_HAND/RIGHT_HAND -> HANDS

Note: Duplicate ARMS/HANDS entries exist in armor sets - second entry overwrites first
2026-02-09 11:23:09 +00:00
LemonNexus 30229a8ce3 fix(armor): add decay_per_hp field and ClassVar constants to ArmorPiece
- Added decay_per_hp field for custom economy per piece
- Added BASE_DECAY_FACTOR and MAX_DURABILITY as ClassVar
- Added ClassVar to typing imports
2026-02-09 11:22:35 +00:00
LemonNexus 8e26602069 fix(ui): update ArmorSlotWidget to use new Nexus slot names
- CHEST -> TORSO
- LEFT_ARM/RIGHT_ARM -> ARMS
- LEFT_HAND/RIGHT_HAND -> HANDS
- THIGHS -> LEGS
- Added SHINS and FEET
2026-02-09 11:18:26 +00:00
LemonNexus 0e5e54e386 docs: add complete equipment structure from Nexus export
- Full 7-slot armor system (Head, Torso, Arms, Hands, Legs, Shins, Feet)
- Weapon attachments (Scope, Sight x2, Amp, Absorber, Matrix, Implant)
- 10 weapon enhancer slots
- Clothing/Accessories system
- Consumables and Pets
- Markup tracking structure
- Priority implementation roadmap
2026-02-09 11:07:48 +00:00
LemonNexus 9e55c751b9 fix(armor): match Entropia Nexus slot naming exactly
- TORSO (was CHEST) - Harness/Chest piece
- LEGS (was THIGHS) - Thigh Guards
- Updated Frontier set with correct slots
- Display names match Nexus: Head, Torso, Arms, Hands, Legs, Shins, Feet

Now matches Nexus JSON export structure exactly
2026-02-09 11:06:46 +00:00