Disable fit add on pages based on context (ship vs citadel)

This commit is contained in:
blitzmann
2016-07-04 01:03:30 -04:00
parent 3734be21d6
commit fe8c3a4957
12 changed files with 77 additions and 26 deletions

View File

@@ -332,7 +332,6 @@ class Skill(HandledItem):
for effect in item.effects.itervalues():
if effect.runTime == runTime and effect.isType("passive") and (not isinstance(fit.ship, eos.types.Citadel) or effect.isType("structure")):
try:
print "Running effect: ", self, fit, runTime, effect
effect.handler(fit, self, ("skill",))
except AttributeError:
continue

View File

@@ -194,6 +194,10 @@ class Fit(object):
# set fit attributes the same as ship
self.extraAttributes = self.ship.itemModifiedAttributes
@property
def isStructure(self):
return isinstance(self.ship, Citadel)
@property
def drones(self):
return self.__drones