Merge branch 'master' into wx3
This commit is contained in:
@@ -440,6 +440,38 @@ class Fit(object):
|
||||
eos.db.commit()
|
||||
return numSlots != len(fit.modules)
|
||||
|
||||
def changeModule(self, fitID, position, newItemID):
|
||||
fit = eos.db.getFit(fitID)
|
||||
if fit.modules[position].isEmpty:
|
||||
return None
|
||||
|
||||
# Dummy it out in case the next bit fails
|
||||
fit.modules.toDummy(position)
|
||||
|
||||
item = eos.db.getItem(newItemID, eager=("attributes", "group.category"))
|
||||
try:
|
||||
m = eos.types.Module(item)
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
if m.fits(fit):
|
||||
m.owner = fit
|
||||
fit.modules.toModule(position, m)
|
||||
if m.isValidState(State.ACTIVE):
|
||||
m.state = State.ACTIVE
|
||||
|
||||
# As some items may affect state-limiting attributes of the ship, calculate new attributes first
|
||||
self.recalc(fit)
|
||||
# Then, check states of all modules and change where needed. This will recalc if needed
|
||||
self.checkStates(fit, m)
|
||||
|
||||
fit.fill()
|
||||
eos.db.commit()
|
||||
|
||||
return True
|
||||
else:
|
||||
return None
|
||||
|
||||
def moveCargoToModule(self, fitID, moduleIdx, cargoIdx, copyMod=False):
|
||||
"""
|
||||
Moves cargo to fitting window. Can either do a copy, move, or swap with current module
|
||||
|
||||
@@ -206,7 +206,9 @@ class Market():
|
||||
"Leopard": self.les_grp, # 2013 new year gift
|
||||
"Whiptail": self.les_grp, # AT12 prize
|
||||
"Chameleon": self.les_grp, # AT12 prize
|
||||
"Victorieux Luxury Yacht": self.les_grp # Worlds Collide prize \o/ chinese getting owned
|
||||
"Victorieux Luxury Yacht": self.les_grp, # Worlds Collide prize \o/ chinese getting owned
|
||||
"Imp": self.les_grp, # AT13 prize
|
||||
"Fiend": self.les_grp, # AT13 prize
|
||||
}
|
||||
|
||||
self.ITEMS_FORCEGROUP_R = self.__makeRevDict(self.ITEMS_FORCEGROUP)
|
||||
@@ -230,9 +232,9 @@ class Market():
|
||||
"Guristas Shuttle": False,
|
||||
"Mobile Decoy Unit": False, # Seems to be left over test mod for deployables
|
||||
"Tournament Micro Jump Unit": False, # Normally seen only on tournament arenas
|
||||
"Council Diplomatic Shuttle": False, # CSM X celebration
|
||||
"Imp": False, # AT13 prize, not a real ship yet
|
||||
"Fiend": False, # AT13 prize, not a real ship yet
|
||||
"Council Diplomatic Shuttle": False, # CSM X celebration]
|
||||
"Imp": False, # AT13 prize
|
||||
"Fiend": False, # AT13 prize
|
||||
}
|
||||
|
||||
# do not publish ships that we convert
|
||||
|
||||
Reference in New Issue
Block a user