feat: start of assault shells

This commit is contained in:
TrèsAbhi committed 2025-07-31 13:44:14 -05:00
1 parent 83b7de77de
commit 40e4e0a274
2 files changed
+356 -208

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,5 +1,6 @@
import { import {
Armor, Armor,
AssaultRanges,
BlitzTankClass, BlitzTankClass,
CamouflageDefinitions, CamouflageDefinitions,
Consumable, Consumable,
@@ -1251,6 +1252,7 @@ export async function definitions() {
const maskEnabled = const maskEnabled =
tankParameters.maskSlice?.[maskName]?.enabled ?? false; tankParameters.maskSlice?.[maskName]?.enabled ?? false;
let mask: number | undefined; let mask: number | undefined;
let assault_ranges: AssaultRanges | undefined;
if (gun.extras?.trayShell) { if (gun.extras?.trayShell) {
const kinds = gun.extras.trayShell.kinds const kinds = gun.extras.trayShell.kinds
@@ -1272,7 +1274,7 @@ export async function definitions() {
const sector = gun.extras.trayShell.sectors.sector; const sector = gun.extras.trayShell.sectors.sector;
gun.assault_ranges = { assault_ranges = {
ranges: sector.map((value) => ({ ranges: sector.map((value) => ({
factor: value.factor, factor: value.factor,
distance: value.distance, distance: value.distance,
@@ -1325,6 +1327,7 @@ export async function definitions() {
dispersion_traverse: shotDispersionFactors.turretRotation, dispersion_traverse: shotDispersionFactors.turretRotation,
unlocks: resolveUnlocks(gun.unlocks), unlocks: resolveUnlocks(gun.unlocks),
shell_capacity: gun.maxAmmo ?? gunListEntry.maxAmmo, shell_capacity: gun.maxAmmo ?? gunListEntry.maxAmmo,
assault_ranges,
} satisfies GunDefinitionBase; } satisfies GunDefinitionBase;
tankDefinitions.tanks[tankId].turrets[turretIndex].guns.push({ tankDefinitions.tanks[tankId].turrets[turretIndex].guns.push({
@@ -1408,7 +1411,7 @@ export async function definitions() {
tankDefinitions.tanks[tankId].turrets[turretIndex].guns[ tankDefinitions.tanks[tankId].turrets[turretIndex].guns[
gunIndex gunIndex
].gun_type!.value.base.shells.push({ ].gun_type!.value.base!.shells.push({
id: shellId, id: shellId,
name: shellName, name: shellName,
velocity: gunShellEntry.speed, velocity: gunShellEntry.speed,
@@ -1496,8 +1499,8 @@ export async function definitions() {
turret.research_cost = turretXps.get(turret.id); turret.research_cost = turretXps.get(turret.id);
Object.values(turret.guns).forEach((gunRaw) => { Object.values(turret.guns).forEach((gunRaw) => {
gunRaw.gun_type!.value.base.research_cost = gunXps.get( gunRaw.gun_type!.value.base!.research_cost = gunXps.get(
gunRaw.gun_type!.value.base.id, gunRaw.gun_type!.value.base!.id,
); );
}); });
}); });