diff --git a/scripts/buildTankopedia.ts b/scripts/buildTankopedia.ts index ecbb9dccc..8bfb9a00b 100644 --- a/scripts/buildTankopedia.ts +++ b/scripts/buildTankopedia.ts @@ -72,9 +72,8 @@ Promise.all( // Tankopedia const nationVehicleId = parseInt(list.root[vehicle].id._text); const id = (nationVehicleId << 8) + (NATION_IDS[nation] << 4) + 1; - // TODO: use userString property instead - const name = strings[`#${nation}_vehicles:${vehicle}`]; - const name_short = strings[`#${nation}_vehicles:${vehicle}_short`]; + const name = strings[vehicleData.userString._text]; + const name_short = strings[vehicleData.shortUserString._text]; const isPremium = 'gold' in vehicleData.price; const isCollector = vehicleData.sellPrice ? 'gold' in vehicleData.sellPrice @@ -83,6 +82,10 @@ Promise.all( const tags = vehicleData.tags._text.split(' '); const type = tags[0]; + // if ((name ?? name_short) === undefined) { + // console.log(vehicleData); + // } + tankIds.push(id); tankopedia[id] = { id,