Make all items have an id an associated location
This commit is contained in:
@@ -25,9 +25,7 @@ copyItemToFloorID pos it w =
|
||||
where
|
||||
(p', w') = findWallFreeDropPoint (_dimRad $ _itDimension it) pos w
|
||||
rot = fst . randomR (- pi, pi) $ _randGen w
|
||||
updateLocation = case it ^? itID of
|
||||
Just (Just i') -> cWorld . itemLocations . ix i' .~ OnFloor flid
|
||||
_ -> id
|
||||
updateLocation = cWorld . itemLocations . ix (_itID it) .~ OnFloor flid
|
||||
flid = IM.newKey $ _floorItems (_cWorld w)
|
||||
theflit =
|
||||
FlIt
|
||||
|
||||
Reference in New Issue
Block a user