diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 99cd71d9d..07fd0784e 100755 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -337,29 +337,29 @@ class Fit(object): fits = [] from eos import db for fitting in fittings: + f = Fit() + f.name = fitting.getAttribute("name") + # Maelstrom + shipType = fitting.getElementsByTagName("shipType").item(0).getAttribute("value") + f.ship = Ship(db.getItem(shipType)) + hardwares = fitting.getElementsByTagName("hardware") + for hardware in hardwares: + try: + moduleName = hardware.getAttribute("type") + item = db.getItem(moduleName, eager="group.category") + if item: + if item.category.name == "Drone": + d = Drone(item) + d.amount = int(hardware.getAttribute("qty")) + f.drones.append(d) + else: + m = Module(item) + if m.isValidState(State.ACTIVE): + m.state = State.ACTIVE - f = Fit() - f.name = fitting.getAttribute("name") - shipType = fitting.getElementsByTagName("shipType").item(0).getAttribute("value") - f.ship = Ship(db.getItem(shipType)) - hardwares = fitting.getElementsByTagName("hardware") - for hardware in hardwares: - try: - moduleName = hardware.getAttribute("type") - item = db.getItem(moduleName, eager="group.category") - if item: - if item.category.name == "Drone": - d = Drone(item) - d.amount = int(hardware.getAttribute("qty")) - f.drones.append(d) - else: - m = Module(item) - if m.isValidState(State.ACTIVE): - m.state = State.ACTIVE - - f.modules.append(m) - except Exception: - continue + f.modules.append(m) + except KeyboardInterrupt: + continue fits.append(f) diff --git a/gui/builtinContextMenus/marketJump.py b/gui/builtinContextMenus/marketJump.py index 57576813b..e9cb7e48f 100644 --- a/gui/builtinContextMenus/marketJump.py +++ b/gui/builtinContextMenus/marketJump.py @@ -16,8 +16,11 @@ class MarketJump(ContextMenu): if selection is None or len(selection) < 1: return False item = getattr(selection[0], "item", selection[0]) - doit = not selection[0].isEmpty if srcContext == "fittingModule" else True \ - and sMkt.getMarketGroupByItem(item) is not None + mktGrp = sMkt.getMarketGroupByItem(item) + # 1663 is Special Edition Festival Assets, we don't have root group for it + if mktGrp is None or mktGrp.ID == 1663: + return False + doit = not selection[0].isEmpty if srcContext == "fittingModule" else True return doit def getText(self, itmContext, selection): diff --git a/gui/builtinContextMenus/moduleAmmoPicker.py b/gui/builtinContextMenus/moduleAmmoPicker.py index 888a41aca..6f69f90d2 100644 --- a/gui/builtinContextMenus/moduleAmmoPicker.py +++ b/gui/builtinContextMenus/moduleAmmoPicker.py @@ -72,7 +72,7 @@ class ModuleAmmoPicker(ContextMenu): totalDamage = 0 # Fill them with the data about charge for damageType in self.DAMAGE_TYPES: - currentDamage = charge.getAttribute("{0}Damage".format(damageType)) + currentDamage = charge.getAttribute("{0}Damage".format(damageType)) or 0 damageMap[damageType] = currentDamage totalDamage += currentDamage # Detect type of ammo @@ -122,6 +122,7 @@ class ModuleAmmoPicker(ContextMenu): m.Bind(wx.EVT_MENU, self.handleAmmoSwitch) self.chargeIds = {} hardpoint = self.module.hardpoint + moduleName = self.module.item.name # Make sure we do not consider mining turrets as combat turrets if hardpoint == Hardpoint.TURRET and self.module.getModifiedItemAttr("miningAmount") is None: self.addSeperator(m, "Long Range") @@ -159,7 +160,7 @@ class ModuleAmmoPicker(ContextMenu): m.AppendItem(item) self.addSeperator(m, "Short Range") - elif hardpoint == Hardpoint.MISSILE: + elif hardpoint == Hardpoint.MISSILE and moduleName != 'Festival Launcher': self.charges.sort(key=self.missileSorter) type = None sub = None diff --git a/service/market.py b/service/market.py index df12ce4a5..96e6b6097 100644 --- a/service/market.py +++ b/service/market.py @@ -225,16 +225,7 @@ class Market(): "Goru's Shuttle": False, # Vanity "Guristas Shuttle": False, # Vanity "Tash-Murkon Magnate": False, # Vanity - "Scorpion Ishukone Watch": False, # Vanity - "Festival Launcher": False, # Celebration-related item - "Barium Firework CXIV": False, # Celebration-related item - "Copper Firework CXIV": False, # Celebration-related item - "Sodium Firework CXIV": False, # Celebration-related item - "Snowball CXIV": False, # Celebration-related item - "Barium Firework": False, # Celebration-related item - "Copper Firework": False, # Celebration-related item - "Sodium Firework": False, # Celebration-related item - "Snowball": False } # Celebration-related item + "Scorpion Ishukone Watch": False } # Vanity # List of groups which are forcibly published self.GROUPS_FORCEPUBLISHED = {