diff --git a/eos/effects/weatherbasic.py b/eos/effects/weatherbasic.py new file mode 100644 index 000000000..726601d67 --- /dev/null +++ b/eos/effects/weatherbasic.py @@ -0,0 +1,6 @@ +runTime = "early" +type = ("projected", "passive") + + +def handler(fit, beacon, context): + pass diff --git a/eos/effects/weathercaustictoxin.py b/eos/effects/weathercaustictoxin.py new file mode 100644 index 000000000..726601d67 --- /dev/null +++ b/eos/effects/weathercaustictoxin.py @@ -0,0 +1,6 @@ +runTime = "early" +type = ("projected", "passive") + + +def handler(fit, beacon, context): + pass diff --git a/eos/effects/weatherdarkness.py b/eos/effects/weatherdarkness.py new file mode 100644 index 000000000..726601d67 --- /dev/null +++ b/eos/effects/weatherdarkness.py @@ -0,0 +1,6 @@ +runTime = "early" +type = ("projected", "passive") + + +def handler(fit, beacon, context): + pass diff --git a/eos/effects/weatherelectricstorm.py b/eos/effects/weatherelectricstorm.py new file mode 100644 index 000000000..726601d67 --- /dev/null +++ b/eos/effects/weatherelectricstorm.py @@ -0,0 +1,6 @@ +runTime = "early" +type = ("projected", "passive") + + +def handler(fit, beacon, context): + pass diff --git a/eos/effects/weatherinfernal.py b/eos/effects/weatherinfernal.py new file mode 100644 index 000000000..708ce8925 --- /dev/null +++ b/eos/effects/weatherinfernal.py @@ -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') + diff --git a/eos/effects/weatherxenongas.py b/eos/effects/weatherxenongas.py new file mode 100644 index 000000000..726601d67 --- /dev/null +++ b/eos/effects/weatherxenongas.py @@ -0,0 +1,6 @@ +runTime = "early" +type = ("projected", "passive") + + +def handler(fit, beacon, context): + pass diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index cb5bedcf9..05081da7b 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -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): diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index cf669f273..41bed8c50 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -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") diff --git a/eve.db b/eve.db index ba935f349..27c702d17 100644 Binary files a/eve.db and b/eve.db differ diff --git a/scripts/itemDiff.py b/scripts/itemDiff.py index 0b7476b0b..9afa8ab7b 100755 --- a/scripts/itemDiff.py +++ b/scripts/itemDiff.py @@ -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] diff --git a/scripts/jsonToSql.py b/scripts/jsonToSql.py index 67a56d310..1a284a5da 100755 --- a/scripts/jsonToSql.py +++ b/scripts/jsonToSql.py @@ -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"]) diff --git a/service/fit.py b/service/fit.py index 38b6161a8..5fb884cad 100644 --- a/service/fit.py +++ b/service/fit.py @@ -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) diff --git a/service/market.py b/service/market.py index dd2d60d14..e5b588e2a 100644 --- a/service/market.py +++ b/service/market.py @@ -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