mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: things?
This commit is contained in:
1 parent
b883f5b9e2
commit
ca030688cb
8 files changed
+83
-57
No files matched your search
@@ -5,6 +5,7 @@ import { extractModel } from '../../src/core/blitz/extractModel';
|
||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
||||
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||
import { AssetCommit } from '../../src/core/github/assetCommit';
|
||||
import { DATA, POI } from './constants';
|
||||
import { VehicleDefinitionList } from './definitions';
|
||||
@@ -24,6 +25,7 @@ export async function tankModels(production: boolean) {
|
||||
|
||||
for (const nationIndex in nations) {
|
||||
const nation = nations[nationIndex];
|
||||
const changes: FileChange[] = [];
|
||||
const assetCommit = new AssetCommit(`tank models ${nation}`, production);
|
||||
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
||||
`${DATA}/${POI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
||||
@@ -56,14 +58,17 @@ export async function tankModels(production: boolean) {
|
||||
baseColor,
|
||||
);
|
||||
|
||||
assetCommit.add(
|
||||
`3d/tanks/models/${id}.glb`,
|
||||
Buffer.from(await nodeIO.writeBinary(model)).toString('base64'),
|
||||
'base64',
|
||||
);
|
||||
changes.push({
|
||||
path: `3d/tanks/models/${id}.glb`,
|
||||
content: Buffer.from(await nodeIO.writeBinary(model)).toString(
|
||||
'base64',
|
||||
),
|
||||
encoding: 'base64',
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
assetCommit.push();
|
||||
// await commitAssets(`tank models ${nation}`, changes, production);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user