mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
feat: camo and view range
This commit is contained in:
1 parent
c34edbd3ac
commit
9141f3d63f
3 files changed
+23
-5
No files matched your search
@@ -71,7 +71,11 @@ type VehicleDefinitionArmor = Record<
|
||||
number | { vehicleDamageFactor: 0; '#text': number }
|
||||
>;
|
||||
interface VehicleDefinitions {
|
||||
invisibility: { moving: number; still: number; firePenalty: number };
|
||||
invisibility: {
|
||||
moving: number;
|
||||
still: number;
|
||||
firePenalty: number;
|
||||
};
|
||||
consumableSlots: number;
|
||||
provisionSlots: number;
|
||||
optDevicePreset: string;
|
||||
@@ -107,6 +111,7 @@ interface VehicleDefinitions {
|
||||
};
|
||||
turrets0: {
|
||||
[key: string]: {
|
||||
circularVisionRadius: number;
|
||||
maxHealth: number;
|
||||
armor: VehicleDefinitionArmor;
|
||||
userString: number;
|
||||
@@ -125,6 +130,7 @@ interface VehicleDefinitions {
|
||||
'#text': number;
|
||||
};
|
||||
};
|
||||
invisibilityFactorAtShot: number | number[];
|
||||
reloadTime: number;
|
||||
maxAmmo: number;
|
||||
extraPitchLimits?: {
|
||||
@@ -393,7 +399,7 @@ export async function definitions(production: boolean) {
|
||||
camouflage: {
|
||||
still: tankDefinition.root.invisibility.still,
|
||||
moving: tankDefinition.root.invisibility.moving,
|
||||
firing: tankDefinition.root.invisibility.firePenalty,
|
||||
onFire: tankDefinition.root.invisibility.firePenalty,
|
||||
},
|
||||
turrets: [],
|
||||
engines: [],
|
||||
@@ -489,6 +495,7 @@ export async function definitions(production: boolean) {
|
||||
tier: turret.level as Tier,
|
||||
guns: [],
|
||||
health: turret.maxHealth,
|
||||
view_range: turret.circularVisionRadius,
|
||||
});
|
||||
|
||||
modelDefinitions[tankId].turrets[turretId] = {
|
||||
@@ -576,6 +583,10 @@ export async function definitions(production: boolean) {
|
||||
reload: gunReload,
|
||||
count: gunClipCount,
|
||||
interClip: gunInterClip,
|
||||
camouflageLoss:
|
||||
typeof turretGunEntry.invisibilityFactorAtShot === 'number'
|
||||
? turretGunEntry.invisibilityFactorAtShot
|
||||
: turretGunEntry.invisibilityFactorAtShot.at(-1)!,
|
||||
} as GunDefinition);
|
||||
|
||||
modelDefinitions[tankId].turrets[turretId].guns[gunId] = {
|
||||
@@ -842,6 +853,7 @@ export async function definitions(production: boolean) {
|
||||
});
|
||||
});
|
||||
|
||||
return;
|
||||
await commitAssets(
|
||||
'definitions',
|
||||
[
|
||||
|
||||
@@ -65,10 +65,10 @@ export function Characteristics() {
|
||||
<Info indent name="Moving" unit="%">
|
||||
TODO
|
||||
</Info>
|
||||
<Info indent name="Shooting" unit="%">
|
||||
<Info indent name="Shooting still" unit="%">
|
||||
TODO
|
||||
</Info>
|
||||
<Info indent name="Shooting and moving" unit="%">
|
||||
<Info indent name="Shooting on move" unit="%">
|
||||
TODO
|
||||
</Info>
|
||||
<Info indent name="On fire" unit="%">
|
||||
|
||||
@@ -28,7 +28,11 @@ export interface TankDefinition {
|
||||
turrets: TurretDefinition[];
|
||||
engines: EngineDefinition[];
|
||||
price: TankDefinitionPrice;
|
||||
camouflage: { still: number; moving: number; firing: number };
|
||||
camouflage: {
|
||||
still: number;
|
||||
moving: number;
|
||||
onFire: number;
|
||||
};
|
||||
equipment: string;
|
||||
}
|
||||
export interface EngineDefinition {
|
||||
@@ -42,6 +46,7 @@ export type TankDefinitionPrice =
|
||||
| { type: 'gold'; value: number };
|
||||
export interface TurretDefinition {
|
||||
health: number;
|
||||
view_range: number;
|
||||
id: number;
|
||||
name: string;
|
||||
tier: Tier;
|
||||
@@ -54,6 +59,7 @@ interface GunDefinitionBase {
|
||||
name: string;
|
||||
tier: Tier;
|
||||
shells: ShellDefinition[];
|
||||
camouflageLoss: number;
|
||||
}
|
||||
interface GunDefinitionRegular {
|
||||
type: 'regular';
|
||||
|
||||
Reference in new issue
Block a user