Move background item effects out of records
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Creature.State (
|
||||
doDamage,
|
||||
) where
|
||||
|
||||
import Dodge.Item.BackgroundEffect
|
||||
import Dodge.Item.MaxAmmo
|
||||
import Control.Applicative
|
||||
import Dodge.HeldUse
|
||||
@@ -166,7 +167,8 @@ applyPastDamages cr w
|
||||
invSideEff :: Creature -> World -> World
|
||||
invSideEff cr = alaf Endo foldMap f (_crInv cr) . updateHeldRootItem cr
|
||||
where
|
||||
f it = maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
|
||||
--f it = maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
|
||||
f it = itBackgroundEffect it cr
|
||||
|
||||
-- a loop going over all root inventory items
|
||||
invRootItemEffs :: Creature -> World -> World
|
||||
@@ -358,7 +360,6 @@ shineTorch cr itmtree (p, q) = fromMaybe id $ do
|
||||
guard $ i >= x
|
||||
invid <- mag ^? ldtValue . _1 . itLocation . ilInvID
|
||||
return $
|
||||
--(cWorld . lWorld . tempLightSources .:~ tlsTimeRadColPos 1 250 0.7 pos'')
|
||||
(cWorld . lWorld . lights .:~ LSParam pos'' 250 0.7)
|
||||
. (cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid . itConsumables . _Just -~ x)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user