Fix scripts for t3 tactical modes

This commit is contained in:
blitzmann
2014-12-02 18:33:59 -05:00
parent 85029f6be8
commit de9fbd672f
3 changed files with 11 additions and 8 deletions

View File

@@ -42,7 +42,10 @@ def main(old, new, groups=True, effects=True, attributes=True, renames=True):
new_cursor = new_db.cursor() new_cursor = new_db.cursor()
# Force some of the items to make them published # 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 = ?' OVERRIDES_TYPEPUB = 'UPDATE invtypes SET published = 1 WHERE typeName = ?'
for typename in FORCEPUB_TYPES: for typename in FORCEPUB_TYPES:
old_cursor.execute(OVERRIDES_TYPEPUB, (typename,)) 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 # Initialize container for the data for each item with empty stuff besides groupID
dictionary[itemid] = [groupID, set(), {}] dictionary[itemid] = [groupID, set(), {}]
# Add items filtered by group # 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) cursor.execute(query)
for row in cursor: for row in cursor:
itemid = row[0] itemid = row[0]

View File

@@ -143,15 +143,17 @@ def main(db, json_path):
tableData = convertTraits(tableData) tableData = convertTraits(tableData)
data[jsonName] = tableData data[jsonName] = tableData
# 1306 - group Ship Modifiers, for items like tactical t3 ship modes
# Do some preprocessing to make our job easier # Do some preprocessing to make our job easier
invTypes = set() invTypes = set()
for row in data["invtypes"]: for row in data["invtypes"]:
if row["published"]: if (row["published"] or row['groupID'] == 1306):
invTypes.add(row["typeID"]) invTypes.add(row["typeID"])
# ignore checker # ignore checker
def isIgnored(file, row): def isIgnored(file, row):
if file == "invtypes" and not row["published"]: if file == "invtypes" and not (row["published"] or row['groupID'] == 1306):
return True return True
elif file == "dgmtypeeffects" and not row["typeID"] in invTypes: elif file == "dgmtypeeffects" and not row["typeID"] in invTypes:
return True return True

View File

@@ -214,10 +214,8 @@ class Market():
"Goru's Shuttle": False, "Goru's Shuttle": False,
"Guristas Shuttle": False, "Guristas Shuttle": False,
"Mobile Decoy Unit": False, # Seems to be left over test mod for deployables "Mobile Decoy Unit": False, # Seems to be left over test mod for deployables
"Tournament Micro Jump Unit": False, # Normally seen only on tournament arenas "Tournament Micro Jump Unit": False} # Normally seen only on tournament arenas
"Amarr Tactical Destroyer Propulsion Mode": True,
"Amarr Tactical Destroyer Defense Mode": True,
"Amarr Tactical Destroyer Sharpshooter Mode": True}
# do not publish ships that we convert # do not publish ships that we convert
for name in conversions.packs['skinnedShips']: for name in conversions.packs['skinnedShips']: