Start working on Abysmal space environment effects. The values produced for the infernal weather (calm firestorm) thermic resist penalties are spot on according to my testing. :D

This commit is contained in:
blitzmann
2018-05-20 11:34:35 -04:00
parent d84525876a
commit bc23417eae
13 changed files with 68 additions and 8 deletions

View File

@@ -72,6 +72,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
"""An instance of this class represents a module together with its charge and modified attributes"""
DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive")
MINING_ATTRIBUTES = ("miningAmount",)
SYSTEM_GROUPS = ("Effect Beacon", "MassiveEnvironments", "Uninteractable Localized Effect Beacon", "Non-Interactable Object")
def __init__(self, item):
"""Initialize a module from the program"""
@@ -165,7 +166,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
return False
return self.__item is None or \
(self.__item.category.name not in ("Module", "Subsystem", "Structure Module") and
self.__item.group.name != "Effect Beacon")
self.__item.group.name not in self.SYSTEM_GROUPS)
@property
def numCharges(self):
@@ -614,7 +615,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
for effectName, slot in effectSlotMap.items():
if effectName in item.effects:
return slot
if item.group.name == "Effect Beacon":
if item.group.name in Module.SYSTEM_GROUPS:
return Slot.SYSTEM
raise ValueError("Passed item does not fit in any known slot")