Skip to content

Commit 1c92128

Browse files
authored
fix: multi-aura polarity support (#828)
1 parent 49e6203 commit 1c92128

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

build/wikia/transformers/transformPolarity.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ const transform = (field) => {
44
let output;
55
try {
66
if (field) {
7-
output = String(POLARITIES[field] ?? field ?? '').toLowerCase();
7+
if (typeof field !== 'string' && Array.isArray(field)) {
8+
return field.map((f) => transform(f));
9+
}
10+
output = (POLARITIES[field] || field || '').toLowerCase();
811
if (output && !output.length) output = undefined;
912
if (output === 'none') output = undefined;
1013
}
1114
} catch (error) {
12-
console.error('Error transforming polarity:', field, error);
15+
console.error(`Error transforming polarity @${field} : ${error.message}`);
1316
}
1417

1518
return output;

data/json/All.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416745,7 +416745,7 @@
416745416745
}
416746416746
],
416747416747
"armor": 135,
416748-
"aura": "aura,vazarin",
416748+
"aura": [ "aura", "vazarin" ],
416749416749
"buildPrice": 25000,
416750416750
"buildQuantity": 1,
416751416751
"buildTime": 259200,
@@ -629144,7 +629144,7 @@
629144629144
"category": "Resources",
629145629145
"description": "This uncommon plant can only be found at night. \n\nLocation: Obtained by gathering Moonlight Dragonlily plants that grow on Earth",
629146629146
"imageName": "moonlight-dragonlily-1d96fd8309.png",
629147-
"itemCount": 10,
629147+
"itemCount": 6,
629148629148
"masterable": false,
629149629149
"name": "Moonlight Dragonlily",
629150629150
"parents": [ "Lapis Antitoxin", "Nightfall Apothic", "The Silver Grove", "Topaz Antitoxin", "Vermillion Antitoxin" ],
@@ -966847,7 +966847,7 @@
966847966847
"category": "Resources",
966848966848
"description": "This uncommon plant can only be found during the day. \n\nLocation: Obtained by gathering Sunlight Dragonlily plants that grow on Earth",
966849966849
"imageName": "sunlight-dragonlily-aaeb487cc1.png",
966850-
"itemCount": 10,
966850+
"itemCount": 4,
966851966851
"masterable": false,
966852966852
"name": "Sunlight Dragonlily",
966853966853
"parents": [ "Citrine Antitoxin", "Lapis Antitoxin", "The Silver Grove", "Vermillion Antitoxin" ],

data/json/Resources.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/json/Warframes.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)