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:
6
eos/effects/weatherbasic.py
Normal file
6
eos/effects/weatherbasic.py
Normal file
@@ -0,0 +1,6 @@
|
||||
runTime = "early"
|
||||
type = ("projected", "passive")
|
||||
|
||||
|
||||
def handler(fit, beacon, context):
|
||||
pass
|
||||
6
eos/effects/weathercaustictoxin.py
Normal file
6
eos/effects/weathercaustictoxin.py
Normal file
@@ -0,0 +1,6 @@
|
||||
runTime = "early"
|
||||
type = ("projected", "passive")
|
||||
|
||||
|
||||
def handler(fit, beacon, context):
|
||||
pass
|
||||
6
eos/effects/weatherdarkness.py
Normal file
6
eos/effects/weatherdarkness.py
Normal file
@@ -0,0 +1,6 @@
|
||||
runTime = "early"
|
||||
type = ("projected", "passive")
|
||||
|
||||
|
||||
def handler(fit, beacon, context):
|
||||
pass
|
||||
6
eos/effects/weatherelectricstorm.py
Normal file
6
eos/effects/weatherelectricstorm.py
Normal file
@@ -0,0 +1,6 @@
|
||||
runTime = "early"
|
||||
type = ("projected", "passive")
|
||||
|
||||
|
||||
def handler(fit, beacon, context):
|
||||
pass
|
||||
13
eos/effects/weatherinfernal.py
Normal file
13
eos/effects/weatherinfernal.py
Normal file
@@ -0,0 +1,13 @@
|
||||
runTime = "early"
|
||||
type = ("projected", "passive", "gang")
|
||||
|
||||
|
||||
def handler(fit, beacon, context, **kwargs):
|
||||
for x in range(1, 3):
|
||||
if beacon.getModifiedItemAttr("warfareBuff{}ID".format(x)):
|
||||
value = beacon.getModifiedItemAttr("warfareBuff{}Value".format(x))
|
||||
id = beacon.getModifiedItemAttr("warfareBuff{}ID".format(x))
|
||||
|
||||
if id:
|
||||
fit.addCommandBonus(id, value, beacon, kwargs['effect'], 'early')
|
||||
|
||||
6
eos/effects/weatherxenongas.py
Normal file
6
eos/effects/weatherxenongas.py
Normal file
@@ -0,0 +1,6 @@
|
||||
runTime = "early"
|
||||
type = ("projected", "passive")
|
||||
|
||||
|
||||
def handler(fit, beacon, context):
|
||||
pass
|
||||
@@ -672,6 +672,12 @@ class Fit(object):
|
||||
groups = ("Energy Weapon", "Hybrid Weapon")
|
||||
self.modules.filteredItemBoost(lambda mod: mod.item.group.name in groups, "maxRange", value, stackingPenalties=True)
|
||||
|
||||
if warfareBuffID == 95: # Weather_infernal_thermal_resistance_penalty
|
||||
for tankType in ("shield", "armor"):
|
||||
self.ship.boostItemAttr("{}ThermalDamageResonance".format(tankType), value)
|
||||
self.ship.boostItemAttr("thermalDamageResonance", value) # for hull
|
||||
|
||||
|
||||
del self.commandBonuses[warfareBuffID]
|
||||
|
||||
def __resetDependentCalcs(self):
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -216,7 +216,7 @@ def main(old, new, groups=True, effects=True, attributes=True, renames=True):
|
||||
# Initialize container for the data for each item with empty stuff besides groupID
|
||||
dictionary[itemid] = [groupID, set(), {}]
|
||||
# Add items filtered by group
|
||||
query = 'SELECT it.typeID, it.groupID FROM invtypes AS it INNER JOIN invgroups AS ig ON it.groupID = ig.groupID WHERE it.published = 1 AND ig.groupName IN ("Effect Beacon", "Ship Modifiers", "Mutaplasmids", "MassiveEnvironments", "Non-Interactable Object")'
|
||||
query = 'SELECT it.typeID, it.groupID FROM invtypes AS it INNER JOIN invgroups AS ig ON it.groupID = ig.groupID WHERE it.published = 1 AND ig.groupName IN ("Effect Beacon", "Ship Modifiers", "Mutaplasmids", "MassiveEnvironments", "Uninteractable Localized Effect Beacon", "Non-Interactable Object")'
|
||||
cursor.execute(query)
|
||||
for row in cursor:
|
||||
itemid = row[0]
|
||||
|
||||
@@ -214,7 +214,7 @@ def main(db, json_path):
|
||||
or row['groupID'] == 1306 # group Ship Modifiers, for items like tactical t3 ship modes
|
||||
or row['typeName'].startswith('Civilian') # Civilian weapons
|
||||
or row['typeID'] in (41549, 41548, 41551,41550) # Micro Bombs (Fighters)
|
||||
or row['groupID'] in (1882, 1975) # Abysmal weather (environment)
|
||||
or row['groupID'] in (1882, 1975, 1971) # Abysmal weather (environment)
|
||||
):
|
||||
eveTypes.add(row["typeID"])
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ class Fit(object):
|
||||
elif thing.category.name == "Fighter":
|
||||
fighter = es_Fighter(thing)
|
||||
fit.projectedFighters.append(fighter)
|
||||
elif thing.group.name == "Effect Beacon":
|
||||
elif thing.group.name in es_Module.SYSTEM_GROUPS:
|
||||
module = es_Module(thing)
|
||||
module.state = State.ONLINE
|
||||
fit.projectedModules.append(module)
|
||||
|
||||
@@ -812,14 +812,19 @@ class Market(object):
|
||||
"Pulsar Effect Beacon",
|
||||
"Red Giant Beacon",
|
||||
"Wolf Rayet Effect Beacon",
|
||||
"Incursion ship attributes effects")
|
||||
"Incursion ship attributes effects",
|
||||
"MassiveEnvironments",
|
||||
"Non-Interactable Object")
|
||||
# Stuff we don't want to see in names
|
||||
garbages = ("Effect", "Beacon", "ship attributes effects")
|
||||
# Get group with all the system-wide beacons
|
||||
grp = self.getGroup("Effect Beacon")
|
||||
beacons = self.getItemsByGroup(grp)
|
||||
grp2 = self.getGroup("MassiveEnvironments")
|
||||
grp3 = self.getGroup("Non-Interactable Object")
|
||||
|
||||
# Cycle through them
|
||||
for beacon in beacons:
|
||||
for beacon in self.getItemsByGroup(grp):
|
||||
print(beacon.name)
|
||||
# Check if it belongs to any valid group
|
||||
for group in validgroups:
|
||||
# Check beginning of the name only
|
||||
@@ -845,4 +850,9 @@ class Market(object):
|
||||
effects[groupname].add((beacon, beaconname, shortname))
|
||||
# Break loop on 1st result
|
||||
break
|
||||
|
||||
effects["Non-Interactable"] = set()
|
||||
for beacon in grp3.items:
|
||||
effects["Non-Interactable"].add((beacon, beacon.name, beacon.name))
|
||||
|
||||
return effects
|
||||
|
||||
Reference in New Issue
Block a user