Move background item effects out of records
This commit is contained in:
@@ -13,6 +13,7 @@ module Dodge.Creature.Action (
|
||||
youDropItem,
|
||||
) where
|
||||
|
||||
import Dodge.Item.BackgroundEffect
|
||||
import Control.Applicative
|
||||
import Control.Monad
|
||||
import Data.Bifunctor
|
||||
@@ -178,9 +179,10 @@ dropItem cr invid =
|
||||
. copyItemToFloor (_crPos cr) itm -- . mayberemoveequip
|
||||
. soundStart (CrSound (_crID cr)) (_crPos cr) whiteNoiseFadeOutS Nothing
|
||||
where
|
||||
doanyitemdropeffect = fromMaybe id $ do
|
||||
rmf <- itm ^? itEffect . ieOnDrop
|
||||
return $ doInvEffect rmf itm cr
|
||||
--doanyitemdropeffect = fromMaybe id $ do
|
||||
-- rmf <- itm ^? itEffect . ieOnDrop
|
||||
-- return $ doInvEffect rmf itm cr
|
||||
doanyitemdropeffect = itEffectOnDrop itm cr
|
||||
itm = fromMaybe (error "dropItem cannot find item") $ cr ^? crInv . ix invid
|
||||
maybeshiftseldown w = fromMaybe w $ do
|
||||
3 <- w ^? hud . hudElement . diSelection . _Just . _1
|
||||
|
||||
Reference in New Issue
Block a user