Use NewIntMap InvInt for crInv

This commit is contained in:
2025-08-25 10:21:59 +01:00
parent 25e64d5378
commit 3f6f1b4019
38 changed files with 437 additions and 406 deletions
+2 -1
View File
@@ -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