Add conversions
This commit is contained in:
68
eos/db/migrations/upgrade46.py
Normal file
68
eos/db/migrations/upgrade46.py
Normal file
@@ -0,0 +1,68 @@
|
||||
"""
|
||||
Migration 46
|
||||
|
||||
- Mining crystal changes
|
||||
"""
|
||||
|
||||
CONVERSIONS = {
|
||||
60276: ( # Simple Asteroid Mining Crystal Type A I
|
||||
18066, # Veldspar Mining Crystal I
|
||||
18062, # Scordite Mining Crystal I
|
||||
18060, # Pyroxeres Mining Crystal I
|
||||
18058, # Plagioclase Mining Crystal I
|
||||
),
|
||||
60281: ( # Simple Asteroid Mining Crystal Type A II
|
||||
18618, # Veldspar Mining Crystal II
|
||||
18616, # Scordite Mining Crystal II
|
||||
18614, # Pyroxeres Mining Crystal II
|
||||
18612, # Plagioclase Mining Crystal II
|
||||
),
|
||||
60285: ( # Coherent Asteroid Mining Crystal Type A I
|
||||
18056, # Omber Mining Crystal I
|
||||
18052, # Kernite Mining Crystal I
|
||||
18050, # Jaspet Mining Crystal I
|
||||
18048, # Hemorphite Mining Crystal I
|
||||
18046, # Hedbergite Mining Crystal I
|
||||
),
|
||||
60288: ( # Coherent Asteroid Mining Crystal Type A II
|
||||
18610, # Omber Mining Crystal II
|
||||
18604, # Jaspet Mining Crystal II
|
||||
18606, # Kernite Mining Crystal II
|
||||
18600, # Hedbergite Mining Crystal II
|
||||
18602, # Hemorphite Mining Crystal II
|
||||
),
|
||||
60291: ( # Variegated Asteroid Mining Crystal Type A I
|
||||
18044, # Gneiss Mining Crystal I
|
||||
18042, # Dark Ochre Mining Crystal I
|
||||
18040, # Crokite Mining Crystal I
|
||||
),
|
||||
60294: ( # Variegated Asteroid Mining Crystal Type A II
|
||||
18598, # Gneiss Mining Crystal II
|
||||
18596, # Dark Ochre Mining Crystal II
|
||||
18594, # Crokite Mining Crystal II
|
||||
),
|
||||
60297: ( # Complex Asteroid Mining Crystal Type A I
|
||||
18038, # Bistot Mining Crystal I
|
||||
18036, # Arkonor Mining Crystal I
|
||||
18064, # Spodumain Mining Crystal I
|
||||
),
|
||||
60300: ( # Complex Asteroid Mining Crystal Type A II
|
||||
18592, # Bistot Mining Crystal II
|
||||
18590, # Arkonor Mining Crystal II
|
||||
18624, # Spodumain Mining Crystal II
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
def upgrade(saveddata_engine):
|
||||
# Convert modules
|
||||
for replacement_item, list in CONVERSIONS.items():
|
||||
for retired_item in list:
|
||||
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
|
||||
(replacement_item, retired_item))
|
||||
saveddata_engine.execute('UPDATE "modules" SET "baseItemID" = ? WHERE "baseItemID" = ?',
|
||||
(replacement_item, retired_item))
|
||||
saveddata_engine.execute('UPDATE "modules" SET "chargeID" = ? WHERE "chargeID" = ?',
|
||||
(replacement_item, retired_item))
|
||||
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
|
||||
(replacement_item, retired_item))
|
||||
@@ -13,13 +13,39 @@ sys.path.append(os.path.realpath(os.path.join(path, "..")))
|
||||
# change to correct conversion
|
||||
|
||||
rename_phrase = " renamed to "
|
||||
conversion_phrase = " converted to "
|
||||
conversion_phrase = " -> "
|
||||
|
||||
text = """
|
||||
'Hypnos' Signal Distortion Amplifier I renamed to Hypnos Compact Signal Distortion Amplifier I
|
||||
Initiated Signal Distortion Amplifier I converted to Hypnos Compact Signal Distortion Amplifier I
|
||||
Induced Signal Distortion Amplifier I converted to Hypnos Compact Signal Distortion Amplifier I
|
||||
Compulsive Signal Distortion Amplifier I converted to Hypnos Compact Signal Distortion Amplifier I
|
||||
Veldspar Mining Crystal I -> Simple Asteroid Mining Crystal Type A I
|
||||
Scordite Mining Crystal I -> Simple Asteroid Mining Crystal Type A I
|
||||
Pyroxeres Mining Crystal I -> Simple Asteroid Mining Crystal Type A I
|
||||
Plagioclase Mining Crystal I -> Simple Asteroid Mining Crystal Type A I
|
||||
Veldspar Mining Crystal II -> Simple Asteroid Mining Crystal Type A II
|
||||
Scordite Mining Crystal II -> Simple Asteroid Mining Crystal Type A II
|
||||
Pyroxeres Mining Crystal II -> Simple Asteroid Mining Crystal Type A II
|
||||
Plagioclase Mining Crystal II -> Simple Asteroid Mining Crystal Type A II
|
||||
Omber Mining Crystal I -> Coherent Asteroid Mining Crystal Type A I
|
||||
Kernite Mining Crystal I -> Coherent Asteroid Mining Crystal Type A I
|
||||
Jaspet Mining Crystal I -> Coherent Asteroid Mining Crystal Type A I
|
||||
Hemorphite Mining Crystal I -> Coherent Asteroid Mining Crystal Type A I
|
||||
Hedbergite Mining Crystal I -> Coherent Asteroid Mining Crystal Type A I
|
||||
Omber Mining Crystal II -> Coherent Asteroid Mining Crystal Type A II
|
||||
Jaspet Mining Crystal II -> Coherent Asteroid Mining Crystal Type A II
|
||||
Kernite Mining Crystal II -> Coherent Asteroid Mining Crystal Type A II
|
||||
Hedbergite Mining Crystal II -> Coherent Asteroid Mining Crystal Type A II
|
||||
Hemorphite Mining Crystal II -> Coherent Asteroid Mining Crystal Type A II
|
||||
Gneiss Mining Crystal I -> Variegated Asteroid Mining Crystal Type A I
|
||||
Dark Ochre Mining Crystal I -> Variegated Asteroid Mining Crystal Type A I
|
||||
Crokite Mining Crystal I -> Variegated Asteroid Mining Crystal Type A I
|
||||
Gneiss Mining Crystal II -> Variegated Asteroid Mining Crystal Type A II
|
||||
Dark Ochre Mining Crystal II -> Variegated Asteroid Mining Crystal Type A II
|
||||
Crokite Mining Crystal II -> Variegated Asteroid Mining Crystal Type A II
|
||||
Bistot Mining Crystal I -> Complex Asteroid Mining Crystal Type A I
|
||||
Arkonor Mining Crystal I -> Complex Asteroid Mining Crystal Type A I
|
||||
Spodumain Mining Crystal I -> Complex Asteroid Mining Crystal Type A I
|
||||
Bistot Mining Crystal II -> Complex Asteroid Mining Crystal Type A II
|
||||
Arkonor Mining Crystal II -> Complex Asteroid Mining Crystal Type A II
|
||||
Spodumain Mining Crystal II -> Complex Asteroid Mining Crystal Type A II
|
||||
"""
|
||||
|
||||
def main(old, new):
|
||||
|
||||
@@ -19,4 +19,35 @@ CONVERSIONS = {
|
||||
"Exceptional Moon Ore Mining Crystal II": "Exceptional Moon Mining Crystal Type A II",
|
||||
"Industrial Core I": "Capital Industrial Core I",
|
||||
"Industrial Core II": "Capital Industrial Core II",
|
||||
# Converted items
|
||||
"Veldspar Mining Crystal I": "Simple Asteroid Mining Crystal Type A I",
|
||||
"Scordite Mining Crystal I": "Simple Asteroid Mining Crystal Type A I",
|
||||
"Pyroxeres Mining Crystal I": "Simple Asteroid Mining Crystal Type A I",
|
||||
"Plagioclase Mining Crystal I": "Simple Asteroid Mining Crystal Type A I",
|
||||
"Veldspar Mining Crystal II": "Simple Asteroid Mining Crystal Type A II",
|
||||
"Scordite Mining Crystal II": "Simple Asteroid Mining Crystal Type A II",
|
||||
"Pyroxeres Mining Crystal II": "Simple Asteroid Mining Crystal Type A II",
|
||||
"Plagioclase Mining Crystal II": "Simple Asteroid Mining Crystal Type A II",
|
||||
"Omber Mining Crystal I": "Coherent Asteroid Mining Crystal Type A I",
|
||||
"Kernite Mining Crystal I": "Coherent Asteroid Mining Crystal Type A I",
|
||||
"Jaspet Mining Crystal I": "Coherent Asteroid Mining Crystal Type A I",
|
||||
"Hemorphite Mining Crystal I": "Coherent Asteroid Mining Crystal Type A I",
|
||||
"Hedbergite Mining Crystal I": "Coherent Asteroid Mining Crystal Type A I",
|
||||
"Omber Mining Crystal II": "Coherent Asteroid Mining Crystal Type A II",
|
||||
"Jaspet Mining Crystal II": "Coherent Asteroid Mining Crystal Type A II",
|
||||
"Kernite Mining Crystal II": "Coherent Asteroid Mining Crystal Type A II",
|
||||
"Hedbergite Mining Crystal II": "Coherent Asteroid Mining Crystal Type A II",
|
||||
"Hemorphite Mining Crystal II": "Coherent Asteroid Mining Crystal Type A II",
|
||||
"Gneiss Mining Crystal I": "Variegated Asteroid Mining Crystal Type A I",
|
||||
"Dark Ochre Mining Crystal I": "Variegated Asteroid Mining Crystal Type A I",
|
||||
"Crokite Mining Crystal I": "Variegated Asteroid Mining Crystal Type A I",
|
||||
"Gneiss Mining Crystal II": "Variegated Asteroid Mining Crystal Type A II",
|
||||
"Dark Ochre Mining Crystal II": "Variegated Asteroid Mining Crystal Type A II",
|
||||
"Crokite Mining Crystal II": "Variegated Asteroid Mining Crystal Type A II",
|
||||
"Bistot Mining Crystal I": "Complex Asteroid Mining Crystal Type A I",
|
||||
"Arkonor Mining Crystal I": "Complex Asteroid Mining Crystal Type A I",
|
||||
"Spodumain Mining Crystal I": "Complex Asteroid Mining Crystal Type A I",
|
||||
"Bistot Mining Crystal II": "Complex Asteroid Mining Crystal Type A II",
|
||||
"Arkonor Mining Crystal II": "Complex Asteroid Mining Crystal Type A II",
|
||||
"Spodumain Mining Crystal II": "Complex Asteroid Mining Crystal Type A II",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user