Work on cleaning up item effects/attachments etc
This commit is contained in:
@@ -53,7 +53,7 @@ tryReload cr it w f
|
||||
| _crID cr == _yourID (_cWorld w) && itNeedsLoading it && _mouseButtons w M.!? SDL.ButtonLeft == Just False =
|
||||
crToggleReloading cr
|
||||
| otherwise =
|
||||
(runIdentity . pointerToItem (_itPos it) (return . (itUse . useHammer .~ HammerDown)))
|
||||
(runIdentity . pointerToItemLocation (_itLocation it) (return . (itUse . useHammer .~ HammerDown)))
|
||||
. f
|
||||
|
||||
itNeedsLoading :: Item -> Bool
|
||||
@@ -116,7 +116,7 @@ useLeftItem cid w
|
||||
itm <- cr ^? crInv . ix invid
|
||||
f <- cr ^? crInv . ix invid . itUse . lUse
|
||||
return
|
||||
. (runIdentity . pointerToItem (_itPos itm) (return . (itUse . useHammer .~ HammerDown)))
|
||||
. (runIdentity . pointerToItemLocation (_itLocation itm) (return . (itUse . useHammer .~ HammerDown)))
|
||||
. useL f itm cr
|
||||
$ w
|
||||
where
|
||||
|
||||
@@ -213,7 +213,7 @@ itemUpdate cr i
|
||||
| otherwise = baseupdate False
|
||||
where
|
||||
baseupdate bool = updateAutoRecharge . (itUse %~ useUpdate)
|
||||
. (itPos .~ InInv (_crID cr) i)
|
||||
. (itLocation .~ InInv (_crID cr) i)
|
||||
. (itIsHeld .~ bool)
|
||||
updateAutoRecharge :: Item -> Item
|
||||
updateAutoRecharge it = case it ^? itUse . leftConsumption of
|
||||
|
||||
Reference in New Issue
Block a user