Fold some ammo data into its own type
This commit is contained in:
@@ -57,7 +57,7 @@ subInventoryDisplay w = case _inventoryMode w of
|
||||
col = itCol it
|
||||
|
||||
cursorsZ :: World -> Int -> Item -> Picture
|
||||
cursorsZ w ipos it = case it ^? wpAmmo . amParamSel of
|
||||
cursorsZ w ipos it = case it ^? wpAmmo . aoType . amParamSel of
|
||||
Nothing -> f $ zConnect sp (V2 (155- hw) ( hh - 77.5))
|
||||
Just jpos -> f $ zConnect sp (V2 (155 - hw) ( hh - (20 * fromIntegral jpos + 77.5)))
|
||||
where
|
||||
@@ -74,12 +74,12 @@ topInvCursor col iPos w
|
||||
| otherwise = mainListCursor col iPos w
|
||||
|
||||
ammoTweakStrings :: Item -> [String]
|
||||
ammoTweakStrings it = case it ^? wpAmmo . amPjParams of
|
||||
ammoTweakStrings it = case it ^? wpAmmo . aoType . amPjParams of
|
||||
Just l -> map pjTweakString l
|
||||
_ -> ["NOT TWEAKABLE"]
|
||||
|
||||
mCurs :: Item -> World -> Picture
|
||||
mCurs it w = case it ^? wpAmmo . amParamSel of
|
||||
mCurs it w = case it ^? wpAmmo . aoType . amParamSel of
|
||||
Nothing -> []
|
||||
Just i
|
||||
| ButtonRight `S.member` _mouseButtons w ->
|
||||
|
||||
Reference in New Issue
Block a user