mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: camouflage
This commit is contained in:
1 parent
38870ca3f7
commit
561b59d235
7 files changed
+81
-41
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
|
||||
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||
import { DATA, POI } from './constants';
|
||||
|
||||
export async function camouflageIcons(production: boolean) {
|
||||
console.log('Building camouflage icons...');
|
||||
const content = await readDVPLFile(
|
||||
`${DATA}/${POI.defaultCamoIcon.replace('.webp', '.packed.webp.dvpl')}`,
|
||||
).then((content) => content.toString('base64'));
|
||||
const changes: FileChange[] = [
|
||||
{
|
||||
content,
|
||||
encoding: 'base64',
|
||||
path: 'icons/camo.webp',
|
||||
},
|
||||
];
|
||||
|
||||
await commitAssets('camo icons', changes, production);
|
||||
}
|
||||
@@ -24,4 +24,5 @@ export const POI = {
|
||||
consumableIcons: 'Gfx/UI/InventoryIcons/Big/Consumables',
|
||||
equipmentItemImageMappings:
|
||||
'UI/Screens3/Lobby/Inventory/Equipment/EquipmentItemImage.style.yaml',
|
||||
defaultCamoIcon: 'Gfx/UI/Hangar/IconCamouflage.webp',
|
||||
} as const;
|
||||
@@ -1,5 +1,6 @@
|
||||
import { config } from 'dotenv';
|
||||
import { argv } from 'process';
|
||||
import { camouflageIcons } from './camouflageIcons';
|
||||
import { buildCircleFlags } from './circleFlags';
|
||||
import { buildConsumableIcons } from './consumableIcons';
|
||||
import { buildDefinitions } from './definitions';
|
||||
@@ -22,41 +23,22 @@ const production = argv.includes('--production');
|
||||
|
||||
if (!targets && !allTargets) throw new Error('No target(s) specified');
|
||||
|
||||
if (allTargets || targets?.includes('tankModels')) {
|
||||
await buildTankModels(production);
|
||||
}
|
||||
const methods = [
|
||||
buildTankModels,
|
||||
buildTankArmors,
|
||||
buildDefinitions,
|
||||
buildTankIcons,
|
||||
buildScratchedFlags,
|
||||
buildCircleFlags,
|
||||
buildShellIcons,
|
||||
buildModuleIcons,
|
||||
equipmentIcons,
|
||||
buildConsumableIcons,
|
||||
camouflageIcons,
|
||||
];
|
||||
|
||||
if (allTargets || targets?.includes('tankArmor')) {
|
||||
await buildTankArmors(production);
|
||||
}
|
||||
|
||||
if (allTargets || targets?.includes('definitions')) {
|
||||
await buildDefinitions(production);
|
||||
}
|
||||
|
||||
if (allTargets || targets?.includes('tankIcons')) {
|
||||
await buildTankIcons(production);
|
||||
}
|
||||
|
||||
if (allTargets || targets?.includes('scratchedFlags')) {
|
||||
await buildScratchedFlags(production);
|
||||
}
|
||||
|
||||
if (allTargets || targets?.includes('circleFlags')) {
|
||||
await buildCircleFlags(production);
|
||||
}
|
||||
|
||||
if (allTargets || targets?.includes('shellIcons')) {
|
||||
await buildShellIcons(production);
|
||||
}
|
||||
|
||||
if (allTargets || targets?.includes('moduleIcons')) {
|
||||
await buildModuleIcons(production);
|
||||
}
|
||||
if (allTargets || targets?.includes('equipmentIcons')) {
|
||||
equipmentIcons(production);
|
||||
}
|
||||
|
||||
if (allTargets || targets?.includes('consumableIcons')) {
|
||||
await buildConsumableIcons(production);
|
||||
for (const method of methods) {
|
||||
if (allTargets || targets?.includes(method.name)) {
|
||||
await method(production);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user