Fix bugs in item locations
This commit is contained in:
@@ -21,7 +21,7 @@ import Dodge.EnergyBall
|
||||
import Dodge.Euse
|
||||
import Dodge.Hammer
|
||||
import Dodge.ItEffect
|
||||
import Dodge.LightSource.Torch
|
||||
--import Dodge.LightSource.Torch
|
||||
import Dodge.Prop.Gib
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Targeting
|
||||
@@ -247,24 +247,23 @@ invSideEff cr w =
|
||||
w' & maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
|
||||
|
||||
itemInvSideEffect :: Creature -> Item -> World -> World
|
||||
itemInvSideEffect cr it
|
||||
itemInvSideEffect _ _
|
||||
--itemInvSideEffect cr it
|
||||
-- | hastorchattach = createAttachLight cr it
|
||||
| otherwise = id
|
||||
where
|
||||
-- hastorchattach = it ^? itType . iyModules . ix ModHeldAttach == Just ATTACHTORCH && _itIsRoot it
|
||||
|
||||
createAttachLight :: Creature -> Item -> World -> World
|
||||
createAttachLight cr it = createTorchLightOffset cr it attachoff
|
||||
where
|
||||
attachoff = it ^?! itDimension . dimAttachPos
|
||||
--createAttachLight :: Creature -> Item -> World -> World
|
||||
--createAttachLight cr it = createTorchLightOffset cr it attachoff
|
||||
-- where
|
||||
-- attachoff = it ^?! itDimension . dimAttachPos
|
||||
|
||||
itemUpdate :: Creature -> Int -> Item -> Item
|
||||
itemUpdate cr i =
|
||||
updateAutoRecharge
|
||||
. (itUse %~ useUpdate)
|
||||
. (itLocation .~ InInv (_crID cr) i itmisselected itmisroot)
|
||||
-- . (itIsRoot .~ itmisroot)
|
||||
-- . (itIsSelected .~ itmisselected)
|
||||
where
|
||||
itmisroot = Just i == (cr ^? crManipulation . manObject . inInventory . imRootItem)
|
||||
itmisselected = Just i == (cr ^? crManipulation . manObject . inInventory . imSelectedItem)
|
||||
|
||||
Reference in New Issue
Block a user