mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
feat: more advanced armor highlighting
This commit is contained in:
1 parent
909474d4cb
commit
d469f990f6
10 files changed
+119
-199
No files matched your search
@@ -1,7 +0,0 @@
|
||||
import { ShellDefinition } from '../blitzkrieg/tankDefinitions';
|
||||
|
||||
export function canRicochet(
|
||||
type: ShellDefinition['type'],
|
||||
): type is 'ap' | 'ap_cr' {
|
||||
return type === 'ap' || type === 'ap_cr';
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ShellDefinition } from '../blitzkrieg/tankDefinitions';
|
||||
|
||||
export function isAffectedBySpaced(
|
||||
export function isExplosive(
|
||||
type: ShellDefinition['type'],
|
||||
): type is 'he' | 'hc' {
|
||||
return type === 'he' || type === 'hc';
|
||||
@@ -58,15 +58,7 @@ interface GunDefinitionAutoReloader {
|
||||
interClip: number;
|
||||
count: number;
|
||||
}
|
||||
export interface RicochetCapableShell {
|
||||
type: 'ap' | 'ap_cr';
|
||||
normalization: number;
|
||||
ricochet: number;
|
||||
}
|
||||
export interface RicochetIncapableShell {
|
||||
type: 'hc' | 'he';
|
||||
}
|
||||
export type ShellDefinition = {
|
||||
export interface ShellDefinition {
|
||||
id: number;
|
||||
name: string;
|
||||
speed: number;
|
||||
@@ -74,7 +66,10 @@ export type ShellDefinition = {
|
||||
caliber: number;
|
||||
icon: string;
|
||||
penetration: number | Vector2Tuple;
|
||||
} & (RicochetCapableShell | RicochetIncapableShell);
|
||||
type: ShellType;
|
||||
normalization?: number;
|
||||
ricochet?: number;
|
||||
}
|
||||
|
||||
export const tankDefinitions = fetch(asset('definitions/tanks.json'), {
|
||||
cache: 'no-cache',
|
||||
|
||||
Reference in new issue
Block a user