Skip to content

Commit d977645

Browse files
committed
Re-publish festival items
1 parent 3cd80b4 commit d977645

4 files changed

Lines changed: 31 additions & 36 deletions

File tree

eos/saveddata/fit.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -337,29 +337,29 @@ def importXml(cls, text):
337337
fits = []
338338
from eos import db
339339
for fitting in fittings:
340+
f = Fit()
341+
f.name = fitting.getAttribute("name")
342+
# <localized hint="Maelstrom">Maelstrom</localized>
343+
shipType = fitting.getElementsByTagName("shipType").item(0).getAttribute("value")
344+
f.ship = Ship(db.getItem(shipType))
345+
hardwares = fitting.getElementsByTagName("hardware")
346+
for hardware in hardwares:
347+
try:
348+
moduleName = hardware.getAttribute("type")
349+
item = db.getItem(moduleName, eager="group.category")
350+
if item:
351+
if item.category.name == "Drone":
352+
d = Drone(item)
353+
d.amount = int(hardware.getAttribute("qty"))
354+
f.drones.append(d)
355+
else:
356+
m = Module(item)
357+
if m.isValidState(State.ACTIVE):
358+
m.state = State.ACTIVE
340359

341-
f = Fit()
342-
f.name = fitting.getAttribute("name")
343-
shipType = fitting.getElementsByTagName("shipType").item(0).getAttribute("value")
344-
f.ship = Ship(db.getItem(shipType))
345-
hardwares = fitting.getElementsByTagName("hardware")
346-
for hardware in hardwares:
347-
try:
348-
moduleName = hardware.getAttribute("type")
349-
item = db.getItem(moduleName, eager="group.category")
350-
if item:
351-
if item.category.name == "Drone":
352-
d = Drone(item)
353-
d.amount = int(hardware.getAttribute("qty"))
354-
f.drones.append(d)
355-
else:
356-
m = Module(item)
357-
if m.isValidState(State.ACTIVE):
358-
m.state = State.ACTIVE
359-
360-
f.modules.append(m)
361-
except Exception:
362-
continue
360+
f.modules.append(m)
361+
except KeyboardInterrupt:
362+
continue
363363

364364
fits.append(f)
365365

gui/builtinContextMenus/marketJump.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ def display(self, srcContext, selection):
1616
if selection is None or len(selection) < 1:
1717
return False
1818
item = getattr(selection[0], "item", selection[0])
19-
doit = not selection[0].isEmpty if srcContext == "fittingModule" else True \
20-
and sMkt.getMarketGroupByItem(item) is not None
19+
mktGrp = sMkt.getMarketGroupByItem(item)
20+
# 1663 is Special Edition Festival Assets, we don't have root group for it
21+
if mktGrp is None or mktGrp.ID == 1663:
22+
return False
23+
doit = not selection[0].isEmpty if srcContext == "fittingModule" else True
2124
return doit
2225

2326
def getText(self, itmContext, selection):

gui/builtinContextMenus/moduleAmmoPicker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def damageInfo(self, charge):
7272
totalDamage = 0
7373
# Fill them with the data about charge
7474
for damageType in self.DAMAGE_TYPES:
75-
currentDamage = charge.getAttribute("{0}Damage".format(damageType))
75+
currentDamage = charge.getAttribute("{0}Damage".format(damageType)) or 0
7676
damageMap[damageType] = currentDamage
7777
totalDamage += currentDamage
7878
# Detect type of ammo
@@ -122,6 +122,7 @@ def getSubMenu(self, context, selection, menu, i):
122122
m.Bind(wx.EVT_MENU, self.handleAmmoSwitch)
123123
self.chargeIds = {}
124124
hardpoint = self.module.hardpoint
125+
moduleName = self.module.item.name
125126
# Make sure we do not consider mining turrets as combat turrets
126127
if hardpoint == Hardpoint.TURRET and self.module.getModifiedItemAttr("miningAmount") is None:
127128
self.addSeperator(m, "Long Range")
@@ -159,7 +160,7 @@ def getSubMenu(self, context, selection, menu, i):
159160
m.AppendItem(item)
160161

161162
self.addSeperator(m, "Short Range")
162-
elif hardpoint == Hardpoint.MISSILE:
163+
elif hardpoint == Hardpoint.MISSILE and moduleName != 'Festival Launcher':
163164
self.charges.sort(key=self.missileSorter)
164165
type = None
165166
sub = None

service/market.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,7 @@ def __init__(self):
225225
"Goru's Shuttle": False, # Vanity
226226
"Guristas Shuttle": False, # Vanity
227227
"Tash-Murkon Magnate": False, # Vanity
228-
"Scorpion Ishukone Watch": False, # Vanity
229-
"Festival Launcher": False, # Celebration-related item
230-
"Barium Firework CXIV": False, # Celebration-related item
231-
"Copper Firework CXIV": False, # Celebration-related item
232-
"Sodium Firework CXIV": False, # Celebration-related item
233-
"Snowball CXIV": False, # Celebration-related item
234-
"Barium Firework": False, # Celebration-related item
235-
"Copper Firework": False, # Celebration-related item
236-
"Sodium Firework": False, # Celebration-related item
237-
"Snowball": False } # Celebration-related item
228+
"Scorpion Ishukone Watch": False } # Vanity
238229

239230
# List of groups which are forcibly published
240231
self.GROUPS_FORCEPUBLISHED = {

0 commit comments

Comments
 (0)