Restrict citadels to only use citadel modules. Rename Ships tab to Fittings as it no longer just carries ships :(. Fix crash on item stats.

This commit is contained in:
blitzmann
2016-05-15 23:18:39 -04:00
parent 4041ecddc4
commit 62fd545d24
5 changed files with 15 additions and 6 deletions

View File

@@ -157,7 +157,10 @@ class Fit(object):
return fit.modules[pos]
def newFit(self, shipID, name=None):
ship = eos.types.Ship(eos.db.getItem(shipID))
try:
ship = eos.types.Ship(eos.db.getItem(shipID))
except ValueError:
ship = eos.types.Citadel(eos.db.getItem(shipID))
fit = eos.types.Fit(ship)
fit.name = name if name is not None else "New %s" % fit.ship.item.name
fit.damagePattern = self.pattern