Remove left click to equip items
This commit is contained in:
@@ -48,12 +48,12 @@ useLeftItem cid w
|
|||||||
|
|
||||||
useLeftItem' :: Int -> World -> World
|
useLeftItem' :: Int -> World -> World
|
||||||
useLeftItem' cid w = case cr ^? crInv . ix crinvsel . itUse of
|
useLeftItem' cid w = case cr ^? crInv . ix crinvsel . itUse of
|
||||||
Just EquipUse{} -> w
|
-- Just EquipUse{} -> w
|
||||||
& lSelHammerPosition .~ HammerDown
|
-- & lSelHammerPosition .~ HammerDown
|
||||||
& case _lSelHammerPosition w of
|
-- & case _lSelHammerPosition w of
|
||||||
HammerUp -> creatures . ix cid %~ toggleEquipmentAt crinvsel
|
-- HammerUp -> creatures . ix cid %~ toggleEquipmentAt crinvsel
|
||||||
_ -> id
|
-- _ -> id
|
||||||
Just LeftUse {_lUse = f} -> f cr crinvsel (w & creatures . ix cid . crLeftInvSel ?~ crinvsel)
|
-- Just LeftUse {_lUse = f} -> f cr crinvsel (w & creatures . ix cid . crLeftInvSel ?~ crinvsel)
|
||||||
_ -> case _crLeftInvSel cr of
|
_ -> case _crLeftInvSel cr of
|
||||||
Just invid -> case _itUse $ _crInv cr IM.! invid of
|
Just invid -> case _itUse $ _crInv cr IM.! invid of
|
||||||
LeftUse {_lUse = f} -> f cr invid w
|
LeftUse {_lUse = f} -> f cr invid w
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ boosterGun :: Item
|
|||||||
boosterGun = defaultGun
|
boosterGun = defaultGun
|
||||||
{ _itName = "BOOSTER"
|
{ _itName = "BOOSTER"
|
||||||
, _itType = BOOSTER
|
, _itType = BOOSTER
|
||||||
|
, _itInvColor = cyan
|
||||||
, _itConsumption = defaultAmmo
|
, _itConsumption = defaultAmmo
|
||||||
{ _ammoMax = 100
|
{ _ammoMax = 100
|
||||||
, _ammoLoaded = 100
|
, _ammoLoaded = 100
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ rewindGun :: Item
|
|||||||
rewindGun = defaultGun
|
rewindGun = defaultGun
|
||||||
{ _itName = "REWINDER"
|
{ _itName = "REWINDER"
|
||||||
, _itType = REWINDER
|
, _itType = REWINDER
|
||||||
|
, _itInvColor = cyan
|
||||||
, _itConsumption = ChargeableAmmo
|
, _itConsumption = ChargeableAmmo
|
||||||
{ _wpMaxCharge = 250
|
{ _wpMaxCharge = 250
|
||||||
, _wpCharge = 0
|
, _wpCharge = 0
|
||||||
@@ -86,6 +87,7 @@ blinkGun :: Item
|
|||||||
blinkGun = defaultGun
|
blinkGun = defaultGun
|
||||||
{ _itName = "BLINKER"
|
{ _itName = "BLINKER"
|
||||||
, _itType = BLINKER
|
, _itType = BLINKER
|
||||||
|
, _itInvColor = cyan
|
||||||
, _itConsumption = defaultAmmo
|
, _itConsumption = defaultAmmo
|
||||||
{ _ammoMax = 100
|
{ _ammoMax = 100
|
||||||
, _ammoLoaded = 100
|
, _ammoLoaded = 100
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ updatePressedButtons :: S.Set MouseButton -> World -> World
|
|||||||
updatePressedButtons pkeys w
|
updatePressedButtons pkeys w
|
||||||
| lbPressed && rbPressed = tryUseItem (you w) w
|
| lbPressed && rbPressed = tryUseItem (you w) w
|
||||||
| lbPressed = useLeftItem (_yourID w) w
|
| lbPressed = useLeftItem (_yourID w) w
|
||||||
| lbPressed = w
|
-- | lbPressed = w
|
||||||
| mbPressed = w & clickMousePos .~ _mousePos w
|
| mbPressed = w & clickMousePos .~ _mousePos w
|
||||||
& cameraRot -~ rotation
|
& cameraRot -~ rotation
|
||||||
| otherwise = w
|
| otherwise = w
|
||||||
|
|||||||
Reference in New Issue
Block a user