Files
blitzkit/packages/scripts/src/buildAssets/definitions.ts
T

52 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-09-29 22:42:15 -05:00
import { TankClass, TankDefinitions, TankPriceType } from '@blitzkit/core';
2024-09-29 22:24:35 -05:00
2024-08-27 14:40:43 -05:00
export async function definitions() {
2024-02-11 14:17:41 -06:00
console.log('Building definitions...');
2024-09-29 22:24:35 -05:00
2024-09-29 22:42:15 -05:00
const buffer = TankDefinitions.encode({
tanks: {
1: {
name: 'asd',
ancestors: [],
camouflageMoving: 1,
camouflageOnFire: 1,
camouflages: [],
camouflageStill: 1,
class: TankClass.TANK_CLASS_HEAVY,
description: 'asd',
crew: [],
deprecated: false,
engines: [],
equipmentPreset: '',
fixedCamouflage: false,
health: 1,
id: 1,
maxConsumables: 1,
maxProvisions: 1,
nation: 'usa',
price: {
type: TankPriceType.TANK_PRICE_TYPE_CREDITS,
value: 1,
},
roles: {},
speedBackwards: 1,
speedForwards: 1,
successors: [],
testing: false,
tier: 1,
tracks: [],
turrets: [],
type: 1,
xp: 1,
nameFull: '',
weight: 1,
},
},
}).finish();
2024-09-29 22:24:35 -05:00
2024-09-29 22:42:15 -05:00
console.log(buffer.length);
2024-09-29 22:24:35 -05:00
2024-09-29 22:42:15 -05:00
console.log(TankDefinitions.decode(buffer));
2023-12-05 19:14:53 -06:00
}
2024-09-29 22:24:35 -05:00
definitions();