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
This commit is contained in:
parent
cf95732fff
commit
b8fc0a8033
|
|
@ -119,6 +119,8 @@ class NexusPlate(NexusItem):
|
||||||
protection_stab: Decimal
|
protection_stab: Decimal
|
||||||
protection_burn: Decimal
|
protection_burn: Decimal
|
||||||
protection_cold: Decimal
|
protection_cold: Decimal
|
||||||
|
protection_acid: Decimal
|
||||||
|
protection_electric: Decimal
|
||||||
decay: Decimal
|
decay: Decimal
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
@ -137,6 +139,8 @@ class NexusPlate(NexusItem):
|
||||||
protection_stab=Decimal(str(protection.get('Stab', 0))),
|
protection_stab=Decimal(str(protection.get('Stab', 0))),
|
||||||
protection_burn=Decimal(str(protection.get('Burn', 0))),
|
protection_burn=Decimal(str(protection.get('Burn', 0))),
|
||||||
protection_cold=Decimal(str(protection.get('Cold', 0))),
|
protection_cold=Decimal(str(protection.get('Cold', 0))),
|
||||||
|
protection_acid=Decimal(str(protection.get('Acid', 0))),
|
||||||
|
protection_electric=Decimal(str(protection.get('Electric', 0))),
|
||||||
decay=Decimal(str(props.get('Decay', 0))),
|
decay=Decimal(str(props.get('Decay', 0))),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -409,52 +413,92 @@ class EntropiaNexusFullAPI:
|
||||||
return [
|
return [
|
||||||
# Impact Plates
|
# Impact Plates
|
||||||
NexusPlate(id=1, name="Armor Plating Mk. 5B", item_id="plate_5b", category="plate",
|
NexusPlate(id=1, name="Armor Plating Mk. 5B", item_id="plate_5b", category="plate",
|
||||||
protection=ProtectionProfile(impact=6), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("6"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=2, name="Armor Plating Mk. 10A", item_id="plate_10a", category="plate",
|
NexusPlate(id=2, name="Armor Plating Mk. 10A", item_id="plate_10a", category="plate",
|
||||||
protection=ProtectionProfile(impact=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("12"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=3, name="Armor Plating Mk. 25A", item_id="plate_25a", category="plate",
|
NexusPlate(id=3, name="Armor Plating Mk. 25A", item_id="plate_25a", category="plate",
|
||||||
protection=ProtectionProfile(impact=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("25"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=4, name="Armor Plating Mk. 50A", item_id="plate_50a", category="plate",
|
NexusPlate(id=4, name="Armor Plating Mk. 50A", item_id="plate_50a", category="plate",
|
||||||
protection=ProtectionProfile(impact=50), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("50"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
# Cut/Stab Plates
|
# Cut/Stab Plates
|
||||||
NexusPlate(id=5, name="Armor Plating Mk. 5C", item_id="plate_5c", category="plate",
|
NexusPlate(id=5, name="Armor Plating Mk. 5C", item_id="plate_5c", category="plate",
|
||||||
protection=ProtectionProfile(cut=6, stab=6), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("6"), protection_stab=Decimal("6"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=6, name="Armor Plating Mk. 10C", item_id="plate_10c", category="plate",
|
NexusPlate(id=6, name="Armor Plating Mk. 10C", item_id="plate_10c", category="plate",
|
||||||
protection=ProtectionProfile(cut=12, stab=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("12"), protection_stab=Decimal("12"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=7, name="Armor Plating Mk. 25C", item_id="plate_25c", category="plate",
|
NexusPlate(id=7, name="Armor Plating Mk. 25C", item_id="plate_25c", category="plate",
|
||||||
protection=ProtectionProfile(cut=25, stab=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("25"), protection_stab=Decimal("25"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=8, name="Armor Plating Mk. 50C", item_id="plate_50c", category="plate",
|
NexusPlate(id=8, name="Armor Plating Mk. 50C", item_id="plate_50c", category="plate",
|
||||||
protection=ProtectionProfile(cut=50, stab=50), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("50"), protection_stab=Decimal("50"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
# Electric Plates
|
# Electric Plates
|
||||||
NexusPlate(id=9, name="Armor Plating Mk. 10E", item_id="plate_10e", category="plate",
|
NexusPlate(id=9, name="Armor Plating Mk. 10E", item_id="plate_10e", category="plate",
|
||||||
protection=ProtectionProfile(electric=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("12"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=10, name="Armor Plating Mk. 25E", item_id="plate_25e", category="plate",
|
NexusPlate(id=10, name="Armor Plating Mk. 25E", item_id="plate_25e", category="plate",
|
||||||
protection=ProtectionProfile(electric=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("25"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
# Burn Plates
|
# Burn Plates
|
||||||
NexusPlate(id=11, name="Armor Plating Mk. 10F", item_id="plate_10f", category="plate",
|
NexusPlate(id=11, name="Armor Plating Mk. 10F", item_id="plate_10f", category="plate",
|
||||||
protection=ProtectionProfile(burn=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("12"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=12, name="Armor Plating Mk. 25F", item_id="plate_25f", category="plate",
|
NexusPlate(id=12, name="Armor Plating Mk. 25F", item_id="plate_25f", category="plate",
|
||||||
protection=ProtectionProfile(burn=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("25"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
# Acid Plates
|
# Acid Plates
|
||||||
NexusPlate(id=13, name="Armor Plating Mk. 10Acd", item_id="plate_10acd", category="plate",
|
NexusPlate(id=13, name="Armor Plating Mk. 10Acd", item_id="plate_10acd", category="plate",
|
||||||
protection=ProtectionProfile(acid=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("12"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=14, name="Armor Plating Mk. 25Acd", item_id="plate_25acd", category="plate",
|
NexusPlate(id=14, name="Armor Plating Mk. 25Acd", item_id="plate_25acd", category="plate",
|
||||||
protection=ProtectionProfile(acid=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("25"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
# Cold Plates
|
# Cold Plates
|
||||||
NexusPlate(id=15, name="Armor Plating Mk. 10Cl", item_id="plate_10cl", category="plate",
|
NexusPlate(id=15, name="Armor Plating Mk. 10Cl", item_id="plate_10cl", category="plate",
|
||||||
protection=ProtectionProfile(cold=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("12"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=16, name="Armor Plating Mk. 25Cl", item_id="plate_25cl", category="plate",
|
NexusPlate(id=16, name="Armor Plating Mk. 25Cl", item_id="plate_25cl", category="plate",
|
||||||
protection=ProtectionProfile(cold=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("25"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
# Shrapnel Plates
|
# Shrapnel Plates
|
||||||
NexusPlate(id=17, name="Armor Plating Mk. 10S", item_id="plate_10s", category="plate",
|
NexusPlate(id=17, name="Armor Plating Mk. 10S", item_id="plate_10s", category="plate",
|
||||||
protection=ProtectionProfile(shrapnel=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=18, name="Armor Plating Mk. 25S", item_id="plate_25s", category="plate",
|
NexusPlate(id=18, name="Armor Plating Mk. 25S", item_id="plate_25s", category="plate",
|
||||||
protection=ProtectionProfile(shrapnel=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
# Penetration Plates
|
# Penetration Plates
|
||||||
NexusPlate(id=19, name="Armor Plating Mk. 10P", item_id="plate_10p", category="plate",
|
NexusPlate(id=19, name="Armor Plating Mk. 10P", item_id="plate_10p", category="plate",
|
||||||
protection=ProtectionProfile(penetration=12), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
NexusPlate(id=20, name="Armor Plating Mk. 25P", item_id="plate_25p", category="plate",
|
NexusPlate(id=20, name="Armor Plating Mk. 25P", item_id="plate_25p", category="plate",
|
||||||
protection=ProtectionProfile(penetration=25), decay_per_hp=Decimal("0.05")),
|
protection_impact=Decimal("0"), protection_cut=Decimal("0"), protection_stab=Decimal("0"),
|
||||||
|
protection_burn=Decimal("0"), protection_cold=Decimal("0"), protection_acid=Decimal("0"), protection_electric=Decimal("0"),
|
||||||
|
decay=Decimal("0.05")),
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_all_absorbers(self, force_refresh: bool = False) -> List[NexusAttachment]:
|
def get_all_absorbers(self, force_refresh: bool = False) -> List[NexusAttachment]:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue