Handle fits with invalid ships by removing and deleting them when loaded.

This commit is contained in:
blitzmann
2015-07-02 14:14:16 -04:00
parent e1ce672569
commit ca08f8d8da
6 changed files with 71 additions and 285 deletions

View File

@@ -149,8 +149,8 @@ class Fit(object):
return fit.modules[pos]
def newFit(self, shipID, name=None):
fit = eos.types.Fit()
fit.ship = eos.types.Ship(eos.db.getItem(shipID))
ship = eos.types.Ship(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
fit.targetResists = self.targetResists