mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: things?
This commit is contained in:
1 parent
b883f5b9e2
commit
ca030688cb
8 files changed
+83
-57
No files matched your search
@@ -29,6 +29,8 @@ export async function tankArmors(production: boolean) {
|
||||
|
||||
const id = toUniqueId(nation, tank.id);
|
||||
|
||||
if (id !== 12913) return;
|
||||
|
||||
console.log(`Building armor ${id} @ ${nation}/${tankKey}`);
|
||||
|
||||
const model = await extractArmor(DATA, `${nation}-${tankKey}`);
|
||||
|
||||
@@ -47,6 +47,7 @@ export async function tankIcons(production: boolean) {
|
||||
|
||||
const nationVehicleId = tank.id;
|
||||
const id = (nationVehicleId << 8) + (NATION_IDS[nation] << 4) + 1;
|
||||
if (12913 !== id) return;
|
||||
const parameters = await readYAMLDVPL<TankParameters>(
|
||||
`${DATA}/${POI.tankParameters}/${nation}/${tankKey}.yaml.dvpl`,
|
||||
);
|
||||
|
||||
@@ -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