Tweak mouseover display to (partially) work during filtering

This commit is contained in:
2024-11-03 20:52:00 +00:00
parent feec061aa6
commit adca54c1ef
10 changed files with 361 additions and 349 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ module Dodge.Update.Input.InGame (
updateUseInputInGame,
) where
import Dodge.SoundLogic
import Control.Applicative
import qualified Data.IntMap.Strict as IM
import Data.List (sort)
@@ -310,8 +311,6 @@ toggleTweakInv w = case w ^? hud . hudElement . subInventory of
where
thepointer = hud . hudElement . subInventory
-- mi = 0 <$ (yourSelectedItem w >>= (^? itTweaks . tweakParams . ix 0))
tryCombine ::
IM.IntMap (SelectionSection CombinableItem) ->
Maybe (Int, Int) ->
@@ -320,9 +319,11 @@ tryCombine ::
tryCombine sss msel w = fromMaybe w $ do
(i, j) <- msel
CombinableItem is it _ <- sss ^? ix i . ssItems . ix j . siPayload
p <- w ^? cWorld . lWorld . creatures . ix 0 . crPos
return $
snd (createItemYou it (foldr (destroyInvItem 0) w (sort is)))
& cWorld . lWorld . creatures . ix 0 . crHammerPosition .~ HammerDown
& soundStart InventorySound p wrench1S Nothing
maybeExitCombine :: Universe -> Universe
maybeExitCombine u