Merge branch 'master' into py3EFFS
This commit is contained in:
@@ -24,10 +24,10 @@ saveInRoot = False
|
|||||||
|
|
||||||
# Version data
|
# Version data
|
||||||
|
|
||||||
version = "2.2.0b1"
|
version = "2.3.0"
|
||||||
tag = "git"
|
tag = "Stable"
|
||||||
expansionName = "Into the Abyss"
|
expansionName = "YC120.7"
|
||||||
expansionVersion = "1.1"
|
expansionVersion = "1.2"
|
||||||
evemonMinVersion = "4081"
|
evemonMinVersion = "4081"
|
||||||
|
|
||||||
minItemSearchLength = 3
|
minItemSearchLength = 3
|
||||||
|
|||||||
@@ -73,4 +73,7 @@ exe = EXE(pyz,
|
|||||||
app = BUNDLE(exe,
|
app = BUNDLE(exe,
|
||||||
name='pyfa.app',
|
name='pyfa.app',
|
||||||
icon=icon,
|
icon=icon,
|
||||||
bundle_identifier=None)
|
bundle_identifier=None,
|
||||||
|
info_plist={
|
||||||
|
'NSHighResolutionCapable': 'True'
|
||||||
|
})
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ dynamicAttributes_table = Table("mutaplasmidAttributes", gamedata_meta,
|
|||||||
|
|
||||||
dynamicApplicable_table = Table("mutaplasmidItems", gamedata_meta,
|
dynamicApplicable_table = Table("mutaplasmidItems", gamedata_meta,
|
||||||
Column("typeID", ForeignKey("mutaplasmids.typeID"), primary_key=True),
|
Column("typeID", ForeignKey("mutaplasmids.typeID"), primary_key=True),
|
||||||
Column("applicableTypeID", ForeignKey("invtypes.typeID"), primary_key=True),
|
Column("applicableTypeID", ForeignKey("invtypes.typeID"), primary_key=True),)
|
||||||
)
|
|
||||||
|
|
||||||
mapper(DynamicItem, dynamic_table, properties={
|
mapper(DynamicItem, dynamic_table, properties={
|
||||||
"attributes": relation(DynamicItemAttribute),
|
"attributes": relation(DynamicItemAttribute),
|
||||||
|
|||||||
@@ -63,8 +63,7 @@ mapper(Item, items_table,
|
|||||||
primaryjoin=dynamicApplicable_table.c.applicableTypeID == items_table.c.typeID,
|
primaryjoin=dynamicApplicable_table.c.applicableTypeID == items_table.c.typeID,
|
||||||
secondaryjoin=dynamicApplicable_table.c.typeID == DynamicItem.typeID,
|
secondaryjoin=dynamicApplicable_table.c.typeID == DynamicItem.typeID,
|
||||||
secondary=dynamicApplicable_table,
|
secondary=dynamicApplicable_table,
|
||||||
backref="applicableItems"
|
backref="applicableItems")
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
Item.category = association_proxy("group", "category")
|
Item.category = association_proxy("group", "category")
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ def getItemWithBaseItemAttribute(lookfor, baseItemID, eager=None):
|
|||||||
gamedata_session.expunge(item)
|
gamedata_session.expunge(item)
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|
||||||
@cachedQuery(1, "lookfor")
|
@cachedQuery(1, "lookfor")
|
||||||
def getItems(lookfor, eager=None):
|
def getItems(lookfor, eager=None):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ fits_table = Table("fits", saveddata_meta,
|
|||||||
Column("booster", Boolean, nullable=False, index=True, default=0),
|
Column("booster", Boolean, nullable=False, index=True, default=0),
|
||||||
Column("targetResistsID", ForeignKey("targetResists.ID"), nullable=True),
|
Column("targetResistsID", ForeignKey("targetResists.ID"), nullable=True),
|
||||||
Column("modeID", Integer, nullable=True),
|
Column("modeID", Integer, nullable=True),
|
||||||
Column("implantLocation", Integer, nullable=True),
|
Column("implantLocation", Integer, nullable=False),
|
||||||
Column("notes", String, nullable=True),
|
Column("notes", String, nullable=True),
|
||||||
Column("ignoreRestrictions", Boolean, default=0),
|
Column("ignoreRestrictions", Boolean, default=0),
|
||||||
Column("created", DateTime, nullable=True, default=datetime.datetime.now),
|
Column("created", DateTime, nullable=True, default=datetime.datetime.now),
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ mutator_table = Table("mutators", saveddata_meta,
|
|||||||
Column("attrID", Integer, primary_key=True, index=True),
|
Column("attrID", Integer, primary_key=True, index=True),
|
||||||
Column("value", Float, nullable=False),
|
Column("value", Float, nullable=False),
|
||||||
Column("created", DateTime, nullable=True, default=datetime.datetime.now),
|
Column("created", DateTime, nullable=True, default=datetime.datetime.now),
|
||||||
Column("modified", DateTime, nullable=True, onupdate=datetime.datetime.now)
|
Column("modified", DateTime, nullable=True, onupdate=datetime.datetime.now))
|
||||||
)
|
|
||||||
|
|
||||||
mapper(Mutator, mutator_table)
|
mapper(Mutator, mutator_table)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# armorAllRepairSystemsAmountBonusPassive
|
# armorAllRepairSystemsAmountBonusPassive
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Agency 'Hardshell' TB Dose (3 of 4)
|
# Implants named like: Agency 'Hardshell' TB Dose (4 of 4)
|
||||||
# Implants named like: Exile Booster (4 of 4)
|
# Implants named like: Exile Booster (4 of 4)
|
||||||
# Implant: Antipharmakon Kosybo
|
# Implant: Antipharmakon Kosybo
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
# boosterMaxVelocityPenalty
|
# boosterMaxVelocityPenalty
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Booster (12 of 33)
|
# Implants named like: Crash Booster (3 of 4)
|
||||||
|
# Items from market group: Implants & Boosters > Booster > Booster Slot 02 (9 of 13)
|
||||||
type = "boosterSideEffect"
|
type = "boosterSideEffect"
|
||||||
|
|
||||||
# User-friendly name for the side effect
|
# User-friendly name for the side effect
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# boosterShieldCapacityPenalty
|
# boosterShieldCapacityPenalty
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Booster (12 of 33)
|
# Implants from group: Booster (12 of 66)
|
||||||
type = "boosterSideEffect"
|
type = "boosterSideEffect"
|
||||||
|
|
||||||
# User-friendly name for the side effect
|
# User-friendly name for the side effect
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# capacitorCapacityBonus
|
# capacitorCapacityBonus
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Modules from group: Capacitor Battery (27 of 27)
|
# Modules from group: Capacitor Battery (30 of 30)
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# energyNosferatuFalloff
|
# energyNosferatuFalloff
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Modules from group: Energy Nosferatu (51 of 51)
|
# Modules from group: Energy Nosferatu (54 of 54)
|
||||||
from eos.modifiedAttributeDict import ModifiedAttributeDict
|
from eos.modifiedAttributeDict import ModifiedAttributeDict
|
||||||
|
|
||||||
type = "active", "projected"
|
type = "active", "projected"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# missileSkillWarheadUpgradesEmDamageBonus
|
# missileSkillWarheadUpgradesEmDamageBonus
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4)
|
# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4)
|
||||||
# Skill: Warhead Upgrades
|
# Skill: Warhead Upgrades
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# missileSkillWarheadUpgradesExplosiveDamageBonus
|
# missileSkillWarheadUpgradesExplosiveDamageBonus
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4)
|
# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4)
|
||||||
# Skill: Warhead Upgrades
|
# Skill: Warhead Upgrades
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# missileSkillWarheadUpgradesKineticDamageBonus
|
# missileSkillWarheadUpgradesKineticDamageBonus
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4)
|
# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4)
|
||||||
# Skill: Warhead Upgrades
|
# Skill: Warhead Upgrades
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# missileSkillWarheadUpgradesThermalDamageBonus
|
# missileSkillWarheadUpgradesThermalDamageBonus
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4)
|
# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4)
|
||||||
# Skill: Warhead Upgrades
|
# Skill: Warhead Upgrades
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# modifyEnergyWarfareResistance
|
# modifyEnergyWarfareResistance
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Modules from group: Capacitor Battery (27 of 27)
|
# Modules from group: Capacitor Battery (30 of 30)
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Modules from group: Rig Anchor (4 of 4)
|
# Modules from group: Rig Anchor (4 of 4)
|
||||||
# Implants named like: Agency 'Overclocker' SB Dose (3 of 4)
|
# Implants named like: Agency 'Overclocker' SB Dose (4 of 4)
|
||||||
# Implants named like: grade Snake (16 of 18)
|
# Implants named like: grade Snake (16 of 18)
|
||||||
# Modules named like: Auxiliary Thrusters (8 of 8)
|
# Modules named like: Auxiliary Thrusters (8 of 8)
|
||||||
# Implant: Quafe Zero
|
# Implant: Quafe Zero
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Used by:
|
# Used by:
|
||||||
# Modules from group: Capacitor Booster (59 of 59)
|
# Modules from group: Capacitor Booster (59 of 59)
|
||||||
# Modules from group: Energy Neutralizer (54 of 54)
|
# Modules from group: Energy Neutralizer (54 of 54)
|
||||||
# Modules from group: Energy Nosferatu (51 of 51)
|
# Modules from group: Energy Nosferatu (54 of 54)
|
||||||
# Modules from group: Hull Repair Unit (25 of 25)
|
# Modules from group: Hull Repair Unit (25 of 25)
|
||||||
# Modules from group: Remote Armor Repairer (39 of 39)
|
# Modules from group: Remote Armor Repairer (39 of 39)
|
||||||
# Modules from group: Remote Capacitor Transmitter (41 of 41)
|
# Modules from group: Remote Capacitor Transmitter (41 of 41)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# shieldBoostAmplifierPassiveBooster
|
# shieldBoostAmplifierPassiveBooster
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Agency 'Hardshell' TB Dose (3 of 4)
|
# Implants named like: Agency 'Hardshell' TB Dose (4 of 4)
|
||||||
# Implants named like: Blue Pill Booster (5 of 5)
|
# Implants named like: Blue Pill Booster (5 of 5)
|
||||||
# Implant: Antipharmakon Thureo
|
# Implant: Antipharmakon Thureo
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
# shipPDmgBonusMF
|
# shipPDmgBonusMF
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Variations of ship: Slasher (3 of 3)
|
|
||||||
# Ship: Cheetah
|
# Ship: Cheetah
|
||||||
# Ship: Freki
|
# Ship: Freki
|
||||||
# Ship: Republic Fleet Firetail
|
# Ship: Republic Fleet Firetail
|
||||||
# Ship: Rifter
|
# Ship: Rifter
|
||||||
|
# Ship: Slasher
|
||||||
|
# Ship: Stiletto
|
||||||
# Ship: Wolf
|
# Ship: Wolf
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
10
eos/effects/shipprojectilerofmf.py
Normal file
10
eos/effects/shipprojectilerofmf.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# shipProjectileRofMF
|
||||||
|
#
|
||||||
|
# Used by:
|
||||||
|
# Ship: Claw
|
||||||
|
type = "passive"
|
||||||
|
|
||||||
|
|
||||||
|
def handler(fit, src, context):
|
||||||
|
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Projectile Turret"), "speed",
|
||||||
|
src.getModifiedItemAttr("shipBonusMF"), stackingPenalties=True, skill="Minmatar Frigate")
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
# skillBonusDroneDurability
|
# skillBonusDroneDurability
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implant: CreoDron 'Bumblebee' Drone Tuner T10-5D
|
# Implants from group: Cyber Drones (2 of 2)
|
||||||
# Implant: CreoDron 'Yellowjacket' Drone Tuner D5-10T
|
|
||||||
# Skill: Drone Durability
|
# Skill: Drone Durability
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# skillBonusDroneInterfacing
|
# skillBonusDroneInterfacing
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implant: CreoDron 'Bumblebee' Drone Tuner T10-5D
|
# Implants from group: Cyber Drones (2 of 2)
|
||||||
# Implant: CreoDron 'Yellowjacket' Drone Tuner D5-10T
|
|
||||||
# Skill: Drone Interfacing
|
# Skill: Drone Interfacing
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# surgicalStrikeDamageMultiplierBonusPostPercentDamageMultiplierLocationShipModulesRequiringGunnery
|
# surgicalStrikeDamageMultiplierBonusPostPercentDamageMultiplierLocationShipModulesRequiringGunnery
|
||||||
#
|
#
|
||||||
# Used by:
|
# Used by:
|
||||||
# Implants named like: Agency 'Pyrolancea' DB Dose (3 of 4)
|
# Implants named like: Agency 'Pyrolancea' DB Dose (4 of 4)
|
||||||
# Implants named like: Eifyr and Co. 'Gunslinger' Surgical Strike SS (6 of 6)
|
# Implants named like: Eifyr and Co. 'Gunslinger' Surgical Strike SS (6 of 6)
|
||||||
# Implant: Standard Cerebral Accelerator
|
# Implant: Standard Cerebral Accelerator
|
||||||
type = "passive"
|
type = "passive"
|
||||||
|
|||||||
@@ -536,6 +536,7 @@ class DynamicItemAttribute(EqBase):
|
|||||||
class DynamicItemItem(EqBase):
|
class DynamicItemItem(EqBase):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MarketGroup(EqBase):
|
class MarketGroup(EqBase):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "MarketGroup(ID={}, name={}, parent={}) at {}".format(
|
return "MarketGroup(ID={}, name={}, parent={}) at {}".format(
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ class ItemAttrShortcut(object):
|
|||||||
|
|
||||||
return return_value or default
|
return return_value or default
|
||||||
|
|
||||||
|
|
||||||
class ChargeAttrShortcut(object):
|
class ChargeAttrShortcut(object):
|
||||||
def getModifiedChargeAttr(self, key, default=0):
|
def getModifiedChargeAttr(self, key, default=0):
|
||||||
return_value = self.chargeModifiedAttributes.get(key)
|
return_value = self.chargeModifiedAttributes.get(key)
|
||||||
|
|||||||
@@ -142,14 +142,8 @@ class Booster(HandledItem, ItemAttrShortcut):
|
|||||||
copy = Booster(self.item)
|
copy = Booster(self.item)
|
||||||
copy.active = self.active
|
copy.active = self.active
|
||||||
|
|
||||||
# Legacy booster side effect code, disabling as not currently implemented
|
for sideEffect in self.sideEffects:
|
||||||
'''
|
copyEffect = next(filter(lambda eff: eff.effectID == sideEffect.effectID, copy.sideEffects))
|
||||||
origSideEffects = list(self.iterSideEffects())
|
copyEffect.active = sideEffect.active
|
||||||
copySideEffects = list(copy.iterSideEffects())
|
|
||||||
i = 0
|
|
||||||
while i < len(origSideEffects):
|
|
||||||
copySideEffects[i].active = origSideEffects[i].active
|
|
||||||
i += 1
|
|
||||||
'''
|
|
||||||
|
|
||||||
return copy
|
return copy
|
||||||
|
|||||||
@@ -291,6 +291,10 @@ class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
|||||||
def __deepcopy__(self, memo):
|
def __deepcopy__(self, memo):
|
||||||
copy = Fighter(self.item)
|
copy = Fighter(self.item)
|
||||||
copy.amount = self.amount
|
copy.amount = self.amount
|
||||||
|
copy.active = self.active
|
||||||
|
for ability in self.abilities:
|
||||||
|
copyAbility = next(filter(lambda a: a.effectID == ability.effectID, copy.abilities))
|
||||||
|
copyAbility.active = ability.active
|
||||||
return copy
|
return copy
|
||||||
|
|
||||||
def fits(self, fit):
|
def fits(self, fit):
|
||||||
|
|||||||
@@ -1580,6 +1580,7 @@ class Fit(object):
|
|||||||
copy_ship.name = "%s copy" % self.name
|
copy_ship.name = "%s copy" % self.name
|
||||||
copy_ship.damagePattern = self.damagePattern
|
copy_ship.damagePattern = self.damagePattern
|
||||||
copy_ship.targetResists = self.targetResists
|
copy_ship.targetResists = self.targetResists
|
||||||
|
copy_ship.implantLocation = self.implantLocation
|
||||||
copy_ship.notes = self.notes
|
copy_ship.notes = self.notes
|
||||||
|
|
||||||
toCopy = (
|
toCopy = (
|
||||||
@@ -1598,12 +1599,27 @@ class Fit(object):
|
|||||||
for i in orig:
|
for i in orig:
|
||||||
c.append(deepcopy(i))
|
c.append(deepcopy(i))
|
||||||
|
|
||||||
for fit in self.projectedFits:
|
# this bit is required -- see GH issue # 83
|
||||||
copy_ship.__projectedFits[fit.ID] = fit
|
def forceUpdateSavedata(fit):
|
||||||
# this bit is required -- see GH issue # 83
|
|
||||||
eos.db.saveddata_session.flush()
|
eos.db.saveddata_session.flush()
|
||||||
eos.db.saveddata_session.refresh(fit)
|
eos.db.saveddata_session.refresh(fit)
|
||||||
|
|
||||||
|
for fit in self.commandFits:
|
||||||
|
copy_ship.__commandFits[fit.ID] = fit
|
||||||
|
forceUpdateSavedata(fit)
|
||||||
|
copyCommandInfo = fit.getCommandInfo(copy_ship.ID)
|
||||||
|
originalCommandInfo = fit.getCommandInfo(self.ID)
|
||||||
|
copyCommandInfo.active = originalCommandInfo.active
|
||||||
|
forceUpdateSavedata(fit)
|
||||||
|
|
||||||
|
for fit in self.projectedFits:
|
||||||
|
copy_ship.__projectedFits[fit.ID] = fit
|
||||||
|
forceUpdateSavedata(fit)
|
||||||
|
copyProjectionInfo = fit.getProjectionInfo(copy_ship.ID)
|
||||||
|
originalProjectionInfo = fit.getProjectionInfo(self.ID)
|
||||||
|
copyProjectionInfo.active = originalProjectionInfo.active
|
||||||
|
forceUpdateSavedata(fit)
|
||||||
|
|
||||||
return copy_ship
|
return copy_ship
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
|||||||
self.__chargeModifiedAttributes.original = self.__charge.attributes
|
self.__chargeModifiedAttributes.original = self.__charge.attributes
|
||||||
self.__chargeModifiedAttributes.overrides = self.__charge.overrides
|
self.__chargeModifiedAttributes.overrides = self.__charge.overrides
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def buildEmpty(cls, slot):
|
def buildEmpty(cls, slot):
|
||||||
empty = Module(None)
|
empty = Module(None)
|
||||||
@@ -209,7 +208,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
|||||||
return self.__item is None or \
|
return self.__item is None or \
|
||||||
(self.__item.category.name not in ("Module", "Subsystem", "Structure Module") and
|
(self.__item.category.name not in ("Module", "Subsystem", "Structure Module") and
|
||||||
self.__item.group.name not in self.SYSTEM_GROUPS) or \
|
self.__item.group.name not in self.SYSTEM_GROUPS) or \
|
||||||
(self.item.isAbyssal and (not self.baseItemID or not self.mutaplasmidID) )
|
(self.item.isAbyssal and (not self.baseItemID or not self.mutaplasmidID))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def isMutated(self):
|
def isMutated(self):
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class Mutator(EqBase):
|
|||||||
@validates("value")
|
@validates("value")
|
||||||
def validator(self, key, val):
|
def validator(self, key, val):
|
||||||
""" Validates values as properly falling within the range of the modules' Mutaplasmid """
|
""" Validates values as properly falling within the range of the modules' Mutaplasmid """
|
||||||
mod = val/self.baseValue
|
mod = val / self.baseValue
|
||||||
|
|
||||||
if self.minMod <= mod <= self.maxMod:
|
if self.minMod <= mod <= self.maxMod:
|
||||||
# sweet, all good
|
# sweet, all good
|
||||||
@@ -129,5 +129,3 @@ class Mutator(EqBase):
|
|||||||
@property
|
@property
|
||||||
def attribute(self):
|
def attribute(self):
|
||||||
return self.__attr
|
return self.__attr
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class AttributeGauge(wx.Window):
|
|||||||
def SetValue(self, value, animate=True):
|
def SetValue(self, value, animate=True):
|
||||||
""" Sets the current position of the gauge. """
|
""" Sets the current position of the gauge. """
|
||||||
|
|
||||||
print ("="*20, self._percentage)
|
print("=" * 20, self._percentage)
|
||||||
if self._value == value:
|
if self._value == value:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -248,14 +248,15 @@ class AttributeGauge(wx.Window):
|
|||||||
w = min(w, half) # Ensure that we don't overshoot our drawing area
|
w = min(w, half) # Ensure that we don't overshoot our drawing area
|
||||||
w = math.ceil(w) # round up to nearest pixel, this ensures that we don't lose representation for sub pixels
|
w = math.ceil(w) # round up to nearest pixel, this ensures that we don't lose representation for sub pixels
|
||||||
|
|
||||||
# print("Percentage: {}\t\t\t\t\tValue: {}\t\t\t\t\tWidth: {}\t\t\t\t\tHalf: {}\t\t\t\t\tRect Width: {}".format(round(self._percentage, 3), round(value,3), w, half, rect.width))
|
# print("Percentage: {}\t\t\t\t\tValue: {}\t\t\t\t\tWidth: {}\t\t\t\t\tHalf: {}\t\t\t\t\tRect Width: {}".format(
|
||||||
|
# round(self._percentage, 3), round(value,3), w, half, rect.width))
|
||||||
|
|
||||||
# set guide_lines every 10 pixels of the main gauge (not including borders)
|
# set guide_lines every 10 pixels of the main gauge (not including borders)
|
||||||
if self.guide_lines:
|
if self.guide_lines:
|
||||||
for x in range(1, 20):
|
for x in range(1, 20):
|
||||||
dc.SetBrush(wx.Brush(wx.LIGHT_GREY))
|
dc.SetBrush(wx.Brush(wx.LIGHT_GREY))
|
||||||
dc.SetPen(wx.Pen(wx.LIGHT_GREY))
|
dc.SetPen(wx.Pen(wx.LIGHT_GREY))
|
||||||
dc.DrawRectangle(x*10, 1, 1, rect.height)
|
dc.DrawRectangle(x * 10, 1, 1, rect.height)
|
||||||
|
|
||||||
dc.SetBrush(wx.Brush(colour))
|
dc.SetBrush(wx.Brush(colour))
|
||||||
dc.SetPen(wx.Pen(colour))
|
dc.SetPen(wx.Pen(colour))
|
||||||
@@ -264,10 +265,10 @@ class AttributeGauge(wx.Window):
|
|||||||
# However, if there is an odd width, the middle pixel is shared between the left and right gauge
|
# However, if there is an odd width, the middle pixel is shared between the left and right gauge
|
||||||
|
|
||||||
if value >= 0:
|
if value >= 0:
|
||||||
padding = (half if is_even else math.ceil(half-1)) + 1
|
padding = (half if is_even else math.ceil(half - 1)) + 1
|
||||||
dc.DrawRectangle(padding, 1, w, rect.height)
|
dc.DrawRectangle(padding, 1, w, rect.height)
|
||||||
else:
|
else:
|
||||||
padding = half - w + 1 if is_even else math.ceil(half)-(w-1)
|
padding = half - w + 1 if is_even else math.ceil(half) - (w - 1)
|
||||||
dc.DrawRectangle(padding, 1, w, rect.height)
|
dc.DrawRectangle(padding, 1, w, rect.height)
|
||||||
|
|
||||||
if self.leading_edge and (self.edge_on_neutral or value != 0):
|
if self.leading_edge and (self.edge_on_neutral or value != 0):
|
||||||
@@ -277,7 +278,7 @@ class AttributeGauge(wx.Window):
|
|||||||
if value > 0:
|
if value > 0:
|
||||||
dc.DrawRectangle(min(padding + w, rect.width), 1, 1, rect.height)
|
dc.DrawRectangle(min(padding + w, rect.width), 1, 1, rect.height)
|
||||||
else:
|
else:
|
||||||
dc.DrawRectangle(max(padding-1, 1), 1, 1, rect.height)
|
dc.DrawRectangle(max(padding - 1, 1), 1, 1, rect.height)
|
||||||
|
|
||||||
def OnTimer(self, event):
|
def OnTimer(self, event):
|
||||||
old_value = self._old_percentage
|
old_value = self._old_percentage
|
||||||
@@ -332,14 +333,12 @@ if __name__ == "__main__":
|
|||||||
wx.Panel.__init__(self, parent, size=size)
|
wx.Panel.__init__(self, parent, size=size)
|
||||||
box = wx.BoxSizer(wx.VERTICAL)
|
box = wx.BoxSizer(wx.VERTICAL)
|
||||||
|
|
||||||
font = wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL, False)
|
|
||||||
|
|
||||||
self.gauge = gauge = AttributeGauge(self, size=(204, 4))
|
self.gauge = gauge = AttributeGauge(self, size=(204, 4))
|
||||||
gauge.SetBackgroundColour(wx.Colour(52, 86, 98))
|
gauge.SetBackgroundColour(wx.Colour(52, 86, 98))
|
||||||
gauge.SetBarColour(wx.Colour(255, 128, 0))
|
gauge.SetBarColour(wx.Colour(255, 128, 0))
|
||||||
gauge.SetValue(100)
|
gauge.SetValue(100)
|
||||||
gauge.SetFractionDigits(1)
|
gauge.SetFractionDigits(1)
|
||||||
box.Add(gauge, 0, wx.ALL|wx.CENTER, 10)
|
box.Add(gauge, 0, wx.ALL | wx.CENTER, 10)
|
||||||
|
|
||||||
self.gauge11 = gauge = AttributeGauge(self, size=(204, 6))
|
self.gauge11 = gauge = AttributeGauge(self, size=(204, 6))
|
||||||
gauge.SetBackgroundColour(wx.Colour(52, 86, 98))
|
gauge.SetBackgroundColour(wx.Colour(52, 86, 98))
|
||||||
@@ -473,16 +472,16 @@ if __name__ == "__main__":
|
|||||||
def UpdateValue2(self, event):
|
def UpdateValue2(self, event):
|
||||||
num = self.spinCtrl2.GetValue()
|
num = self.spinCtrl2.GetValue()
|
||||||
self.gauge2.SetValue(num)
|
self.gauge2.SetValue(num)
|
||||||
self.gauge3.SetValue(num*-1)
|
self.gauge3.SetValue(num * -1)
|
||||||
self.gauge4.SetValue(num)
|
self.gauge4.SetValue(num)
|
||||||
self.gauge5.SetValue(num*-1)
|
self.gauge5.SetValue(num * -1)
|
||||||
self.gauge6.SetValue(num)
|
self.gauge6.SetValue(num)
|
||||||
self.gauge7.SetValue(num*-1)
|
self.gauge7.SetValue(num * -1)
|
||||||
self.gauge8.SetValue(num)
|
self.gauge8.SetValue(num)
|
||||||
self.gauge9.SetValue(num*-1)
|
self.gauge9.SetValue(num * -1)
|
||||||
|
|
||||||
def OnTimer(self, evt):
|
def OnTimer(self, evt):
|
||||||
num = random.randint(-100,100)
|
num = random.randint(-100, 100)
|
||||||
self.gauge.SetValue(num)
|
self.gauge.SetValue(num)
|
||||||
self.gauge11.SetValue(num)
|
self.gauge11.SetValue(num)
|
||||||
self.gauge12.SetValue(num)
|
self.gauge12.SetValue(num)
|
||||||
|
|||||||
@@ -100,10 +100,10 @@ class AttributeSlider(wx.Panel):
|
|||||||
slider_percentage = 0
|
slider_percentage = 0
|
||||||
if mod < 1:
|
if mod < 1:
|
||||||
modEnd = self.UserMinValue
|
modEnd = self.UserMinValue
|
||||||
slider_percentage = (1-mod)/(1 - modEnd) * -100
|
slider_percentage = (1 - mod) / (1 - modEnd) * -100
|
||||||
elif mod > 1:
|
elif mod > 1:
|
||||||
modEnd = self.UserMaxValue
|
modEnd = self.UserMaxValue
|
||||||
slider_percentage = ((mod-1)/(modEnd-1)) * 100
|
slider_percentage = ((mod - 1) / (modEnd - 1)) * 100
|
||||||
# print(slider_percentage)
|
# print(slider_percentage)
|
||||||
if self.inverse:
|
if self.inverse:
|
||||||
slider_percentage *= -1
|
slider_percentage *= -1
|
||||||
@@ -111,6 +111,7 @@ class AttributeSlider(wx.Panel):
|
|||||||
if post_event:
|
if post_event:
|
||||||
wx.PostEvent(self, ValueChanged(self, None, value, None, slider_percentage))
|
wx.PostEvent(self, ValueChanged(self, None, value, None, slider_percentage))
|
||||||
|
|
||||||
|
|
||||||
class TestAttributeSlider(wx.Frame):
|
class TestAttributeSlider(wx.Frame):
|
||||||
|
|
||||||
def __init__(self, parent, id):
|
def __init__(self, parent, id):
|
||||||
@@ -245,4 +246,3 @@ if __name__ == "__main__":
|
|||||||
# else:
|
# else:
|
||||||
# self.statxt2.SetLabel("{0:.3f} ({1:+.3f})".format(newValue, newValue - self.base_value, ))
|
# self.statxt2.SetLabel("{0:.3f} ({1:+.3f})".format(newValue, newValue - self.base_value, ))
|
||||||
# self.statxt2.SetToolTip("{0:+f}%".format(new_mod*100))
|
# self.statxt2.SetToolTip("{0:+f}%".format(new_mod*100))
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ from gui.contextMenu import ContextMenu
|
|||||||
from .itemAttributes import ItemParams
|
from .itemAttributes import ItemParams
|
||||||
from gui.bitmap_loader import BitmapLoader
|
from gui.bitmap_loader import BitmapLoader
|
||||||
import gui.globalEvents as GE
|
import gui.globalEvents as GE
|
||||||
import gui.mainFrame
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from logbook import Logger
|
from logbook import Logger
|
||||||
|
|
||||||
pyfalog = Logger(__name__)
|
pyfalog = Logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ItemMutator(wx.Panel):
|
class ItemMutator(wx.Panel):
|
||||||
|
|
||||||
def __init__(self, parent, stuff, item):
|
def __init__(self, parent, stuff, item):
|
||||||
@@ -77,7 +77,6 @@ class ItemMutator(wx.Panel):
|
|||||||
|
|
||||||
headingSizer.Add(displayName, 3, wx.ALL | wx.EXPAND, 0)
|
headingSizer.Add(displayName, 3, wx.ALL | wx.EXPAND, 0)
|
||||||
|
|
||||||
|
|
||||||
range_low = wx.StaticText(self, wx.ID_ANY, ItemParams.FormatValue(*m.attribute.unit.TranslateValue(worse_range[0])))
|
range_low = wx.StaticText(self, wx.ID_ANY, ItemParams.FormatValue(*m.attribute.unit.TranslateValue(worse_range[0])))
|
||||||
range_low.SetForegroundColour(self.goodColor if worse_range[2] else self.badColor)
|
range_low.SetForegroundColour(self.goodColor if worse_range[2] else self.badColor)
|
||||||
|
|
||||||
@@ -168,4 +167,3 @@ class ItemMutator(wx.Panel):
|
|||||||
|
|
||||||
# Send signal to GUI to update stats with current active fit
|
# Send signal to GUI to update stats with current active fit
|
||||||
wx.PostEvent(mainFrame, GE.FitChanged(fitID=activeFit))
|
wx.PostEvent(mainFrame, GE.FitChanged(fitID=activeFit))
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class PFGeneralPref(PreferenceView):
|
|||||||
self.sFit = Fit.getInstance()
|
self.sFit = Fit.getInstance()
|
||||||
|
|
||||||
self.cbGlobalChar.SetValue(self.sFit.serviceFittingOptions["useGlobalCharacter"])
|
self.cbGlobalChar.SetValue(self.sFit.serviceFittingOptions["useGlobalCharacter"])
|
||||||
self.cbDefaultCharImplants.SetValue(self.sFit.serviceFittingOptions["useCharecterImplantsByDefault"])
|
self.cbDefaultCharImplants.SetValue(self.sFit.serviceFittingOptions["useCharacterImplantsByDefault"])
|
||||||
self.cbGlobalDmgPattern.SetValue(self.sFit.serviceFittingOptions["useGlobalDamagePattern"])
|
self.cbGlobalDmgPattern.SetValue(self.sFit.serviceFittingOptions["useGlobalDamagePattern"])
|
||||||
self.cbFitColorSlots.SetValue(self.sFit.serviceFittingOptions["colorFitBySlot"] or False)
|
self.cbFitColorSlots.SetValue(self.sFit.serviceFittingOptions["colorFitBySlot"] or False)
|
||||||
self.cbRackSlots.SetValue(self.sFit.serviceFittingOptions["rackSlots"] or False)
|
self.cbRackSlots.SetValue(self.sFit.serviceFittingOptions["rackSlots"] or False)
|
||||||
@@ -194,7 +194,7 @@ class PFGeneralPref(PreferenceView):
|
|||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
def OnCBDefaultCharImplantsStateChange(self, event):
|
def OnCBDefaultCharImplantsStateChange(self, event):
|
||||||
self.sFit.serviceFittingOptions["useCharecterImplantsByDefault"] = self.cbDefaultCharImplants.GetValue()
|
self.sFit.serviceFittingOptions["useCharacterImplantsByDefault"] = self.cbDefaultCharImplants.GetValue()
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
def OnCBGlobalDmgPatternStateChange(self, event):
|
def OnCBGlobalDmgPatternStateChange(self, event):
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class PyGauge(wx.Window):
|
|||||||
return self._max_range
|
return self._max_range
|
||||||
|
|
||||||
def Animate(self):
|
def Animate(self):
|
||||||
#sFit = Fit.getInstance()
|
# sFit = Fit.getInstance()
|
||||||
if True:
|
if True:
|
||||||
if not self._timer:
|
if not self._timer:
|
||||||
self._timer = wx.Timer(self, self._timer_id)
|
self._timer = wx.Timer(self, self._timer_id)
|
||||||
|
|||||||
@@ -238,8 +238,8 @@ class exportHtmlThread(threading.Thread):
|
|||||||
HTML += (
|
HTML += (
|
||||||
' <li data-role="collapsible" data-iconpos="right" data-shadow="false" data-corners="false">\n'
|
' <li data-role="collapsible" data-iconpos="right" data-shadow="false" data-corners="false">\n'
|
||||||
' <h2>' + group.groupName + ' <span class="ui-li-count">' + str(groupFits) + '</span></h2>\n'
|
' <h2>' + group.groupName + ' <span class="ui-li-count">' + str(groupFits) + '</span></h2>\n'
|
||||||
' <ul data-role="listview" data-shadow="false" data-inset="true" data-corners="false">\n'
|
' <ul data-role="listview" data-shadow="false" data-inset="true" data-corners="false">\n' +
|
||||||
+ HTMLgroup +
|
HTMLgroup +
|
||||||
' </ul>\n'
|
' </ul>\n'
|
||||||
' </li>'
|
' </li>'
|
||||||
)
|
)
|
||||||
|
|||||||
BIN
imgs/icons/21000.png
Normal file
BIN
imgs/icons/21000.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 695 B |
BIN
imgs/icons/21833.png
Normal file
BIN
imgs/icons/21833.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 769 B |
BIN
imgs/icons/21988.png
Normal file
BIN
imgs/icons/21988.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 767 B |
BIN
imgs/icons/21999.png
Normal file
BIN
imgs/icons/21999.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 756 B |
BIN
imgs/icons/22010.png
Normal file
BIN
imgs/icons/22010.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 797 B |
80
scripts/dynamicattributes.py
Normal file
80
scripts/dynamicattributes.py
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
#!/usr/bin/env python2.7
|
||||||
|
|
||||||
|
"""
|
||||||
|
This script will generate a dynamicItemAttributes.json file using res files
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sqlite3
|
||||||
|
import json
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
from shutil import copyfile
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description='This script updates module icons for pyfa')
|
||||||
|
parser.add_argument('-e', '--eve', required=True, type=str, help='path to eve\'s ')
|
||||||
|
parser.add_argument('-s', '--server', required=False, default='tq', type=str, help='which server to use (defaults to tq)')
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
LOADER_FILE = 'app:/bin/dynamicItemAttributesLoader.pyd'
|
||||||
|
RES_FILE = 'res:/staticdata/dynamicitemattributes.fsdbinary'
|
||||||
|
|
||||||
|
binaryfile = os.path.split(RES_FILE)[1]
|
||||||
|
|
||||||
|
eve_path = os.path.join(args.eve, 'index_{}.txt'.format(args.server))
|
||||||
|
with open(eve_path, 'r') as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
file_index = {x.split(',')[0]: x.split(',') for x in lines}
|
||||||
|
|
||||||
|
resfileindex = file_index['app:/resfileindex.txt']
|
||||||
|
|
||||||
|
res_cache = os.path.join(args.eve, 'ResFiles')
|
||||||
|
|
||||||
|
with open(os.path.join(res_cache, resfileindex[1]), 'r') as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
res_index = {x.split(',')[0].lower(): x.split(',') for x in lines}
|
||||||
|
|
||||||
|
# Need to copy the file to our cuirrent directory
|
||||||
|
attribute_loader_file = os.path.join(res_cache, file_index[LOADER_FILE][1])
|
||||||
|
to_path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
copyfile(attribute_loader_file, os.path.join(os.path.dirname(os.path.abspath(__file__)), os.path.split(LOADER_FILE)[1]))
|
||||||
|
|
||||||
|
# The loader expect it to be the correct filename, so copy trhe file as well
|
||||||
|
dynattribute_file = os.path.join(res_cache, res_index[RES_FILE.lower()][1])
|
||||||
|
to_path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
copyfile(dynattribute_file, os.path.join(os.path.dirname(os.path.abspath(__file__)), binaryfile))
|
||||||
|
|
||||||
|
import dynamicItemAttributesLoader
|
||||||
|
|
||||||
|
attributes = dynamicItemAttributesLoader.load(os.path.join(to_path, binaryfile))
|
||||||
|
|
||||||
|
attributes_obj = {}
|
||||||
|
|
||||||
|
# convert top level to dict
|
||||||
|
attributes = dict(attributes)
|
||||||
|
|
||||||
|
# This is such a brute force method. todo: recursively generate this by inspecting the objects
|
||||||
|
for k, v in attributes.items():
|
||||||
|
attributes_obj[k] = {
|
||||||
|
'attributeIDs': dict(v.attributeIDs),
|
||||||
|
'inputOutputMapping': list(v.inputOutputMapping)
|
||||||
|
}
|
||||||
|
|
||||||
|
for i, x in enumerate(v.inputOutputMapping):
|
||||||
|
attributes_obj[k]['inputOutputMapping'][i] = {
|
||||||
|
'resultingType': x.resultingType,
|
||||||
|
'applicableTypes': list(x.applicableTypes)
|
||||||
|
}
|
||||||
|
|
||||||
|
for k2, v2 in v.attributeIDs.items():
|
||||||
|
attributes_obj[k]['attributeIDs'][k2] = {
|
||||||
|
'min': v2.min,
|
||||||
|
'max': v2.max
|
||||||
|
}
|
||||||
|
|
||||||
|
with open('dynamicattributes.json', 'w') as outfile:
|
||||||
|
json.dump(attributes_obj, outfile)
|
||||||
@@ -62,6 +62,7 @@ class Fit(object):
|
|||||||
serviceFittingDefaultOptions = {
|
serviceFittingDefaultOptions = {
|
||||||
"useCharecterImplantsByDefault": True,
|
"useCharecterImplantsByDefault": True,
|
||||||
"useGlobalCharacter": False,
|
"useGlobalCharacter": False,
|
||||||
|
"useCharacterImplantsByDefault": True,
|
||||||
"useGlobalDamagePattern": False,
|
"useGlobalDamagePattern": False,
|
||||||
"defaultCharacter": self.character.ID,
|
"defaultCharacter": self.character.ID,
|
||||||
"useGlobalForceReload": False,
|
"useGlobalForceReload": False,
|
||||||
@@ -96,7 +97,12 @@ class Fit(object):
|
|||||||
fits = eos.db.getFitsWithShip(shipID)
|
fits = eos.db.getFitsWithShip(shipID)
|
||||||
names = []
|
names = []
|
||||||
for fit in fits:
|
for fit in fits:
|
||||||
names.append((fit.ID, fit.name, fit.booster, fit.modified or fit.created or datetime.datetime.fromtimestamp(fit.timestamp), fit.notes, fit.ship.item.graphicID))
|
names.append((fit.ID,
|
||||||
|
fit.name,
|
||||||
|
fit.booster,
|
||||||
|
fit.modified or fit.created or datetime.datetime.fromtimestamp(fit.timestamp),
|
||||||
|
fit.notes,
|
||||||
|
fit.ship.item.graphicID))
|
||||||
|
|
||||||
return names
|
return names
|
||||||
|
|
||||||
@@ -148,9 +154,8 @@ class Fit(object):
|
|||||||
fit.targetResists = self.targetResists
|
fit.targetResists = self.targetResists
|
||||||
fit.character = self.character
|
fit.character = self.character
|
||||||
fit.booster = self.booster
|
fit.booster = self.booster
|
||||||
fit.implantLocation = ImplantLocation.CHARACTER if\
|
useCharImplants = self.serviceFittingOptions["useCharacterImplantsByDefault"]
|
||||||
self.serviceFittingOptions["useCharecterImplantsByDefault"] else\
|
fit.implantLocation = ImplantLocation.CHARACTER if useCharImplants else ImplantLocation.FIT
|
||||||
ImplantLocation.FIT
|
|
||||||
eos.db.save(fit)
|
eos.db.save(fit)
|
||||||
self.recalc(fit)
|
self.recalc(fit)
|
||||||
return fit.ID
|
return fit.ID
|
||||||
@@ -713,11 +718,11 @@ class Fit(object):
|
|||||||
|
|
||||||
if not module.isEmpty: # if module is placeholder, we don't want to convert/add it
|
if not module.isEmpty: # if module is placeholder, we don't want to convert/add it
|
||||||
moduleItem = module.item if not module.item.isAbyssal else module.baseItem
|
moduleItem = module.item if not module.item.isAbyssal else module.baseItem
|
||||||
for x in fit.cargo.find(moduleItem ):
|
for x in fit.cargo.find(moduleItem):
|
||||||
x.amount += 1
|
x.amount += 1
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
moduleP = es_Cargo(moduleItem )
|
moduleP = es_Cargo(moduleItem)
|
||||||
moduleP.amount = 1
|
moduleP.amount = 1
|
||||||
fit.cargo.insert(cargoIdx, moduleP)
|
fit.cargo.insert(cargoIdx, moduleP)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user