From 818ee1d4473384569beb8d5068f85048fbd8d466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Thu, 30 Nov 2023 12:21:15 -0600 Subject: [PATCH] feat: use userstring --- scripts/buildTankopedia.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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,