Fix scripts for t3 tactical modes
This commit is contained in:
@@ -42,7 +42,10 @@ def main(old, new, groups=True, effects=True, attributes=True, renames=True):
|
||||
new_cursor = new_db.cursor()
|
||||
|
||||
# Force some of the items to make them published
|
||||
FORCEPUB_TYPES = ("Ibis", "Impairor", "Velator", "Reaper")
|
||||
FORCEPUB_TYPES = ("Ibis", "Impairor", "Velator", "Reaper",
|
||||
"Amarr Tactical Destroyer Propulsion Mode",
|
||||
"Amarr Tactical Destroyer Sharpshooter Mode",
|
||||
"Amarr Tactical Destroyer Defense Mode")
|
||||
OVERRIDES_TYPEPUB = 'UPDATE invtypes SET published = 1 WHERE typeName = ?'
|
||||
for typename in FORCEPUB_TYPES:
|
||||
old_cursor.execute(OVERRIDES_TYPEPUB, (typename,))
|
||||
@@ -211,7 +214,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")'
|
||||
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")'
|
||||
cursor.execute(query)
|
||||
for row in cursor:
|
||||
itemid = row[0]
|
||||
|
||||
@@ -143,15 +143,17 @@ def main(db, json_path):
|
||||
tableData = convertTraits(tableData)
|
||||
data[jsonName] = tableData
|
||||
|
||||
# 1306 - group Ship Modifiers, for items like tactical t3 ship modes
|
||||
|
||||
# Do some preprocessing to make our job easier
|
||||
invTypes = set()
|
||||
for row in data["invtypes"]:
|
||||
if row["published"]:
|
||||
if (row["published"] or row['groupID'] == 1306):
|
||||
invTypes.add(row["typeID"])
|
||||
|
||||
# ignore checker
|
||||
def isIgnored(file, row):
|
||||
if file == "invtypes" and not row["published"]:
|
||||
if file == "invtypes" and not (row["published"] or row['groupID'] == 1306):
|
||||
return True
|
||||
elif file == "dgmtypeeffects" and not row["typeID"] in invTypes:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user