Make display colour for introscan white

This commit is contained in:
2025-01-01 15:28:19 +00:00
parent 08685909be
commit dda6cb2ad6
4 changed files with 17 additions and 14 deletions
+1
View File
@@ -43,6 +43,7 @@ data ItemStructuralFunction
| GadgetPlatformSF
| WeaponScopeSF
| WeaponTargetingSF
| IntroScanSF
| TriggerSF
| AugmentedHUDSF
| AmmoMagSF AmmoType
+1
View File
@@ -131,6 +131,7 @@ getAmmoLinks itm =
itemToFunction :: Item -> ItemStructuralFunction
itemToFunction itm = case itm ^. itType of
INTROSCAN {} -> IntroScanSF
HELD LASER -> WeaponTargetingSF
HELD{} -> case itm ^? itUseCondition of
Just UseableWhenAimed -> HeldPlatformSF
+1
View File
@@ -8,6 +8,7 @@ import Dodge.Data.ComposedItem
itemInvColor :: ComposedItem -> Color
itemInvColor ci = case ci ^. _2 of
IntroScanSF -> white
UnloadedWeaponSF -> mixColorsLinear 0.5 0.5 red white
HeldPlatformSF -> white
MakeAutoSF -> white
+6 -6
View File
@@ -1,9 +1,8 @@
module ShortShow
( shortShow
module ShortShow (
shortShow,
) where
import Geometry
--import Data.Typeable
import Geometry
import Numeric
class ShortShow a where
@@ -17,7 +16,7 @@ instance ShortShow Float where
instance ShortShow Int where
shortShow x
| x < k = show x
| x < k' = show x
| x < m = fdiv x k "K"
| x < g = fdiv x m "M"
| x < t = fdiv x g "G"
@@ -31,8 +30,9 @@ removeDot :: String -> String
removeDot [a, b, '.'] = [a, b]
removeDot xs = xs
k,m,g,t,p :: Int
k, k', m, g, t, p :: Int
k = 10 ^ (3 :: Int)
k' = 10 ^ (4 :: Int) -- this allows showing up to 9999 directly
m = 10 ^ (6 :: Int)
g = 10 ^ (9 :: Int)
t = 10 ^ (12 :: Int)