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