mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: start of proto only
This commit is contained in:
1 parent
d90a3cc010
commit
45dc99e1ce
19 files changed
+365
-891
No files matched your search
@@ -807,7 +807,7 @@ export async function definitions() {
|
||||
forwards: tankDefinition.root.speedLimits.forward,
|
||||
backwards: tankDefinition.root.speedLimits.backward,
|
||||
},
|
||||
equipment:
|
||||
equipment_preset:
|
||||
typeof equipment === 'string' ? equipment : equipment.at(-1)!,
|
||||
consumables: tankDefinition.root.consumableSlots,
|
||||
provisions: tankDefinition.root.provisionSlots,
|
||||
@@ -888,7 +888,7 @@ export async function definitions() {
|
||||
id: trackId,
|
||||
weight: track.weight,
|
||||
name: strings[track.userString],
|
||||
traverseSpeed: track.rotationSpeed,
|
||||
traverse_speed: track.rotationSpeed,
|
||||
dispersion: {
|
||||
move: track.shotDispersionFactors.vehicleMovement,
|
||||
traverse: track.shotDispersionFactors.vehicleRotation,
|
||||
@@ -920,7 +920,7 @@ export async function definitions() {
|
||||
tankDefinitions[tankId].engines.push({
|
||||
id: engineId,
|
||||
name: strings[engineListEntry.userString],
|
||||
fireChance: engineListEntry.fireStartingChance,
|
||||
fire_chance: engineListEntry.fireStartingChance,
|
||||
tier: engineListEntry.level as Tier,
|
||||
weight: engineListEntry.weight,
|
||||
power: engineListEntry.power,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { $ } from 'bun';
|
||||
import { readdir } from 'fs/promises';
|
||||
|
||||
const ROOT = 'packages/core/protos';
|
||||
|
||||
const files = await readdir(`${ROOT}/raw`);
|
||||
const args = [
|
||||
'--plugin="./node_modules/.bin/protoc-gen-ts"',
|
||||
'--js_out="import_style=commonjs,binary:${OUT_DIR}"',
|
||||
`--ts_out="${ROOT}/generated"`,
|
||||
...files.map((file) => `${ROOT}/raw/${file}`),
|
||||
];
|
||||
|
||||
console.log(`protoc ${args.join(' ')}`);
|
||||
|
||||
console.log(await $`protoc ${args.join(' ')}`.text());
|
||||
Reference in new issue
Block a user