"Move" attributes at DB generation time

This commit is contained in:
DarkPhoenix
2020-04-24 15:10:00 +03:00
parent ea07bbf4f9
commit 21ea9ce579
6 changed files with 21 additions and 56 deletions

View File

@@ -226,18 +226,6 @@ def main(old, new, groups=True, effects=True, attributes=True, renames=True):
effectSet.add(effectID)
if attributes:
# Add base attributes to our data
query = 'SELECT it.typeID, it.mass, it.capacity, it.volume FROM invtypes AS it'
cursor.execute(query)
for row in cursor:
itemid = row[0]
if itemid in dictionary:
attrdict = dictionary[itemid][2]
# Add base attributes: mass (4), capacity (38) and volume (161)
attrdict[4] = row[1]
attrdict[38] = row[2]
attrdict[161] = row[3]
# Add attribute data for other attributes
query = 'SELECT dta.typeID, dta.attributeID, dta.value FROM dgmtypeattribs AS dta'
cursor.execute(query)