Automatically handle alt kits of weapons with multishot

This commit is contained in:
Kalle 2023-12-03 15:03:46 +02:00
parent eeca85e988
commit 723ceaba0e

View File

@ -96,7 +96,7 @@ export const damageTypeToWeaponType: Record<
SPECIAL_TICK: "SPECIAL",
};
export const multiShot: Partial<Record<MainWeaponId, number>> = {
const rawMultiShot: Partial<Record<MainWeaponId, number>> = {
// L-3
300: 3,
// H-3
@ -111,6 +111,14 @@ export const multiShot: Partial<Record<MainWeaponId, number>> = {
3050: 2,
};
// automatically handle alt kits
export const multiShot = Object.fromEntries(
Object.entries(rawMultiShot).flatMap(([key, value]) => [
[Number(key), value],
[Number(key) + 1, value],
]),
) as Record<MainWeaponId, number>;
export const RAINMAKER_SPEED_PENALTY_MODIFIER = 0.8;
export const UNKNOWN_SHORT = "U";