From de9fbd672f16fac33e73d99ad9e75d3193eee03b Mon Sep 17 00:00:00 2001 From: blitzmann Date: Tue, 2 Dec 2014 18:33:59 -0500 Subject: [PATCH] Fix scripts for t3 tactical modes --- scripts/itemDiff.py | 7 +++++-- scripts/jsonToSql.py | 6 ++++-- service/market.py | 6 ++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/itemDiff.py b/scripts/itemDiff.py index b1877897c..6f63a5cf1 100755 --- a/scripts/itemDiff.py +++ b/scripts/itemDiff.py @@ -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] diff --git a/scripts/jsonToSql.py b/scripts/jsonToSql.py index 5c861e522..bdbeec416 100755 --- a/scripts/jsonToSql.py +++ b/scripts/jsonToSql.py @@ -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 diff --git a/service/market.py b/service/market.py index 4b8d93d75..fdde3c598 100644 --- a/service/market.py +++ b/service/market.py @@ -214,10 +214,8 @@ class Market(): "Goru's Shuttle": False, "Guristas Shuttle": False, "Mobile Decoy Unit": False, # Seems to be left over test mod for deployables - "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} + "Tournament Micro Jump Unit": False} # Normally seen only on tournament arenas + # do not publish ships that we convert for name in conversions.packs['skinnedShips']: