Separate out bullet effects, allow for tweaking to change these
This commit is contained in:
+6
-6
@@ -125,17 +125,17 @@ wheelEvent y w = case (_carteDisplay w, _inventoryMode w) of
|
||||
invKeyDown = ScancodeCapsLock `S.member` _keys w
|
||||
|
||||
moveTweakSel :: Int -> World -> World
|
||||
moveTweakSel i w = case yourItem w ^? itParams . tweakParams of
|
||||
moveTweakSel i w = case yourItem w ^? itTweaks . tweakParams of
|
||||
Just l -> w & creatures . ix (_yourID w) . crInv . ix (_crInvSel (you w))
|
||||
. itParams . tweakSel %~ (`mod` length l) . subtract i
|
||||
. itTweaks . tweakSel %~ (`mod` length l) . subtract i
|
||||
_ -> w
|
||||
changeTweakParam :: Int -> World -> World
|
||||
changeTweakParam i w = w
|
||||
& creatures . ix (_yourID w) . crInv . ix (_crInvSel (you w)) %~
|
||||
( (itParams . tweakParams . ix paramid . curTweak .~ x)
|
||||
( (itTweaks . tweakParams . ix paramid . curTweak .~ x)
|
||||
. _doTweak params x)
|
||||
where
|
||||
it = yourItem w
|
||||
params = _tweakParams (_itParams it) IM.! paramid
|
||||
tweaks = _itTweaks $ yourItem w
|
||||
params = _tweakParams tweaks IM.! paramid
|
||||
x = (_curTweak params + i) `mod` _maxTweak params
|
||||
paramid = _tweakSel $ _itParams $ yourItem w
|
||||
paramid = _tweakSel tweaks
|
||||
|
||||
Reference in New Issue
Block a user