Move item inv size and item dimensions from records to external function

This commit is contained in:
2024-11-26 23:36:08 +00:00
parent 9534698a24
commit b21513c4dd
22 changed files with 187 additions and 176 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ module Dodge.FloorItem (
copyItemToFloorID,
) where
import Dodge.Item.InvSize
import NewInt
import Control.Lens
import Data.Maybe
@@ -28,7 +29,7 @@ copyItemToFloorID pos it w =
-- & hud . hudElement . diSections . ix 3 . ssOffset .~ 0
-- ensures dropped item is at the top of the close item selection list
where
(p', w') = findWallFreeDropPoint (_dimRad $ _itDimension it) pos w
(p', w') = findWallFreeDropPoint (_dimRad $ itDim it) pos w
rot = fst . randomR (- pi, pi) $ _randGen w
flid = IM.newKey . _unNIntMap . _floorItems . _lWorld $ _cWorld w
theflit =