2026-08-31 20:13:31 -05:00
|
|
|
import {
|
|
|
|
|
CharacteristicType,
|
|
|
|
|
type Characteristic,
|
|
|
|
|
} from "../types/characteristics";
|
|
|
|
|
|
|
|
|
|
export const characteristics = {
|
|
|
|
|
gun_type: {
|
|
|
|
|
type: CharacteristicType.Enum,
|
|
|
|
|
compute({ gun }) {
|
|
|
|
|
return gun.gun_type!.$case;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
clip_size: {
|
|
|
|
|
type: CharacteristicType.Number,
|
|
|
|
|
|
|
|
|
|
should_render({ gun }) {
|
|
|
|
|
return gun.gun_type!.$case !== "regular";
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
compute({ gun }) {
|
|
|
|
|
if (gun.gun_type!.$case === "regular") return 1;
|
|
|
|
|
return gun.gun_type!.value.shell_count;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
damage: {
|
|
|
|
|
type: CharacteristicType.Number,
|
2026-10-01 20:11:12 -05:00
|
|
|
compute({ shell }) {
|
|
|
|
|
return shell.armor_damage;
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-08-31 20:13:31 -05:00
|
|
|
|
2026-10-01 20:11:12 -05:00
|
|
|
module_damage: {
|
|
|
|
|
type: CharacteristicType.Number,
|
|
|
|
|
compute({ shell }) {
|
|
|
|
|
return shell.module_damage;
|
2026-08-31 20:13:31 -05:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
} satisfies Record<string, Characteristic>;
|