Merge branch 'master' into master
This commit is contained in:
@@ -40,7 +40,9 @@ items_table = Table("invtypes", gamedata_meta,
|
||||
Column("marketGroupID", Integer, ForeignKey("invmarketgroups.marketGroupID")),
|
||||
Column("iconID", Integer),
|
||||
Column("graphicID", Integer),
|
||||
Column("groupID", Integer, ForeignKey("invgroups.groupID"), index=True))
|
||||
Column("groupID", Integer, ForeignKey("invgroups.groupID"), index=True),
|
||||
Column("replaceSame", String),
|
||||
Column("replaceBetter", String))
|
||||
|
||||
from .metaGroup import metatypes_table # noqa
|
||||
from .traits import traits_table # noqa
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# ammoInfluenceCapNeed
|
||||
#
|
||||
# Used by:
|
||||
# Items from category: Charge (493 of 947)
|
||||
# Items from category: Charge (493 of 949)
|
||||
type = "passive"
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# ammoInfluenceRange
|
||||
#
|
||||
# Used by:
|
||||
# Items from category: Charge (587 of 947)
|
||||
# Items from category: Charge (587 of 949)
|
||||
type = "passive"
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# ammoSpeedMultiplier
|
||||
#
|
||||
# Used by:
|
||||
# Charges from group: Festival Charges (23 of 23)
|
||||
# Charges from group: Festival Charges (26 of 26)
|
||||
# Charges from group: Interdiction Probe (2 of 2)
|
||||
# Charges from group: Structure Festival Charges (3 of 3)
|
||||
# Special Edition Assetss from group: Festival Charges Expired (2 of 2)
|
||||
# Items from market group: Special Edition Assets > Special Edition Festival Assets (30 of 33)
|
||||
type = "passive"
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# ammoTrackingMultiplier
|
||||
#
|
||||
# Used by:
|
||||
# Items from category: Charge (182 of 947)
|
||||
# Items from category: Charge (182 of 949)
|
||||
# Charges from group: Projectile Ammo (128 of 128)
|
||||
type = "passive"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# boosterShieldCapacityPenalty
|
||||
#
|
||||
# Used by:
|
||||
# Implants from group: Booster (12 of 71)
|
||||
# Implants from group: Booster (12 of 70)
|
||||
type = "boosterSideEffect"
|
||||
|
||||
# User-friendly name for the side effect
|
||||
|
||||
@@ -6,5 +6,5 @@ type = "passive"
|
||||
|
||||
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Cynosural Field",
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Cynosural Field Generator",
|
||||
"duration", ship.getModifiedItemAttr("durationBonus"))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# cynosuralGeneration
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Cynosural Field (2 of 2)
|
||||
# Modules from group: Cynosural Field Generator (2 of 2)
|
||||
type = "active"
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@ type = "passive"
|
||||
|
||||
def handler(fit, container, context):
|
||||
level = container.level if "skill" in context else 1
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Cynosural Field",
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Cynosural Field Generator",
|
||||
"consumptionQuantity",
|
||||
container.getModifiedItemAttr("consumptionQuantityBonusPercentage") * level)
|
||||
|
||||
10
eos/effects/implantwarpscramblerangebonus.py
Normal file
10
eos/effects/implantwarpscramblerangebonus.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# implantWarpScrambleRangeBonus
|
||||
#
|
||||
# Used by:
|
||||
# Implants named like: Inquest 'Hedone' Entanglement Optimizer WS (3 of 3)
|
||||
type = "passive"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Warp Scrambler", "maxRange",
|
||||
src.getModifiedItemAttr("warpScrambleRangeBonus"), stackingPenalties=False)
|
||||
10
eos/effects/miningdurationmultiplieronline.py
Normal file
10
eos/effects/miningdurationmultiplieronline.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# miningDurationMultiplierOnline
|
||||
#
|
||||
# Used by:
|
||||
# Module: Frostline 'Omnivore' Harvester Upgrade
|
||||
type = "passive"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Mining Laser",
|
||||
"duration", module.getModifiedItemAttr("miningDurationMultiplier"))
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Modules from group: Missile Launcher Torpedo (22 of 22)
|
||||
# Items from market group: Ship Equipment > Turrets & Bays (429 of 882)
|
||||
# Items from market group: Ship Equipment > Turrets & Bays (429 of 883)
|
||||
# Module: Interdiction Sphere Launcher I
|
||||
type = "overheat"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#
|
||||
# Used by:
|
||||
# Implants named like: Inquest 'Eros' Stasis Webifier MR (3 of 3)
|
||||
# Implants named like: Inquest 'Hedone' Entanglement Optimizer WS (3 of 3)
|
||||
type = "passive"
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# shipBonusNosNeutCapNeedRoleBonus2
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Rodiva
|
||||
# Ship: Zarmazd
|
||||
# Variations of ship: Rodiva (2 of 2)
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Capacitor Emission Systems"), "capacitorNeed", src.getModifiedItemAttr("shipBonusRole2"))
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# shipBonusRemoteCapacitorTransferRangeRole1
|
||||
#
|
||||
# Used by:
|
||||
# Ship: Rodiva
|
||||
# Ship: Zarmazd
|
||||
# Variations of ship: Rodiva (2 of 2)
|
||||
type = "passive"
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Remote Capacitor Transmitter", "maxRange", src.getModifiedItemAttr("shipBonusRole1"))
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
# shipBonusSmartbombCapNeedRoleBonus2
|
||||
#
|
||||
# Used by:
|
||||
# Variations of ship: Rodiva (2 of 2)
|
||||
# Ship: Damavik
|
||||
# Ship: Drekavac
|
||||
# Ship: Hydra
|
||||
# Ship: Kikimora
|
||||
# Ship: Leshak
|
||||
# Ship: Rodiva
|
||||
# Ship: Tiamat
|
||||
# Ship: Vedmak
|
||||
# Ship: Zarmazd
|
||||
type = "passive"
|
||||
|
||||
|
||||
|
||||
@@ -7,4 +7,4 @@ type = "passive"
|
||||
|
||||
def handler(fit, skill, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Bomb",
|
||||
"moduleReactivationDelay", skill.getModifiedItemAttr("rofBonus") * skill.level)
|
||||
"moduleReactivationDelay", skill.getModifiedItemAttr("reactivationDelayBonus") * skill.level)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# skillBonusDroneDurability
|
||||
#
|
||||
# Used by:
|
||||
# Implants from group: Cyber Drones (4 of 4)
|
||||
# Skill: Drone Durability
|
||||
type = "passive"
|
||||
|
||||
|
||||
14
eos/effects/skillbonusdronedurabilitynotfighters.py
Normal file
14
eos/effects/skillbonusdronedurabilitynotfighters.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# skillBonusDroneDurabilityNotFighters
|
||||
#
|
||||
# Used by:
|
||||
# Implants from group: Cyber Drones (4 of 4)
|
||||
type = "passive"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Drones"), "hp",
|
||||
src.getModifiedItemAttr("hullHpBonus"))
|
||||
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Drones"), "armorHP",
|
||||
src.getModifiedItemAttr("armorHpBonus"))
|
||||
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Drones"), "shieldCapacity",
|
||||
src.getModifiedItemAttr("shieldCapacityBonus"))
|
||||
@@ -1,8 +1,6 @@
|
||||
# skillBonusDroneInterfacing
|
||||
#
|
||||
# Used by:
|
||||
# Implant: CreoDron 'Bumblebee' Drone Tuner T10-5D
|
||||
# Implant: CreoDron 'Yellowjacket' Drone Tuner D5-10T
|
||||
# Skill: Drone Interfacing
|
||||
type = "passive"
|
||||
|
||||
|
||||
11
eos/effects/skillbonusdroneinterfacingnotfighters.py
Normal file
11
eos/effects/skillbonusdroneinterfacingnotfighters.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# skillBonusDroneInterfacingNotFighters
|
||||
#
|
||||
# Used by:
|
||||
# Implant: CreoDron 'Bumblebee' Drone Tuner T10-5D
|
||||
# Implant: CreoDron 'Yellowjacket' Drone Tuner D5-10T
|
||||
type = "passive"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Drones"), "damageMultiplier",
|
||||
src.getModifiedItemAttr("damageMultiplierBonus"))
|
||||
10
eos/effects/stripminerdurationmultiplier.py
Normal file
10
eos/effects/stripminerdurationmultiplier.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# stripMinerDurationMultiplier
|
||||
#
|
||||
# Used by:
|
||||
# Module: Frostline 'Omnivore' Harvester Upgrade
|
||||
type = "passive"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Strip Miner",
|
||||
"duration", module.getModifiedItemAttr("miningDurationMultiplier"))
|
||||
@@ -504,7 +504,7 @@ class Miscellanea(ViewColumn):
|
||||
text = "{0}s".format(cycleTime)
|
||||
tooltip = "Spoolup time"
|
||||
return text, tooltip
|
||||
elif itemGroup in ("Siege Module", "Cynosural Field"):
|
||||
elif itemGroup in ("Siege Module", "Cynosural Field Generator"):
|
||||
amt = stuff.getModifiedItemAttr("consumptionQuantity")
|
||||
if amt:
|
||||
typeID = stuff.getModifiedItemAttr("consumptionType")
|
||||
|
||||
@@ -706,7 +706,7 @@
|
||||
- tech2
|
||||
iconFile: res:/ui/texture/icons/12_64_13.png
|
||||
398:
|
||||
description: Corpse floating in space (male?). - Corpse
|
||||
description: chemical item
|
||||
iconFile: res:/ui/texture/icons/11_64_5.png
|
||||
400:
|
||||
description: Mineral - Pyerite
|
||||
@@ -10432,6 +10432,66 @@
|
||||
22076:
|
||||
description: Gift Box with Ribbon
|
||||
iconFile: res:/ui/texture/icons/76_64_3.png
|
||||
22077:
|
||||
description: 49978_Male_outer_ExplorationSuit_M01_Types_ExplorationSuit_M01_W.png
|
||||
iconFile: res:/UI/Asset/mannequin/outer/49978_Male_outer_ExplorationSuit_M01_Types_ExplorationSuit_M01_W.png
|
||||
22078:
|
||||
description: 49980_Female_Outer_ExplorationSuit_F01_Types_ExplorationSuit_F01_W.png
|
||||
iconFile: res:/UI/Asset/mannequin/outer/49980_Female_Outer_ExplorationSuit_F01_Types_ExplorationSuit_F01_W.png
|
||||
22079:
|
||||
description: Preview for reward track augmentations
|
||||
iconFile: res:/UI/Texture/Icons/RewardTrack/reward_Holiday2018_Augmentation1.png
|
||||
22080:
|
||||
description: Preview for reward track augmentations
|
||||
iconFile: res:/UI/Texture/Icons/RewardTrack/reward_Holiday2018_Augmentation2.png
|
||||
22081:
|
||||
description: Holiday'18 Crate - Drake/Rupture Splash
|
||||
iconFile: res:/UI/Texture/classes/ItemPacks/SplashImages/Holiday2018/splash_Holiday2018_DrakeRupture.png
|
||||
22082:
|
||||
description: Holiday'18 Crate - ExpSuits
|
||||
iconFile: res:/UI/Texture/classes/ItemPacks/SplashImages/Holiday2018/splash_Holiday2018_ExplorationSuits.png
|
||||
22084:
|
||||
description: Holiday'18 Crate - Augmentation Set 1
|
||||
iconFile: res:/UI/Texture/classes/ItemPacks/SplashImages/Holiday2018/splash_Holiday2018_FaceAugmentation1.png
|
||||
22085:
|
||||
description: Holiday'18 Crate - Augmentation Set 2
|
||||
iconFile: res:/UI/Texture/classes/ItemPacks/SplashImages/Holiday2018/splash_Holiday2018_FaceAugmentation2.png
|
||||
22086:
|
||||
description: Holiday'18 Crate - Gnosis/Punisher Splash
|
||||
iconFile: res:/UI/Texture/classes/ItemPacks/SplashImages/Holiday2018/splash_Holiday2018_GnosisPunisher.png
|
||||
22087:
|
||||
description: 49978_Male_outer_ExplorationSuit_M01_Types_ExplorationSuit_M01_W.png
|
||||
iconFile: res:/UI/Asset/mannequin/outer/49978_Male_outer_ExplorationSuit_M01_Types_ExplorationSuit_M01_W.png
|
||||
22088:
|
||||
description: 49980_Female_Outer_ExplorationSuit_F01_Types_ExplorationSuit_F01_W.png
|
||||
iconFile: res:/UI/Asset/mannequin/outer/49980_Female_Outer_ExplorationSuit_F01_Types_ExplorationSuit_F01_W.png
|
||||
22089:
|
||||
description: 49984_Female_Makeup_Augmentations_Face_Paint_F01_Types_Face_Paint_F01_V0_Blue.png
|
||||
iconFile: res:/UI/Asset/mannequin/makeup_augmentations/49984_Female_Makeup_Augmentations_Face_Paint_F01_Types_Face_Paint_F01_V0_Blue.png
|
||||
22090:
|
||||
description: 49985_Female_Makeup_Augmentations_Face_Paint_F01_Types_Face_Paint_F01_V10_W.png
|
||||
iconFile: res:/UI/Asset/mannequin/makeup_augmentations/49985_Female_Makeup_Augmentations_Face_Paint_F01_Types_Face_Paint_F01_V10_W.png
|
||||
22091:
|
||||
description: Manually added mutadaptive RR icon path
|
||||
iconFile: res:/ui/texture/icons/modules/abyssalremoterepairer.png
|
||||
backgrounds:
|
||||
- blueprint
|
||||
- blueprintCopy
|
||||
description: Mutadaptive Remote Repairer
|
||||
foregrounds:
|
||||
- faction
|
||||
- tech2
|
||||
iconFile: res:/ui/texture/icons/modules/abyssalRemoteRepairer.png
|
||||
22092:
|
||||
description: 49987_Male_Makeup_Augmentations_Face_Paint_M01_Types_Face_Paint_M01_V6_Blue.png
|
||||
iconFile: res:/UI/Asset/mannequin/makeup_augmentations/49987_Male_Makeup_Augmentations_Face_Paint_M01_Types_Face_Paint_M01_V6_Blue.png
|
||||
22093:
|
||||
description: Generic SKIN icon for crates containing multiple SKINs
|
||||
iconFile: res:/UI/Texture/Icons/RewardTrack/crateSkinContainer.png
|
||||
22094:
|
||||
description: Preview icon for exploration suit reward track winter'18
|
||||
iconFile: res:/UI/Texture/Icons/RewardTrack/crateWinterExplorationSuit.png
|
||||
22095:
|
||||
description: 49986_male_Makeup_Augmentations_Face_Paint_M01_Types_Face_Paint_M01_V10_W.png
|
||||
iconFile: res:/UI/Asset/mannequin/makeup_augmentations/49986_male_Makeup_Augmentations_Face_Paint_M01_Types_Face_Paint_M01_V10_W.png
|
||||
22096:
|
||||
description: Winter Login Campaign Banner
|
||||
iconFile: res:/UI/Texture/LoginCampaigns/Winter_2018.png
|
||||
|
||||
@@ -28,6 +28,8 @@ sys.path.insert(0, os.path.realpath(os.path.join(path, '..')))
|
||||
|
||||
import json
|
||||
import argparse
|
||||
import itertools
|
||||
|
||||
|
||||
CATEGORIES_TO_REMOVE = [
|
||||
30 # Apparel
|
||||
@@ -174,6 +176,119 @@ def main(db, json_path):
|
||||
newData.append(newRow)
|
||||
return newData
|
||||
|
||||
def fillReplacements(tables):
|
||||
|
||||
def compareAttrs(attrs1, attrs2, attrHig):
|
||||
"""
|
||||
Compares received attribute sets. Returns:
|
||||
- 0 if sets are different
|
||||
- 1 if sets are exactly the same
|
||||
- 2 if first set is strictly better
|
||||
- 3 if second set is strictly better
|
||||
"""
|
||||
if set(attrs1) != set(attrs2):
|
||||
return 0
|
||||
if all(attrs1[aid] == attrs2[aid] for aid in attrs1):
|
||||
return 1
|
||||
if all(
|
||||
(attrs1[aid] >= attrs2[aid] and attrHig[aid]) or
|
||||
(attrs1[aid] <= attrs2[aid] and not attrHig[aid])
|
||||
for aid in attrs1
|
||||
):
|
||||
return 2
|
||||
if all(
|
||||
(attrs2[aid] >= attrs1[aid] and attrHig[aid]) or
|
||||
(attrs2[aid] <= attrs1[aid] and not attrHig[aid])
|
||||
for aid in attrs1
|
||||
):
|
||||
return 3
|
||||
return 0
|
||||
|
||||
skillReqAttribs = {
|
||||
182: 277,
|
||||
183: 278,
|
||||
184: 279,
|
||||
1285: 1286,
|
||||
1289: 1287,
|
||||
1290: 1288}
|
||||
skillReqAttribsFlat = set(skillReqAttribs.keys()).union(skillReqAttribs.values())
|
||||
# Get data on type groups
|
||||
typesGroups = {}
|
||||
for row in tables['evetypes']:
|
||||
typesGroups[row['typeID']] = row['groupID']
|
||||
# Get data on type attributes
|
||||
typesNormalAttribs = {}
|
||||
typesSkillAttribs = {}
|
||||
for row in tables['dgmtypeattribs']:
|
||||
attributeID = row['attributeID']
|
||||
if attributeID in skillReqAttribsFlat:
|
||||
typeSkillAttribs = typesSkillAttribs.setdefault(row['typeID'], {})
|
||||
typeSkillAttribs[row['attributeID']] = row['value']
|
||||
# Ignore these attributes for comparison purposes
|
||||
elif attributeID in (
|
||||
422, # techLevel
|
||||
633, # metaLevel
|
||||
1692 # metaGroupID
|
||||
):
|
||||
continue
|
||||
else:
|
||||
typeNormalAttribs = typesNormalAttribs.setdefault(row['typeID'], {})
|
||||
typeNormalAttribs[row['attributeID']] = row['value']
|
||||
# Get data on skill requirements
|
||||
typesSkillReqs = {}
|
||||
for typeID, typeAttribs in typesSkillAttribs.items():
|
||||
typeSkillAttribs = typesSkillAttribs.get(typeID, {})
|
||||
if not typeSkillAttribs:
|
||||
continue
|
||||
typeSkillReqs = typesSkillReqs.setdefault(typeID, {})
|
||||
for skillreqTypeAttr, skillreqLevelAttr in skillReqAttribs.items():
|
||||
try:
|
||||
skillType = int(typeSkillAttribs[skillreqTypeAttr])
|
||||
skillLevel = int(typeSkillAttribs[skillreqLevelAttr])
|
||||
except (KeyError, ValueError):
|
||||
continue
|
||||
typeSkillReqs[skillType] = skillLevel
|
||||
# Get data on attribute highIsGood flag
|
||||
attrHig = {}
|
||||
for row in tables['dgmattribs']:
|
||||
attrHig[row['attributeID']] = bool(row['highIsGood'])
|
||||
# As EVE affects various types mostly depending on their group or skill requirements,
|
||||
# we're going to group various types up this way
|
||||
groupedData = {}
|
||||
for row in tables['evetypes']:
|
||||
typeID = row['typeID']
|
||||
typeAttribs = typesNormalAttribs.get(typeID, {})
|
||||
# Ignore stuff w/o attributes
|
||||
if not typeAttribs:
|
||||
continue
|
||||
# We need only skill types, not levels for keys
|
||||
typeSkillreqs = frozenset(typesSkillReqs.get(typeID, {}))
|
||||
typeGroup = typesGroups[typeID]
|
||||
groupData = groupedData.setdefault((typeGroup, typeSkillreqs), [])
|
||||
groupData.append((typeID, typeAttribs))
|
||||
same = {}
|
||||
better = {}
|
||||
# Now, go through composed groups and for every item within it find items which are
|
||||
# the same and which are better
|
||||
for groupData in groupedData.values():
|
||||
for type1, type2 in itertools.combinations(groupData, 2):
|
||||
comparisonResult = compareAttrs(type1[1], type2[1], attrHig)
|
||||
# Equal
|
||||
if comparisonResult == 1:
|
||||
same.setdefault(type1[0], set()).add(type2[0])
|
||||
same.setdefault(type2[0], set()).add(type1[0])
|
||||
# First is better
|
||||
elif comparisonResult == 2:
|
||||
better.setdefault(type2[0], set()).add(type1[0])
|
||||
# Second is better
|
||||
elif comparisonResult == 3:
|
||||
better.setdefault(type1[0], set()).add(type2[0])
|
||||
# Put this data into types table so that normal process hooks it up
|
||||
for row in tables['evetypes']:
|
||||
typeID = row['typeID']
|
||||
row['replaceSame'] = ','.join('{}'.format(tid) for tid in sorted(same.get(typeID, ())))
|
||||
row['replaceBetter'] = ','.join('{}'.format(tid) for tid in sorted(better.get(typeID, ())))
|
||||
|
||||
data = {}
|
||||
|
||||
# Dump all data to memory so we can easely cross check ignored rows
|
||||
@@ -190,6 +305,8 @@ def main(db, json_path):
|
||||
tableData = convertClones(tableData)
|
||||
data[jsonName] = tableData
|
||||
|
||||
fillReplacements(data)
|
||||
|
||||
# Set with typeIDs which we will have in our database
|
||||
# Sometimes CCP unpublishes some items we want to have published, we
|
||||
# can do it here - just add them to initial set
|
||||
|
||||
Reference in New Issue
Block a user