Commit before attempting to split ItemUse into prism + lenses
This commit is contained in:
@@ -26,7 +26,7 @@ yourControl cr w
|
||||
w
|
||||
& cWorld . lWorld . creatures . ix (_crID cr)
|
||||
%~ (wasdWithAiming w (_mvSpeed $ _crMvType cr) . mouseActionsCr (_mouseButtons (_input w)))
|
||||
& pressedMBEffectsNoInventory pkeys
|
||||
& pressedMBEffectsTopInventory pkeys
|
||||
where
|
||||
pkeys = w ^. input . mouseButtons
|
||||
intopinv = fromMaybe False $ do
|
||||
@@ -115,8 +115,8 @@ mouseActionsCr pkeys cr
|
||||
theaction <- cr ^? crManipulation . manObject . inInventory . iselAction
|
||||
return $ theaction == NoInvSelAction
|
||||
|
||||
pressedMBEffectsNoInventory :: M.Map SDL.MouseButton Bool -> World -> World
|
||||
pressedMBEffectsNoInventory pkeys w
|
||||
pressedMBEffectsTopInventory :: M.Map SDL.MouseButton Bool -> World -> World
|
||||
pressedMBEffectsTopInventory pkeys w
|
||||
| isDown SDL.ButtonLeft && isDown SDL.ButtonRight && inTopInv = useItem (you w) w
|
||||
| isDown SDL.ButtonLeft && inTopInv = useLeftItem 0 w
|
||||
| isDown SDL.ButtonMiddle =
|
||||
|
||||
Reference in New Issue
Block a user