mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: burst data
This commit is contained in:
1 parent
79c450798c
commit
c20f8c5040
37 files changed
+973
-1378
No files matched your search
@@ -12,7 +12,6 @@ import {
|
||||
EquipmentSlot,
|
||||
GameDefinitions,
|
||||
GunDefinition,
|
||||
GunDefinitionBase,
|
||||
I18nString,
|
||||
MapDefinitions,
|
||||
ModelDefinitions,
|
||||
@@ -274,6 +273,7 @@ interface VehicleDefinitions {
|
||||
pumpGunMode?: boolean;
|
||||
pumpGunReloadTimes?: string;
|
||||
clip?: { count: number; rate: number };
|
||||
burst?: { count: number; rate: number };
|
||||
models: { undamaged: string };
|
||||
extras?: {
|
||||
trayShell?: {
|
||||
@@ -1304,7 +1304,12 @@ export async function definitions() {
|
||||
}
|
||||
});
|
||||
|
||||
const base = {
|
||||
if (gun.burst) {
|
||||
console.log(tankId);
|
||||
console.log(gun.burst);
|
||||
}
|
||||
|
||||
tankDefinitions.tanks[tankId].turrets[turretIndex].guns.push({
|
||||
id: gunId,
|
||||
weight: gunListEntry.weight,
|
||||
rotation_speed: gunListEntry.rotationSpeed,
|
||||
@@ -1324,41 +1329,39 @@ export async function definitions() {
|
||||
unlocks: resolveUnlocks(gun.unlocks),
|
||||
shell_capacity: gun.maxAmmo ?? gunListEntry.maxAmmo,
|
||||
assault_ranges,
|
||||
} satisfies GunDefinitionBase;
|
||||
|
||||
tankDefinitions.tanks[tankId].turrets[turretIndex].guns.push({
|
||||
gun_type:
|
||||
gunType === 'regular'
|
||||
? {
|
||||
$case: 'regular',
|
||||
value: {
|
||||
base,
|
||||
extension: { reload: gun.reloadTime },
|
||||
reload: gun.reloadTime,
|
||||
},
|
||||
}
|
||||
: gunType === 'autoReloader'
|
||||
? {
|
||||
$case: 'auto_reloader',
|
||||
value: {
|
||||
base,
|
||||
extension: {
|
||||
intra_clip: 60 / gun.clip!.rate,
|
||||
shell_count: gunClipCount,
|
||||
shell_reloads: gun
|
||||
.pumpGunReloadTimes!.split(' ')
|
||||
.map(Number),
|
||||
},
|
||||
intra_clip: 60 / gun.clip!.rate,
|
||||
shell_count: gunClipCount,
|
||||
shell_reloads: gun
|
||||
.pumpGunReloadTimes!.split(' ')
|
||||
.map(Number),
|
||||
},
|
||||
}
|
||||
: {
|
||||
$case: 'auto_loader',
|
||||
value: {
|
||||
base,
|
||||
extension: {
|
||||
intra_clip: 60 / gun.clip!.rate,
|
||||
clip_reload: gun.reloadTime,
|
||||
shell_count: gunClipCount,
|
||||
},
|
||||
intra_clip: 60 / gun.clip!.rate,
|
||||
clip_reload: gun.reloadTime,
|
||||
shell_count: gunClipCount,
|
||||
burst:
|
||||
gun.burst && gun.burst.count > 1
|
||||
? {
|
||||
count: gun.burst.count,
|
||||
interval: 60 / gun.burst.rate,
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
},
|
||||
} satisfies GunDefinition);
|
||||
@@ -1407,7 +1410,7 @@ export async function definitions() {
|
||||
|
||||
tankDefinitions.tanks[tankId].turrets[turretIndex].guns[
|
||||
gunIndex
|
||||
].gun_type!.value.base!.shells.push({
|
||||
].shells.push({
|
||||
id: shellId,
|
||||
name: shellName,
|
||||
velocity: gunShellEntry.speed,
|
||||
@@ -1495,9 +1498,7 @@ export async function definitions() {
|
||||
turret.research_cost = turretXps.get(turret.id);
|
||||
|
||||
Object.values(turret.guns).forEach((gunRaw) => {
|
||||
gunRaw.gun_type!.value.base!.research_cost = gunXps.get(
|
||||
gunRaw.gun_type!.value.base!.id,
|
||||
);
|
||||
gunRaw.research_cost = gunXps.get(gunRaw.id);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user