Add in "linear" lWorld to separate time reversable worlds

This commit is contained in:
2022-10-28 12:24:51 +01:00
parent 5f6bd43599
commit 7e790b7153
130 changed files with 827 additions and 980 deletions
+3 -3
View File
@@ -20,13 +20,13 @@ copyItemToFloorID :: Point2 -> Item -> World -> (Int, World)
copyItemToFloorID pos it w =
(,) flid $
w'
& cWorld . floorItems %~ IM.insert flid theflit
& cWorld . lWorld . floorItems %~ IM.insert flid theflit
& updateLocation
where
(p', w') = findWallFreeDropPoint (_dimRad $ _itDimension it) pos w
rot = fst . randomR (- pi, pi) $ _randGen w
updateLocation = cWorld . itemLocations . ix (_itID it) .~ OnFloor flid
flid = IM.newKey $ _floorItems (_cWorld w)
updateLocation = cWorld . lWorld . itemLocations . ix (_itID it) .~ OnFloor flid
flid = IM.newKey $ _floorItems (_lWorld (_cWorld w))
theflit =
FlIt
{ _flIt = it & itUse . useAmount %~ const 1