Cleanup warnings
This commit is contained in:
@@ -39,19 +39,19 @@ charFiringStrat
|
||||
charFiringStrat strats cid w = case w ^? creatures . ix cid . crInv
|
||||
. ix (_crInvSel $ _creatures w IM.! cid) . itAttachment . _Just . itCharMode of
|
||||
Just (c :<| _) -> fromJust (Prelude.lookup c strats) cid w
|
||||
Nothing -> w
|
||||
_ -> w
|
||||
|
||||
increaseFuse
|
||||
:: Int -- ^ Old fuse time
|
||||
-> Int -- ^ Inventory item reference (I believe)
|
||||
-> World
|
||||
-> World
|
||||
increaseFuse fuse itID w = w
|
||||
& creatures . ix 0 . crInv . ix itID . itScrollUp .~ decreaseFuse newTime
|
||||
& creatures . ix 0 . crInv . ix itID . itScrollDown .~ increaseFuse newTime
|
||||
& creatures . ix 0 . crInv . ix itID . itAttachment ?~ ItFuse newTime
|
||||
& creatures . ix 0 . crInv . ix itID . itZoom
|
||||
.~ (defaultItZoom {_itAimZoomMax = zm, _itAimZoomMin = zm})
|
||||
increaseFuse fuse itid w = w
|
||||
& creatures . ix 0 . crInv . ix itid %~
|
||||
( itScrollUp .~ decreaseFuse newTime )
|
||||
. (itScrollDown .~ increaseFuse newTime )
|
||||
. ( itAttachment ?~ ItFuse newTime )
|
||||
. ( itZoom .~ defaultItZoom{_itAimZoomMax = zm, _itAimZoomMin = zm} )
|
||||
where
|
||||
newTime = min (fuse + 5) 90
|
||||
zm = 50 / fromIntegral newTime
|
||||
@@ -60,12 +60,12 @@ decreaseFuse
|
||||
:: Int -- ^ Old fuse time
|
||||
-> Int -- ^ Inventory item reference (I believe)
|
||||
-> World -> World
|
||||
decreaseFuse fuse itID w = w
|
||||
& creatures . ix 0 . crInv . ix itID . itScrollUp .~ decreaseFuse newTime
|
||||
& creatures . ix 0 . crInv . ix itID . itScrollDown .~ increaseFuse newTime
|
||||
& creatures . ix 0 . crInv . ix itID . itAttachment ?~ ItFuse newTime
|
||||
& creatures . ix 0 . crInv . ix itID . itZoom
|
||||
.~ (defaultItZoom {_itAimZoomMax = zm, _itAimZoomMin = zm})
|
||||
decreaseFuse fuse itid w = w
|
||||
& creatures . ix 0 . crInv . ix itid %~
|
||||
( itScrollUp .~ decreaseFuse newTime )
|
||||
. ( itScrollDown .~ increaseFuse newTime )
|
||||
. ( itAttachment ?~ ItFuse newTime )
|
||||
. ( itZoom .~ defaultItZoom {_itAimZoomMax = zm, _itAimZoomMin = zm} )
|
||||
where
|
||||
newTime = max (fuse - 5) 20
|
||||
zm = 50 / fromIntegral newTime
|
||||
|
||||
Reference in New Issue
Block a user