mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
feat: sort options
This commit is contained in:
1 parent
ded71bf4f9
commit
e7525006b5
5 files changed
+655
-76
No files matched your search
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user