Continue inventory tweak
This commit is contained in:
@@ -52,7 +52,7 @@ wasdWithAiming w speed cr
|
||||
& crDir +~ _crTwist cr'
|
||||
& crTwist .~ 0
|
||||
addAnyTwist = fromMaybe id $ do
|
||||
itRef <- cr ^? crManipulation . isel . ispItem
|
||||
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
astance <- cr ^? crInv . ix itRef . itUse . heldAim . aimStance
|
||||
let currenttwistamount = cr ^. crTwist
|
||||
case (astance,currenttwistamount) of
|
||||
@@ -73,7 +73,7 @@ wasdWithAiming w speed cr
|
||||
mouseDir = fromMaybe
|
||||
(argV (_mousePos (_input w)) + (w ^. cWorld . camPos . camRot) )
|
||||
$ do
|
||||
itRef <- cr ^? crManipulation . isel . ispItem
|
||||
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
_ <- cr ^? crInv . ix itRef . itScope . scopePos
|
||||
return . argV $ mouseWorldPos (w ^. input) (w ^. cWorld . camPos) -.- _crPos cr
|
||||
|
||||
@@ -81,7 +81,7 @@ aimTurn :: Float -> Creature -> Creature
|
||||
aimTurn a cr = creatureTurnTowardDir a (x * 0.2) cr
|
||||
where
|
||||
x = fromMaybe 1 $ do
|
||||
itRef <- cr ^? crManipulation . isel . ispItem
|
||||
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
cr ^? crInv . ix itRef . itUse . heldAim . aimTurnSpeed
|
||||
|
||||
wasdM :: SDL.Scancode -> Point2
|
||||
@@ -104,5 +104,5 @@ mouseActionsCr pkeys cr
|
||||
where
|
||||
rbPressed = SDL.ButtonRight `M.member` pkeys
|
||||
noaction = fromMaybe True $ do
|
||||
theaction <- cr ^? crManipulation . isel . iselAction
|
||||
theaction <- cr ^? crManipulation . manObject . inInventory . iselAction
|
||||
return $ theaction == NoInvSelAction
|
||||
|
||||
Reference in New Issue
Block a user