Add IntMapHelper, locate wall cutting bug

This commit is contained in:
2021-05-22 15:14:21 +02:00
parent 26f0ca4ab5
commit 9c2bcbec10
35 changed files with 221 additions and 139 deletions
+2 -2
View File
@@ -19,6 +19,7 @@ import Dodge.Inventory
--import Dodge.LightSources
import Geometry
import Picture
import qualified IntMapHelp as IM
import Control.Lens
--import Control.Monad
@@ -26,7 +27,6 @@ import Control.Lens
import Data.Maybe
--import Data.List
import System.Random
import qualified Data.IntMap.Strict as IM
--import qualified Data.Map as M
startReloadingWeapon
@@ -107,7 +107,7 @@ copyItemToFloor cr i w = case _crInv cr IM.! i of
updateLocation w' = case it ^? itID of
Just (Just i') -> w' & itemPositions . ix i' .~ OnFloor flid
_ -> w'
flid = newKey $ _floorItems w
flid = IM.newKey $ _floorItems w
theflit = FlIt
{_flIt = it
,_flItPos = offset +.+ _crPos cr