Added booster fit toggling in database, menu label toggling, and migration code

This commit is contained in:
blitzmann
2014-02-20 23:26:26 -05:00
parent aaadcb9b45
commit 3842913fe1
4 changed files with 51 additions and 15 deletions

View File

@@ -95,10 +95,11 @@ class Fit(object):
return names
def getFitsWithShip(self, id):
''' Lists fits of shipID, used with shipBrowser '''
fits = eos.db.getFitsWithShip(id)
names = []
for fit in fits:
names.append((fit.ID, fit.name, fit.timestamp))
names.append((fit.ID, fit.name, fit.booster, fit.timestamp))
return names
@@ -129,6 +130,11 @@ class Fit(object):
self.recalc(fit)
return fit.ID
def toggleBoostFit(self, fitID):
fit = eos.db.getFit(fitID)
fit.booster = not fit.booster
eos.db.commit()
def renameFit(self, fitID, newName):
fit = eos.db.getFit(fitID)
fit.name = newName