Cleanup, tweak selection sections positioning
This commit is contained in:
@@ -237,9 +237,10 @@ invSideEff :: Creature -> World -> World
|
||||
invSideEff cr w =
|
||||
updateTargeting (crGetTargeting cr) cr $
|
||||
weaponReloadSounds cr $
|
||||
IM.foldl' f w (_crInv cr)
|
||||
-- be careful with side effects that affect creature targeting
|
||||
IM.foldl' f w (_crInv cr)
|
||||
where
|
||||
-- be careful with side effects that affect creature targeting
|
||||
|
||||
f w' it =
|
||||
itemInvSideEffect cr it $
|
||||
--doItemTargeting i cr w' & maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
|
||||
@@ -258,10 +259,11 @@ createAttachLight cr it = createTorchLightOffset cr it attachoff
|
||||
attachoff = it ^?! itDimension . dimAttachPos
|
||||
|
||||
itemUpdate :: Creature -> Int -> Item -> Item
|
||||
itemUpdate cr i = updateAutoRecharge
|
||||
. (itUse %~ useUpdate)
|
||||
. (itLocation .~ InInv (_crID cr) i)
|
||||
. (itIsHeld .~ itmisheld)
|
||||
itemUpdate cr i =
|
||||
updateAutoRecharge
|
||||
. (itUse %~ useUpdate)
|
||||
. (itLocation .~ InInv (_crID cr) i)
|
||||
. (itIsHeld .~ itmisheld)
|
||||
where
|
||||
itmisheld = Just i == (cr ^? crManipulation . manObject . inInventory . ispItem)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user