mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: use dev branch for dev activities
This commit is contained in:
1 parent
480fda34ce
commit
00244846cb
12 files changed
+104
-214
No files matched your search
@@ -1,36 +1,29 @@
|
|||||||
import { readdir } from 'fs/promises';
|
import { readdir } from 'fs/promises';
|
||||||
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
|
|
||||||
export async function circleFlags() {
|
export async function circleFlags(production: boolean) {
|
||||||
const flags = await readdir(`${DATA}/${POI.flags}`);
|
const flags = await readdir(`${DATA}/${POI.flags}`);
|
||||||
|
const changes = await Promise.all(
|
||||||
|
flags
|
||||||
|
.filter(
|
||||||
|
(flag) =>
|
||||||
|
flag.startsWith('flag_profile-stat_') &&
|
||||||
|
!flag.endsWith('@2x.packed.webp.dvpl'),
|
||||||
|
)
|
||||||
|
.map(async (flag) => {
|
||||||
|
const content = await readBase64DVPL(`${DATA}/${POI.flags}/${flag}`);
|
||||||
|
const name = flag.match(/flag_profile-stat_(.+)\.packed\.webp/)![1];
|
||||||
|
|
||||||
commitMultipleFiles(
|
return {
|
||||||
'tresabhi',
|
content,
|
||||||
'blitzkrieg-assets',
|
encoding: 'base64',
|
||||||
'main',
|
path: `flags/circle/${name}.webp`,
|
||||||
'circle flags',
|
} satisfies FileChange;
|
||||||
await Promise.all(
|
}),
|
||||||
flags
|
|
||||||
.filter(
|
|
||||||
(flag) =>
|
|
||||||
flag.startsWith('flag_profile-stat_') &&
|
|
||||||
!flag.endsWith('@2x.packed.webp.dvpl'),
|
|
||||||
)
|
|
||||||
.map(async (flag) => {
|
|
||||||
const content = await readBase64DVPL(`${DATA}/${POI.flags}/${flag}`);
|
|
||||||
const name = flag.match(/flag_profile-stat_(.+)\.packed\.webp/)![1];
|
|
||||||
|
|
||||||
return {
|
|
||||||
content,
|
|
||||||
encoding: 'base64',
|
|
||||||
path: `flags/circle/${name}.webp`,
|
|
||||||
} satisfies FileChange;
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
true,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await commitAssets('circle flags', changes, production);
|
||||||
}
|
}
|
||||||
@@ -3,9 +3,8 @@ import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
|
|||||||
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
|
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
|
||||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
import { ConsumablesCommon } from './definitions';
|
import { ConsumablesCommon } from './definitions';
|
||||||
|
|
||||||
@@ -17,62 +16,15 @@ interface Mappings {
|
|||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function buildConsumableIcons() {
|
export async function buildConsumableIcons(production: boolean) {
|
||||||
console.log('Building consumable icons...');
|
console.log('Building consumable icons...');
|
||||||
|
|
||||||
const changes: FileChange[] = [];
|
const changes: FileChange[] = [];
|
||||||
// const files = await readdir(`${DATA}/${POI.consumableIcons}`);
|
|
||||||
const texture = sharp(
|
const texture = sharp(
|
||||||
await readDVPLFile(
|
await readDVPLFile(
|
||||||
`${DATA}/${POI.consumableIcons}/texture0.packed.webp.dvpl`,
|
`${DATA}/${POI.consumableIcons}/texture0.packed.webp.dvpl`,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// const consumablesCommon = await readXMLDVPL<{ root: ConsumablesCommon }>(
|
|
||||||
// `${DATA}/${POI.consumablesCommon}.dvpl`,
|
|
||||||
// );
|
|
||||||
// const consumablesCommonValues = Object.values(consumablesCommon.root);
|
|
||||||
|
|
||||||
// await Promise.all(
|
|
||||||
// files
|
|
||||||
// .filter(
|
|
||||||
// (file) => file.endsWith('.txt.dvpl') && !file.endsWith('@2x.txt.dvpl'),
|
|
||||||
// )
|
|
||||||
// .map(async (file) => {
|
|
||||||
// const name = file.replace('.txt.dvpl', '');
|
|
||||||
// const sizes = await (
|
|
||||||
// await readStringDVPL(`${DATA}/${POI.consumableIcons}/${file}`)
|
|
||||||
// )
|
|
||||||
// .split('\n')[4]
|
|
||||||
// .split(' ')
|
|
||||||
// .map(Number);
|
|
||||||
// const commonEntry = consumablesCommonValues.find(
|
|
||||||
// (consumable) => consumable.icon === name,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// if (!commonEntry) {
|
|
||||||
// console.warn(`No common entry found for ${name}; skipping...`);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const content = (
|
|
||||||
// await texture
|
|
||||||
// .clone()
|
|
||||||
// .extract({
|
|
||||||
// left: sizes[0],
|
|
||||||
// top: sizes[1],
|
|
||||||
// width: sizes[2],
|
|
||||||
// height: sizes[3],
|
|
||||||
// })
|
|
||||||
// .toBuffer()
|
|
||||||
// ).toString('base64');
|
|
||||||
|
|
||||||
// changes.push({
|
|
||||||
// path: `icons/consumables/${commonEntry.id}.webp`,
|
|
||||||
// encoding: 'base64',
|
|
||||||
// content,
|
|
||||||
// });
|
|
||||||
// }),
|
|
||||||
// );
|
|
||||||
|
|
||||||
const equipmentItemImageMappings = await readYAMLDVPL<Mappings>(
|
const equipmentItemImageMappings = await readYAMLDVPL<Mappings>(
|
||||||
`${DATA}/${POI.equipmentItemImageMappings}.dvpl`,
|
`${DATA}/${POI.equipmentItemImageMappings}.dvpl`,
|
||||||
@@ -82,7 +34,7 @@ export async function buildConsumableIcons() {
|
|||||||
);
|
);
|
||||||
const styleSheets = Object.values(equipmentItemImageMappings.StyleSheets);
|
const styleSheets = Object.values(equipmentItemImageMappings.StyleSheets);
|
||||||
|
|
||||||
Promise.all(
|
await Promise.all(
|
||||||
Object.values(consumablesCommon.root).map(async (consumable) => {
|
Object.values(consumablesCommon.root).map(async (consumable) => {
|
||||||
const styleSheet = styleSheets.find((styleSheet) =>
|
const styleSheet = styleSheets.find((styleSheet) =>
|
||||||
styleSheet.selectors.includes(
|
styleSheet.selectors.includes(
|
||||||
@@ -137,13 +89,5 @@ export async function buildConsumableIcons() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('Committing consumable icons...');
|
await commitAssets('consumable icons', changes, production);
|
||||||
await commitMultipleFiles(
|
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'consumable icons',
|
|
||||||
changes,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import { TankType } from '../../src/components/Tanks';
|
|||||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||||
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
||||||
import commitMultipleFiles from '../../src/core/blitzkrieg/commitMultipleFiles';
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
import { ConsumableDefinitions } from '../../src/core/blitzkrieg/consumablesDefinitions';
|
import { ConsumableDefinitions } from '../../src/core/blitzkrieg/consumablesDefinitions';
|
||||||
import {
|
import {
|
||||||
EquipmentDefinitions,
|
EquipmentDefinitions,
|
||||||
@@ -237,7 +237,7 @@ const missingStrings: Record<string, string> = {
|
|||||||
'#artefacts:tungstentip/name': 'Tungsten Shells',
|
'#artefacts:tungstentip/name': 'Tungsten Shells',
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function buildDefinitions() {
|
export async function buildDefinitions(production: boolean) {
|
||||||
console.log('Building tank definitions...');
|
console.log('Building tank definitions...');
|
||||||
|
|
||||||
const tankDefinitions: TankDefinitions = {};
|
const tankDefinitions: TankDefinitions = {};
|
||||||
@@ -286,8 +286,6 @@ export async function buildDefinitions() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
for (const tankKey in tankList.root) {
|
for (const tankKey in tankList.root) {
|
||||||
if (tankKey.includes('tutorial_bot')) return;
|
|
||||||
|
|
||||||
const tank = tankList.root[tankKey];
|
const tank = tankList.root[tankKey];
|
||||||
const tankPrice: TankDefinitionPrice =
|
const tankPrice: TankDefinitionPrice =
|
||||||
typeof tank.price === 'number'
|
typeof tank.price === 'number'
|
||||||
@@ -677,11 +675,7 @@ export async function buildDefinitions() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('Committing definitions...');
|
await commitAssets(
|
||||||
await commitMultipleFiles(
|
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'definitions',
|
'definitions',
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -705,6 +699,6 @@ export async function buildDefinitions() {
|
|||||||
path: 'definitions/consumables.json',
|
path: 'definitions/consumables.json',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
true,
|
production,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -3,9 +3,8 @@ import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
|
|||||||
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
|
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
|
||||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
import { OptionalDevices } from './definitions';
|
import { OptionalDevices } from './definitions';
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ interface Mappings {
|
|||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function equipmentIcons() {
|
export async function equipmentIcons(production: boolean) {
|
||||||
console.log('Building equipment icons...');
|
console.log('Building equipment icons...');
|
||||||
|
|
||||||
const changes: FileChange[] = [];
|
const changes: FileChange[] = [];
|
||||||
@@ -89,13 +88,5 @@ export async function equipmentIcons() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('Committing equipment icons...');
|
await commitAssets('equipment icons', changes, production);
|
||||||
commitMultipleFiles(
|
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'equipment icons',
|
|
||||||
changes,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -18,45 +18,46 @@ const targets = argv
|
|||||||
.find((argument) => argument.startsWith('--target'))
|
.find((argument) => argument.startsWith('--target'))
|
||||||
?.split('=')[1]
|
?.split('=')[1]
|
||||||
.split(',');
|
.split(',');
|
||||||
|
const production = argv.includes('--production');
|
||||||
|
|
||||||
if (!targets && !allTargets) throw new Error('No target(s) specified');
|
if (!targets && !allTargets) throw new Error('No target(s) specified');
|
||||||
|
|
||||||
if (allTargets || targets?.includes('definitions')) {
|
if (allTargets || targets?.includes('definitions')) {
|
||||||
await buildDefinitions();
|
await buildDefinitions(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('tankIcons')) {
|
if (allTargets || targets?.includes('tankIcons')) {
|
||||||
await buildTankIcons();
|
await buildTankIcons(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('scratchedFlags')) {
|
if (allTargets || targets?.includes('scratchedFlags')) {
|
||||||
await buildScratchedFlags();
|
await buildScratchedFlags(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('circleFlags')) {
|
if (allTargets || targets?.includes('circleFlags')) {
|
||||||
await circleFlags();
|
await circleFlags(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('tankModels')) {
|
if (allTargets || targets?.includes('tankModels')) {
|
||||||
await buildTankModels();
|
await buildTankModels(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('shellIcons')) {
|
if (allTargets || targets?.includes('shellIcons')) {
|
||||||
await buildShellIcons();
|
await buildShellIcons(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('moduleIcons')) {
|
if (allTargets || targets?.includes('moduleIcons')) {
|
||||||
await buildModuleIcons();
|
await buildModuleIcons(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('tankArmor')) {
|
if (allTargets || targets?.includes('tankArmor')) {
|
||||||
await buildTankArmors();
|
await buildTankArmors(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('equipmentIcons')) {
|
if (allTargets || targets?.includes('equipmentIcons')) {
|
||||||
await equipmentIcons();
|
await equipmentIcons(production);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allTargets || targets?.includes('consumableIcons')) {
|
if (allTargets || targets?.includes('consumableIcons')) {
|
||||||
await buildConsumableIcons();
|
await buildConsumableIcons(production);
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
import { readdir } from 'fs/promises';
|
import { readdir } from 'fs/promises';
|
||||||
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
|
|
||||||
export async function buildModuleIcons() {
|
export async function buildModuleIcons(production: boolean) {
|
||||||
console.log('Building module icons...');
|
console.log('Building module icons...');
|
||||||
|
|
||||||
const changes = await Promise.all(
|
const changes = await Promise.all(
|
||||||
@@ -29,13 +28,5 @@ export async function buildModuleIcons() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('Committing module icons...');
|
await commitAssets('module icons', changes, production);
|
||||||
commitMultipleFiles(
|
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'module icons',
|
|
||||||
changes,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -1,39 +1,31 @@
|
|||||||
import { readdir } from 'fs/promises';
|
import { readdir } from 'fs/promises';
|
||||||
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
|
|
||||||
export async function buildScratchedFlags() {
|
export async function buildScratchedFlags(production: boolean) {
|
||||||
console.log('Building scratched flags...');
|
console.log('Building scratched flags...');
|
||||||
|
|
||||||
const flags = await readdir(`${DATA}/${POI.flags}`);
|
const flags = await readdir(`${DATA}/${POI.flags}`);
|
||||||
|
const changes = await Promise.all(
|
||||||
|
flags
|
||||||
|
.filter(
|
||||||
|
(flag) =>
|
||||||
|
flag.startsWith('flag_tutor-tank_') &&
|
||||||
|
!flag.endsWith('@2x.packed.webp.dvpl'),
|
||||||
|
)
|
||||||
|
.map(async (flag) => {
|
||||||
|
const content = await readBase64DVPL(`${DATA}/${POI.flags}/${flag}`);
|
||||||
|
const name = flag.match(/flag_tutor-tank_(.+)\.packed\.webp/)![1];
|
||||||
|
|
||||||
console.log('Committing scratched flags...');
|
return {
|
||||||
commitMultipleFiles(
|
content,
|
||||||
'tresabhi',
|
encoding: 'base64',
|
||||||
'blitzkrieg-assets',
|
path: `flags/scratched/${name}.webp`,
|
||||||
'main',
|
} satisfies FileChange;
|
||||||
'scratched flags',
|
}),
|
||||||
await Promise.all(
|
|
||||||
flags
|
|
||||||
.filter(
|
|
||||||
(flag) =>
|
|
||||||
flag.startsWith('flag_tutor-tank_') &&
|
|
||||||
!flag.endsWith('@2x.packed.webp.dvpl'),
|
|
||||||
)
|
|
||||||
.map(async (flag) => {
|
|
||||||
const content = await readBase64DVPL(`${DATA}/${POI.flags}/${flag}`);
|
|
||||||
const name = flag.match(/flag_tutor-tank_(.+)\.packed\.webp/)![1];
|
|
||||||
|
|
||||||
return {
|
|
||||||
content,
|
|
||||||
encoding: 'base64',
|
|
||||||
path: `flags/scratched/${name}.webp`,
|
|
||||||
} satisfies FileChange;
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
true,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await commitAssets('scratched flags', changes, production);
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,11 @@ import { readdir } from 'fs/promises';
|
|||||||
import sharp from 'sharp';
|
import sharp from 'sharp';
|
||||||
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
|
import { readDVPLFile } from '../../src/core/blitz/readDVPLFile';
|
||||||
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
|
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
|
|
||||||
export async function buildShellIcons() {
|
export async function buildShellIcons(production: boolean) {
|
||||||
console.log('Building shell icons...');
|
console.log('Building shell icons...');
|
||||||
|
|
||||||
const image = sharp(
|
const image = sharp(
|
||||||
@@ -46,13 +45,5 @@ export async function buildShellIcons() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('Committing shell icons...');
|
await commitAssets('shell icons', changes, production);
|
||||||
commitMultipleFiles(
|
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'shell icons',
|
|
||||||
changes,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -3,13 +3,12 @@ import { readdir } from 'fs/promises';
|
|||||||
import { extractArmor } from '../../src/core/blitz/extractArmor';
|
import { extractArmor } from '../../src/core/blitz/extractArmor';
|
||||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||||
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
import { VehicleDefinitionList } from './definitions';
|
import { VehicleDefinitionList } from './definitions';
|
||||||
|
|
||||||
export async function buildTankArmors() {
|
export async function buildTankArmors(production: boolean) {
|
||||||
console.log('Building tank armors...');
|
console.log('Building tank armors...');
|
||||||
|
|
||||||
const changes: FileChange[] = [];
|
const changes: FileChange[] = [];
|
||||||
@@ -48,12 +47,5 @@ export async function buildTankArmors() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
await commitMultipleFiles(
|
await commitAssets('tank armor', changes, production);
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'tank armor',
|
|
||||||
changes,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -3,9 +3,8 @@ import { NATION_IDS } from '../../src/constants/nations';
|
|||||||
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
import { readBase64DVPL } from '../../src/core/blitz/readBase64DVPL';
|
||||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
import { VehicleDefinitionList } from './definitions';
|
import { VehicleDefinitionList } from './definitions';
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ export interface TankParameters {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function buildTankIcons() {
|
export async function buildTankIcons(production: boolean) {
|
||||||
console.log('Building tank icons...');
|
console.log('Building tank icons...');
|
||||||
|
|
||||||
const changes: FileChange[] = [];
|
const changes: FileChange[] = [];
|
||||||
@@ -66,13 +65,5 @@ export async function buildTankIcons() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('Committing tank icons...');
|
await commitAssets('tank icons', changes, production);
|
||||||
await commitMultipleFiles(
|
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'tank icons',
|
|
||||||
changes,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,8 @@ import { extractModel } from '../../src/core/blitz/extractModel';
|
|||||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||||
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
||||||
import commitMultipleFiles, {
|
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
||||||
FileChange,
|
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
||||||
} from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
import { VehicleDefinitionList } from './definitions';
|
import { VehicleDefinitionList } from './definitions';
|
||||||
import { TankParameters } from './tankIcons';
|
import { TankParameters } from './tankIcons';
|
||||||
@@ -16,7 +15,7 @@ interface VehicleCustomization {
|
|||||||
armorColor: string;
|
armorColor: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function buildTankModels() {
|
export async function buildTankModels(production: boolean) {
|
||||||
console.log('Building tank models...');
|
console.log('Building tank models...');
|
||||||
|
|
||||||
const changes: FileChange[] = [];
|
const changes: FileChange[] = [];
|
||||||
@@ -70,12 +69,5 @@ export async function buildTankModels() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
await commitMultipleFiles(
|
await commitAssets('tank models', changes, production);
|
||||||
'tresabhi',
|
|
||||||
'blitzkrieg-assets',
|
|
||||||
'main',
|
|
||||||
'tank models',
|
|
||||||
changes,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import commitMultipleFiles, { FileChange } from './commitMultipleFiles';
|
||||||
|
|
||||||
|
export async function commitAssets(
|
||||||
|
message: string,
|
||||||
|
changes: FileChange[],
|
||||||
|
production: boolean,
|
||||||
|
) {
|
||||||
|
console.log(`Committing ${message}...`);
|
||||||
|
|
||||||
|
await commitMultipleFiles(
|
||||||
|
'tresabhi',
|
||||||
|
'blitzkrieg-assets',
|
||||||
|
production ? 'main' : 'dev',
|
||||||
|
`${message} - ${new Date().toDateString()}`,
|
||||||
|
changes,
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user