Fix #225 - set mode whenever the ship is set.

This commit is contained in:
blitzmann
2014-12-10 21:54:05 -05:00
parent 2bff11e5ab
commit d5ce666d8d
2 changed files with 2 additions and 1 deletions

View File

@@ -153,6 +153,8 @@ class Fit(object):
def ship(self, ship):
self.__ship = ship
self.shipID = ship.item.ID if ship is not None else None
# set mode of new ship
self.mode = self.ship.checkModeItem(None) if ship is not None else None
@property
def drones(self):

View File

@@ -147,7 +147,6 @@ class Fit(object):
def newFit(self, shipID, name=None):
fit = eos.types.Fit()
fit.ship = eos.types.Ship(eos.db.getItem(shipID))
fit.mode = fit.ship.checkModeItem(None)
fit.name = name if name is not None else "New %s" % fit.ship.item.name
fit.damagePattern = self.pattern
fit.targetResists = self.targetResists