feat: load tank data

This commit is contained in:
TrèsAbhi committed 2025-11-28 14:21:26 -06:00
1 parent 6a958da390
commit 383d3a36ef
3 files changed
+39 -1

No files matched your search

+13 -1
View File
@@ -78,7 +78,12 @@ export class ServerAPI extends AbstractAPI {
for (const item of group) {
const tankCatalog = item.TankCatalog();
const name = strings[tankCatalog.name!.value];
if (!tankCatalog.name) continue;
const name = strings[tankCatalog.name.value];
if (!name) continue;
const id = item.name;
const slug = sluggify(name);
@@ -88,4 +93,11 @@ export class ServerAPI extends AbstractAPI {
return { tanks };
}
async tank(id: string) {
const item = this.metadata.item(`TankEntity.${id}`);
const tankCatalog = item.TankCatalog();
return tankCatalog;
}
}