Allow any item to be added to cargo (allows to distribute "refits" with fit)
This commit is contained in:
@@ -26,9 +26,6 @@ from sqlalchemy.orm import validates, reconstructor
|
||||
class Cargo(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
||||
|
||||
def __init__(self, item):
|
||||
if item.category.name != "Charge":
|
||||
raise ValueError("Passed item is not a charge")
|
||||
|
||||
self.__item = item
|
||||
self.itemID = item.ID
|
||||
self.active = True
|
||||
|
||||
@@ -14,11 +14,7 @@ class Cargo(ContextMenu):
|
||||
# Make sure context menu registers in the correct view
|
||||
if srcContext not in ("marketItemGroup", "marketItemMisc") or self.mainFrame.getActiveFit() is None:
|
||||
return False
|
||||
|
||||
item = selection[0]
|
||||
sFit = service.Fit.getInstance()
|
||||
|
||||
return sFit.isAmmo(item.ID)
|
||||
return True
|
||||
|
||||
def getText(self, itmContext, selection):
|
||||
return "Add {0} to Cargo".format(itmContext)
|
||||
|
||||
Reference in New Issue
Block a user