Remove reduntant left click item use code
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
module Dodge.SelectUse (selectUse) where
|
||||
|
||||
import Control.Monad
|
||||
import qualified SDL
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Data.ComposedItem
|
||||
@@ -9,6 +11,8 @@ import Dodge.Payload
|
||||
|
||||
selectUse :: LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
|
||||
selectUse ittree _ w = fromMaybe w $ do
|
||||
lbtime <- w ^? input . mouseButtons . ix SDL.ButtonLeft
|
||||
guard $ lbtime == 0
|
||||
itid <- ittree ^? ldtValue . itID
|
||||
pjid <- ittree ^? ldtValue . itUse . uaParams . apLinkedProjectile . _Just
|
||||
thepj <- w ^? cWorld . lWorld . projectiles . ix pjid
|
||||
|
||||
Reference in New Issue
Block a user