Commit before only putting item locations in single itemLocations intmap
This commit is contained in:
@@ -23,14 +23,14 @@ copyItemToFloorID pos it w =
|
||||
(,) (NInt flid) $
|
||||
w'
|
||||
& cWorld . lWorld . floorItems . unNIntMap %~ IM.insert flid theflit
|
||||
& cWorld . lWorld . itemLocations . ix (_itID it) .~ OnFloor (NInt flid)
|
||||
& cWorld . lWorld . itemLocations %~ IM.insert (_itID it) (OnFloor $ NInt flid)
|
||||
where
|
||||
(p', w') = findWallFreeDropPoint (_dimRad $ _itDimension it) pos w
|
||||
rot = fst . randomR (- pi, pi) $ _randGen w
|
||||
flid = IM.newKey . _unNIntMap . _floorItems . _lWorld $ _cWorld w
|
||||
theflit =
|
||||
FlIt
|
||||
{ _flIt = it
|
||||
{ _flIt = it & itLocation .~ OnFloor (NInt flid)
|
||||
, _flItPos = p'
|
||||
, _flItRot = rot
|
||||
, _flItID = NInt flid
|
||||
|
||||
Reference in New Issue
Block a user