Use NewIntMap InvInt for crInv
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Creature.Update (updateCreature) where
|
||||
|
||||
import NewInt
|
||||
import Color
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.List as List
|
||||
@@ -116,7 +117,7 @@ poisonSPic = _1 %~ overColSH (mixColors 0.5 0.5 green . normalizeColor)
|
||||
|
||||
-- reverse keys, otherwise two or more inv items will cause errors
|
||||
dropAll :: Creature -> World -> World
|
||||
dropAll cr w = foldl' (flip (dropItem cr)) w . reverse . IM.keys $ _crInv cr
|
||||
dropAll cr w = foldl' (flip (dropItem cr)) w . reverse . IM.keys . _unNIntMap $ _crInv cr
|
||||
|
||||
chasmTest :: Creature -> World -> World
|
||||
chasmTest cr w
|
||||
|
||||
Reference in New Issue
Block a user