Skip to content

Commit 902a00d

Browse files
committed
Add conversions
1 parent 523cb14 commit 902a00d

File tree

3 files changed

+498
-88
lines changed

3 files changed

+498
-88
lines changed

eos/db/migrations/upgrade41.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"""
2+
Migration 41
3+
4+
- Resistance plating tiericide
5+
"""
6+
7+
CONVERSIONS = {
8+
16345: ( # Upgraded Layered Coating I
9+
16347, # Limited Layered Plating I
10+
16349, # 'Scarab' Layered Plating I
11+
16351, # 'Grail' Layered Plating I
12+
),
13+
16305: ( # Upgraded Multispectrum Coating I
14+
16307, # Limited Adaptive Nano Plating I
15+
16309, # 'Collateral' Adaptive Nano Plating I
16+
16311, # 'Refuge' Adaptive Nano Plating I
17+
),
18+
16329: ( # Upgraded EM Coating I
19+
16331, # Limited EM Plating I
20+
16333, # 'Contour' EM Plating I
21+
16335, # 'Spiegel' EM Plating I
22+
),
23+
16321: ( # Upgraded Explosive Coating I
24+
16323, # Limited Explosive Plating I
25+
16325, # Experimental Explosive Plating I
26+
16319, # 'Aegis' Explosive Plating I
27+
),
28+
16313: ( # Upgraded Kinetic Coating I
29+
16315, # Limited Kinetic Plating I
30+
16317, # Experimental Kinetic Plating I
31+
16327, # 'Element' Kinetic Plating I
32+
),
33+
16337: ( # Upgraded Thermal Coating I
34+
16339, # Limited Thermal Plating I
35+
16341, # Experimental Thermal Plating I
36+
16343, # Prototype Thermal Plating I
37+
)
38+
}
39+
40+
41+
def upgrade(saveddata_engine):
42+
# Convert modules
43+
for replacement_item, list in CONVERSIONS.items():
44+
for retired_item in list:
45+
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?',
46+
(replacement_item, retired_item))
47+
saveddata_engine.execute('UPDATE "modules" SET "baseItemID" = ? WHERE "baseItemID" = ?',
48+
(replacement_item, retired_item))
49+
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?',
50+
(replacement_item, retired_item))

0 commit comments

Comments
 (0)