Tweak twisting when aiming

This commit is contained in:
2021-12-05 16:54:08 +00:00
parent d9c5cfc26d
commit 22e3256da3
30 changed files with 350 additions and 252 deletions
+2 -2
View File
@@ -21,14 +21,14 @@ copyItemToFloorID pos it w = (,) flid $ w'
& floorItems %~ IM.insert flid theflit
& updateLocation
where
(p',w') = findWallFreeDropPoint (_itRad $ _itDimension it) pos w
(p',w') = findWallFreeDropPoint (_dimRad $ _itDimension it) pos w
rot = fst . randomR (-pi,pi) $ _randGen w
updateLocation = case it ^? itID of
Just (Just i') -> itemPositions . ix i' .~ OnFloor flid
_ -> id
flid = IM.newKey $ _floorItems w
theflit = FlIt
{_flIt = it & itConsumption . itAmount' %~ const 1
{_flIt = it & itConsumption . itAmount %~ const 1
,_flItPos = p'
,_flItRot = rot
,_flItID = flid