mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: update all
This commit is contained in:
1 parent
3efe807e35
commit
a0bccc7973
21 files changed
+160
-306
No files matched your search
@@ -1,8 +1,6 @@
|
||||
import { toUniqueId } from "@blitzkit/core";
|
||||
import { readdir } from "fs/promises";
|
||||
import { readXMLDVPL } from "../core/blitz/readXMLDVPL";
|
||||
import { AssetUploader } from "../core/github/assetUploader";
|
||||
import { DATA } from "./constants";
|
||||
import { vfs } from "./constants";
|
||||
import { VehicleDefinitionList } from "./definitions";
|
||||
|
||||
export async function migration() {
|
||||
@@ -10,13 +8,11 @@ export async function migration() {
|
||||
|
||||
using uploader = new AssetUploader("migration map");
|
||||
const map: Record<string, number> = {};
|
||||
const nations = await readdir(`${DATA}/XML/item_defs/vehicles`).then(
|
||||
(nations) => nations.filter((nation) => nation !== "common")
|
||||
);
|
||||
const nations = vfs.dir(`Data/XML/item_defs/vehicles`).filter((nation) => nation !== "common");
|
||||
|
||||
for (const nation of nations) {
|
||||
const tankList = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
||||
`${DATA}/XML/item_defs/vehicles/${nation}/list.xml`
|
||||
const tankList = await vfs.xml<{ root: VehicleDefinitionList }>(
|
||||
`Data/XML/item_defs/vehicles/${nation}/list.xml`
|
||||
);
|
||||
|
||||
for (const tankKey in tankList.root) {
|
||||
|
||||
Reference in new issue
Block a user