Rename ItemAttachments
This commit is contained in:
@@ -26,7 +26,7 @@ scrollCharMode x _
|
||||
incCharMode
|
||||
:: Item
|
||||
-> Item
|
||||
incCharMode = itAttachment . itCharMode %~ cycleL
|
||||
incCharMode = itAttachment . atCharMode %~ cycleL
|
||||
where
|
||||
cycleL (x :<| xs) = xs |> x
|
||||
cycleL xs = xs
|
||||
@@ -34,7 +34,7 @@ incCharMode = itAttachment . itCharMode %~ cycleL
|
||||
decCharMode
|
||||
:: Item
|
||||
-> Item
|
||||
decCharMode = itAttachment . itCharMode %~ cycleR
|
||||
decCharMode = itAttachment . atCharMode %~ cycleR
|
||||
where
|
||||
cycleR (xs :|> x) = x <| xs
|
||||
cycleR xs = xs
|
||||
@@ -43,7 +43,7 @@ charFiringStratI
|
||||
:: [(Char, ChainEffect)] -- ^ Different firing effects for different characters
|
||||
-> ChainEffect
|
||||
charFiringStratI strats eff item cr w = case w ^? creatures . ix cid . crInv
|
||||
. ix (_crInvSel $ _creatures w IM.! cid) . itAttachment . itCharMode of
|
||||
. ix (_crInvSel $ _creatures w IM.! cid) . itAttachment . atCharMode of
|
||||
Just (c :<| _) -> fromMaybe id (Prelude.lookup c strats) eff item cr w
|
||||
_ -> w
|
||||
where
|
||||
@@ -55,10 +55,10 @@ changeFuse
|
||||
-> Item
|
||||
-> Item
|
||||
changeFuse scrollAmount _ it = it
|
||||
& ( itAttachment .~ ItFuse newTime )
|
||||
& ( itAttachment .~ AttachFuse newTime )
|
||||
& ( itUse . useAim . aimZoom .~ defaultItZoom{_itZoomMax = zm, _itZoomMin = zm} )
|
||||
where
|
||||
oldTime = _itFuseTime $ _itAttachment it
|
||||
oldTime = _atFuseTime $ _itAttachment it
|
||||
newTime = min 90 $ max 20 $ oldTime - round (5 * scrollAmount)
|
||||
zm = 50 / fromIntegral newTime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user