Update database (vedmak fitting changes) and do relevant string updates
Also change jsontosql script to ignore fsdtypeoverrides which is no longer dumpable by phobos
This commit is contained in:
@@ -72,7 +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")
|
||||
SYSTEM_GROUPS = ("Effect Beacon", "MassiveEnvironments", "Abyssal Hazards", "Non-Interactable Object")
|
||||
|
||||
def __init__(self, item):
|
||||
"""Initialize a module from the program"""
|
||||
|
||||
@@ -195,7 +195,7 @@ class WhProjector(ContextMenu):
|
||||
def getLocalizedEnvironments(self):
|
||||
sMkt = Market.getInstance()
|
||||
|
||||
grp = sMkt.getGroup("Uninteractable Localized Effect Beacon")
|
||||
grp = sMkt.getGroup("Abyssal Hazards")
|
||||
|
||||
effects = dict()
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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", "Uninteractable Localized Effect Beacon", "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", "Abyssal Hazards", "Non-Interactable Object")'
|
||||
cursor.execute(query)
|
||||
for row in cursor:
|
||||
itemid = row[0]
|
||||
|
||||
@@ -25,7 +25,7 @@ import re
|
||||
|
||||
# Add eos root path to sys.path so we can import ourselves
|
||||
path = os.path.dirname(__file__)
|
||||
sys.path.append(os.path.realpath(os.path.join(path, "..")))
|
||||
sys.path.insert(0, os.path.realpath(os.path.join(path, "..")))
|
||||
|
||||
import json
|
||||
import argparse
|
||||
@@ -172,21 +172,6 @@ def main(db, json_path):
|
||||
newData.append(newRow)
|
||||
return newData
|
||||
|
||||
def convertTypes(typesData):
|
||||
"""
|
||||
Add factionID column to evetypes table.
|
||||
"""
|
||||
factionMap = {}
|
||||
with open(os.path.join(jsonPath, "fsdTypeOverrides.json")) as f:
|
||||
overridesData = json.load(f)
|
||||
for typeID, typeData in list(overridesData.items()):
|
||||
factionID = typeData.get("factionID")
|
||||
if factionID is not None:
|
||||
factionMap[int(typeID)] = factionID
|
||||
for row in typesData:
|
||||
row['factionID'] = factionMap.get(int(row['typeID']))
|
||||
return typesData
|
||||
|
||||
data = {}
|
||||
|
||||
# Dump all data to memory so we can easely cross check ignored rows
|
||||
@@ -199,8 +184,6 @@ def main(db, json_path):
|
||||
tableData = convertIcons(tableData)
|
||||
if jsonName == "phbtraits":
|
||||
tableData = convertTraits(tableData)
|
||||
if jsonName == "evetypes":
|
||||
tableData = convertTypes(tableData)
|
||||
if jsonName == "clonegrades":
|
||||
tableData = convertClones(tableData)
|
||||
data[jsonName] = tableData
|
||||
|
||||
@@ -9,14 +9,14 @@ import json
|
||||
|
||||
iconDict = {}
|
||||
|
||||
stream = open(r"C:\Users\Ryan\Sync\Git\blitzmann\Pyfa\scripts\iconIDs.yaml", "r")
|
||||
stream = open('iconIDs.yaml', 'r')
|
||||
docs = yaml.load_all(stream)
|
||||
|
||||
for doc in docs:
|
||||
for k,v in list(doc.items()):
|
||||
iconDict[str(k)] = {"iconFile": v['iconFile']}
|
||||
iconDict[str(k)] = {'iconFile': v['iconFile']}
|
||||
|
||||
with open('icons.json', 'w') as outfile:
|
||||
json.dump(iconDict, outfile)
|
||||
|
||||
print("done")
|
||||
print('done')
|
||||
|
||||
Reference in New Issue
Block a user