Fix exclusive abyssal weathers items (#1794)

This commit is contained in:
blitzmann
2018-12-01 23:01:13 -05:00
parent 194c159379
commit d404d10bfe
3 changed files with 15 additions and 7 deletions

View File

@@ -237,20 +237,23 @@ class HandledProjectedModList(HandledList):
return
proj.projected = True
isSystemEffect = proj.item.group.name == "Effect Beacon"
if isSystemEffect:
if proj.isExclusiveSystemEffect:
self.makeRoom(proj)
HandledList.append(self, proj)
# Remove non-projectable modules
if not proj.item.isType("projected") and not isSystemEffect:
if not proj.item.isType("projected") and not proj.isExclusiveSystemEffect:
self.remove(proj)
@property
def currentSystemEffect(self):
return next((m for m in self if m.isExclusiveSystemEffect), None)
def makeRoom(self, proj):
# remove other system effects - only 1 per fit plz
oldEffect = next((m for m in self if m.item.group.name == "Effect Beacon"), None)
oldEffect = self.currentSystemEffect
if oldEffect:
pyfalog.info("System effect occupied with {0}, replacing with {1}", oldEffect.item.name, proj.item.name)