feat: use userstring

This commit is contained in:
TrèsAbhi committed 2023-11-30 12:21:15 -06:00
1 parent 67e45ada85
commit 818ee1d447
1 file changed
+6 -3
+6 -3
View File
@@ -72,9 +72,8 @@ Promise.all(
// Tankopedia // Tankopedia
const nationVehicleId = parseInt(list.root[vehicle].id._text); const nationVehicleId = parseInt(list.root[vehicle].id._text);
const id = (nationVehicleId << 8) + (NATION_IDS[nation] << 4) + 1; const id = (nationVehicleId << 8) + (NATION_IDS[nation] << 4) + 1;
// TODO: use userString property instead const name = strings[vehicleData.userString._text];
const name = strings[`#${nation}_vehicles:${vehicle}`]; const name_short = strings[vehicleData.shortUserString._text];
const name_short = strings[`#${nation}_vehicles:${vehicle}_short`];
const isPremium = 'gold' in vehicleData.price; const isPremium = 'gold' in vehicleData.price;
const isCollector = vehicleData.sellPrice const isCollector = vehicleData.sellPrice
? 'gold' in vehicleData.sellPrice ? 'gold' in vehicleData.sellPrice
@@ -83,6 +82,10 @@ Promise.all(
const tags = vehicleData.tags._text.split(' '); const tags = vehicleData.tags._text.split(' ');
const type = tags[0]; const type = tags[0];
// if ((name ?? name_short) === undefined) {
// console.log(vehicleData);
// }
tankIds.push(id); tankIds.push(id);
tankopedia[id] = { tankopedia[id] = {
id, id,