Add citadel fittings to market browser, and get rid of some initial errors
This commit is contained in:
@@ -743,6 +743,10 @@ class Fit(object):
|
||||
capacity = self.ship.getModifiedItemAttr("capacitorCapacity")
|
||||
mass = self.ship.getModifiedItemAttr("mass")
|
||||
warpCapNeed = self.ship.getModifiedItemAttr("warpCapacitorNeed")
|
||||
|
||||
if not warpCapNeed:
|
||||
return 0
|
||||
|
||||
return capacity / (mass * warpCapNeed)
|
||||
|
||||
@property
|
||||
|
||||
@@ -151,7 +151,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
||||
def isInvalid(self):
|
||||
if self.isEmpty:
|
||||
return False
|
||||
return self.__item is None or (self.__item.category.name not in ("Module", "Subsystem") and self.__item.group.name != "Effect Beacon")
|
||||
return self.__item is None or (self.__item.category.name not in ("Module", "Subsystem", "Structure Module") and self.__item.group.name != "Effect Beacon")
|
||||
|
||||
@property
|
||||
def numCharges(self):
|
||||
|
||||
@@ -43,7 +43,7 @@ class Ship(ItemAttrShortcut, HandledItem):
|
||||
|
||||
def __init__(self, item, parent=None):
|
||||
|
||||
if item.category.name != "Ship":
|
||||
if item.category.name not in ("Ship", "Structure"):
|
||||
raise ValueError('Passed item "%s" (category: (%s)) is not under Ship category'%(item.name, item.category.name))
|
||||
|
||||
self.__item = item
|
||||
|
||||
Reference in New Issue
Block a user