Separate out bullet effects, allow for tweaking to change these

This commit is contained in:
2021-11-30 13:11:34 +00:00
parent e75cbdf6cb
commit 4d21c0f31a
13 changed files with 207 additions and 81 deletions
+6 -6
View File
@@ -58,7 +58,7 @@ subInventoryDisplay cfig w = case _inventoryMode w of
col = itCol it
cursorsZ :: Configuration -> Int -> Item -> Picture
cursorsZ cfig ipos it = case it ^? itParams . tweakSel of
cursorsZ cfig ipos it = case it ^? itTweaks . tweakSel 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
@@ -75,12 +75,12 @@ topInvCursor col iPos cfig w
| otherwise = mainListCursor col iPos cfig
ammoTweakStrings :: Item -> [String]
ammoTweakStrings it = case it ^? itParams . tweakParams of
Just l -> map pjTweakString $ IM.elems l
ammoTweakStrings it = case it ^? itTweaks . tweakParams of
Just l -> map tweakString $ IM.elems l
_ -> ["NOT TWEAKABLE"]
mCurs :: Item -> Configuration -> World -> Picture
mCurs it cfig w = case it ^? itParams . tweakSel of
mCurs it cfig w = case it ^? itTweaks . tweakSel of
Nothing -> []
Just i
| ButtonRight `S.member` _mouseButtons w ->
@@ -93,8 +93,8 @@ mCurs it cfig w = case it ^? itParams . tweakSel of
x = 117.5
y = 155
pjTweakString :: TweakParam -> String
pjTweakString pj = _showTweak pj $ _curTweak pj
tweakString :: TweakParam -> String
tweakString tp = rightPad 12 ' ' (_nameTweak tp) ++ " " ++ _showTweak tp (_curTweak tp)
displayMidList :: Configuration -> [String] -> String -> Picture
displayMidList cfig strs s = invHead cfig s