This commit is contained in:
2024-09-21 19:06:43 +01:00
parent cb3288db45
commit 241f6fdf10
8 changed files with 17 additions and 33 deletions
+1 -10
View File
@@ -115,22 +115,13 @@ applySidePush maxSide cr w = w
(pushAmount, g) = randomR (- maxSide, maxSide) $ _randGen w
applyTorqueCME :: Item -> Creature -> World -> World
applyTorqueCME itm cr w
| cid == 0 = w
& wCam . camRot +~ rot
-- & rotateScope
& randGen .~ g
| otherwise = w
applyTorqueCME itm cr w = w
& cWorld . lWorld . creatures . ix cid . crDir +~ rot
& randGen .~ g
where
cid = _crID cr
(rot, g) = randomR (- torque, torque) $ _randGen w
torque = fromMaybe 0 $ itm ^? itUse . heldParams . torqueAfter
-- rotateScope = fromMaybe id $ do
-- i <- yourScopeInvID w
-- return $ cWorld . lWorld . creatures . ix cid . crInv . ix i . itUse . attachParams . scrollAttachParams . opticPos %~ rotateV rot
-- (Muzzle,Int,Int) = (muzzle, amountloaded, id of mag taken from)
loadMuzzle :: LabelDoubleTree ComposeLinkType Item