feat: sort options

This commit is contained in:
TrèsAbhi committed 2024-02-09 16:01:06 -06:00
1 parent ded71bf4f9
commit e7525006b5
5 files changed
+655 -76

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import { GunDefinition } from './tankDefinitions';
export function resolveReload(gun: GunDefinition) {
if (gun.type === 'regular') {
return gun.reload;
} else if (gun.type === 'autoLoader') {
return gun.reload + (gun.count - 1) * gun.interClip;
} else {
return (
gun.reload.reduce((a, b) => a + b, 0) + (gun.count - 1) * gun.interClip
);
}
}