Implement bullet trajectories using attachable items

This commit is contained in:
2024-09-29 21:51:14 +01:00
parent 88c3e02459
commit 4545caa7e6
26 changed files with 504 additions and 570 deletions
-14
View File
@@ -44,20 +44,6 @@ showInt i = case i of
12 -> "a dozen"
_ -> "more than a dozen"
showIntKMG :: Int -> String
showIntKMG x
| x < 1000 = show x
| x < 1000000 = show (x `div` 1000) ++ "K"
| x < 1000000000 = show (x `div` 1000000) ++ "M"
| otherwise = show (x `div` 1000000000) ++ "G"
showIntKMG' :: Int -> String
showIntKMG' x
| x < 1000 = show x
| x < 1000000 = take 3 (show ((fromIntegral x :: Float) / 1000)) ++ "K"
| x < 1000000000 = take 3 (show ((fromIntegral x :: Float) / 1000000)) ++ "M"
| otherwise = take 3 (show ((fromIntegral x :: Float) / 1000000000)) ++ "G"
heldInfo :: HeldItemType -> String
heldInfo hit = case hit of
BANGSTICK 1 -> "A firearm with a short barrel that requires reloading after each shot."