Refactor triplet to Selection datatype

This commit is contained in:
2025-08-26 18:13:27 +01:00
parent 9034c409e1
commit b87c3380b8
16 changed files with 127 additions and 135 deletions
+2 -2
View File
@@ -188,8 +188,8 @@ dropItem cr invid w' =
itid <- cr ^? crInv . ix (NInt invid) itid <- cr ^? crInv . ix (NInt invid)
w' ^? cWorld . lWorld . items . ix itid w' ^? cWorld . lWorld . items . ix itid
maybeshiftseldown w = fromMaybe w $ do maybeshiftseldown w = fromMaybe w $ do
3 <- w ^? hud . diSelection . _Just . _1 3 <- w ^? hud . diSelection . _Just . slSec
return $ w & hud . diSelection . _Just . _2 +~ 1 return $ w & hud . diSelection . _Just . slInt +~ 1
-- | Get your creature to drop the item under the cursor. -- | Get your creature to drop the item under the cursor.
youDropItem :: World -> World youDropItem :: World -> World
+4 -6
View File
@@ -6,7 +6,6 @@
module Dodge.Data.HUD where module Dodge.Data.HUD where
import Control.Lens import Control.Lens
import Data.IntSet (IntSet)
import qualified Data.IntSet as IS import qualified Data.IntSet as IS
import Dodge.Data.Combine import Dodge.Data.Combine
import Dodge.Data.Item.Location import Dodge.Data.Item.Location
@@ -24,7 +23,7 @@ data SubInventory
} }
| CombineInventory | CombineInventory
{ _ciSections :: IMSS CombinableItem { _ciSections :: IMSS CombinableItem
, _ciSelection :: Maybe (Int, Int, IS.IntSet) , _ciSelection :: Maybe Selection
, _ciFilter :: Maybe String , _ciFilter :: Maybe String
} }
| DisplayTerminal {_termID :: Int} | DisplayTerminal {_termID :: Int}
@@ -32,7 +31,7 @@ data SubInventory
data HUD = HUD data HUD = HUD
{ _subInventory :: SubInventory { _subInventory :: SubInventory
, _diSections :: IMSS () , _diSections :: IMSS ()
, _diSelection :: Maybe (Int, Int, IntSet) , _diSelection :: Maybe Selection
, _diInvFilter :: Maybe String , _diInvFilter :: Maybe String
, _diCloseFilter :: Maybe String , _diCloseFilter :: Maybe String
, _carteCenter :: Point2 , _carteCenter :: Point2
@@ -42,9 +41,8 @@ data HUD = HUD
, _closeButtons :: [Int] , _closeButtons :: [Int]
} }
data Selection data Selection = Sel {_slSec :: Int, _slInt :: Int, _slSet :: IS.IntSet}
= Sel {_slSec :: Int, _slInt :: Int, _slSet :: IS.IntSet}
| NoSel
makeLenses ''HUD makeLenses ''HUD
makeLenses ''Selection
makeLenses ''SubInventory makeLenses ''SubInventory
+1 -1
View File
@@ -161,7 +161,7 @@ defaultHUD =
HUD HUD
{ _subInventory = NoSubInventory { _subInventory = NoSubInventory
, _diSections = mempty , _diSections = mempty
, _diSelection = Just (1, 0, mempty) , _diSelection = Just (Sel 1 0 mempty)
, _diInvFilter = mempty , _diInvFilter = mempty
, _diCloseFilter = mempty , _diCloseFilter = mempty
, _carteCenter = V2 0 0 , _carteCenter = V2 0 0
+11 -11
View File
@@ -9,6 +9,7 @@ module Dodge.DisplayInventory (
toggleCombineInv, toggleCombineInv,
) where ) where
import Dodge.Data.HUD
import Dodge.Inventory.CheckSlots import Dodge.Inventory.CheckSlots
import NewInt import NewInt
import Control.Applicative import Control.Applicative
@@ -16,7 +17,6 @@ import Control.Lens
import Control.Monad import Control.Monad
import Data.IntMap.Merge.Strict import Data.IntMap.Merge.Strict
import qualified Data.IntMap.Strict as IM import qualified Data.IntMap.Strict as IM
import Data.IntSet (IntSet)
import Data.Maybe import Data.Maybe
import Data.Monoid import Data.Monoid
import Dodge.Base.You import Dodge.Base.You
@@ -55,7 +55,7 @@ updateCombineSections w cfig =
(getAvailableListLines secondColumnParams cfig) (getAvailableListLines secondColumnParams cfig)
(IM.fromDistinctAscList [(-1, sfclose),(0, sclose')]) (IM.fromDistinctAscList [(-1, sfclose),(0, sclose')])
where where
filtcurs = w ^? hud . subInventory . ciSelection . _Just . _1 == Just (-1) filtcurs = w ^? hud . subInventory . ciSelection . _Just . slSec == Just (-1)
(sfclose, sclose) = (sfclose, sclose) =
filterSectionsPair filterSectionsPair
filtcurs filtcurs
@@ -97,14 +97,14 @@ checkInventorySelectionExists w
| isJust $ w ^? hud . diSections . ix i . ssItems . ix j = w | isJust $ w ^? hud . diSections . ix i . ssItems . ix j = w
| otherwise = scrollAugNextInSection w | otherwise = scrollAugNextInSection w
where where
(i, j, _) = fromMaybe (1, -1, mempty) $ w ^? hud . diSelection . _Just Sel i j _ = fromMaybe (Sel 1 (-1) mempty) $ w ^? hud . diSelection . _Just
checkCombineSelectionExists :: SubInventory -> SubInventory checkCombineSelectionExists :: SubInventory -> SubInventory
checkCombineSelectionExists si checkCombineSelectionExists si
| Just sss <- si ^? ciSections | Just sss <- si ^? ciSections
, Just (i, j, _) <- si ^? ciSelection . _Just <|> Just (0, 0, mempty) , Sel i j _ <- fromMaybe (Sel 0 0 mempty) $ si ^? ciSelection . _Just
, isNothing $ si ^? ciSections . ix i . ssItems . ix j = , isNothing $ si ^? ciSections . ix i . ssItems . ix j =
si & ciSelection ?~ (0, -1, mempty) si & ciSelection ?~ Sel 0 (-1) mempty
& ciSelection & ciSelection
%~ scrollSelectionSections (-1) sss %~ scrollSelectionSections (-1) sss
| otherwise = si | otherwise = si
@@ -136,11 +136,11 @@ updateDisplaySections w cfig =
) )
where where
mselpos = w ^? hud . diSelection . _Just mselpos = w ^? hud . diSelection . _Just
invfiltcurs = mselpos ^? _Just . _1 == Just (-1) invfiltcurs = mselpos ^? _Just . slSec == Just (-1)
(sfinv, sinv) = (sfinv, sinv) =
filterSectionsPair invfiltcurs plainRegex invitems "INVENTORY" $ filterSectionsPair invfiltcurs plainRegex invitems "INVENTORY" $
w ^? hud . diInvFilter . _Just w ^? hud . diInvFilter . _Just
closefiltcurs = mselpos ^? _Just . _1 == Just 2 closefiltcurs = mselpos ^? _Just . slSec == Just 2
(sfclose, sclose) = (sfclose, sclose) =
filterSectionsPair closefiltcurs plainRegex closeitms "NEARBY ITEMS" $ filterSectionsPair closefiltcurs plainRegex closeitms "NEARBY ITEMS" $
w ^? hud . diCloseFilter . _Just w ^? hud . diCloseFilter . _Just
@@ -241,7 +241,7 @@ doSectionSize extraavailable mintaken is sss done = fromMaybe done $ do
updateSectionsPositioning :: updateSectionsPositioning ::
(Int -> Int) -> -- for determining each sections indent (Int -> Int) -> -- for determining each sections indent
Maybe (Int, Int, IntSet) -> Maybe Selection ->
Int -> Int ->
IM.IntMap (IM.IntMap (SelectionItem a)) -> IM.IntMap (IM.IntMap (SelectionItem a)) ->
IM.IntMap (SelectionSection a) -> IM.IntMap (SelectionSection a) ->
@@ -251,13 +251,13 @@ updateSectionsPositioning h mselpos allavailablelines lsss sss =
where where
offsets = fmap _ssOffset sss offsets = fmap _ssOffset sss
m k = do m k = do
(k', i, _) <- mselpos Sel k' i _ <- mselpos
guard $ k == k' guard $ k == k'
return i return i
ls = lsss ls = lsss
-- defaults non-existing offsets to 0 -- defaults non-existing offsets to 0
g = merge (mapMissing (const ($ 0))) dropMissing (zipWithMatched (const ($))) g = merge (mapMissing (const ($ 0))) dropMissing (zipWithMatched (const ($)))
lk = mselpos ^.. _Just . _1 lk = mselpos ^.. _Just . slSec
ssizes = sectionsSizes allavailablelines lk $ sectionsDesiredLines ls ssizes = sectionsSizes allavailablelines lk $ sectionsDesiredLines ls
updateSection :: updateSection ::
@@ -324,7 +324,7 @@ enterCombineInv cfig w =
w & hud . subInventory w & hud . subInventory
.~ CombineInventory .~ CombineInventory
{ _ciSections = updateCombineSections w cfig mempty { _ciSections = updateCombineSections w cfig mempty
, _ciSelection = Just (0,0,mempty) , _ciSelection = Just (Sel 0 0 mempty)
, _ciFilter = Nothing , _ciFilter = Nothing
} }
& hud . diInvFilter .~ Nothing & hud . diInvFilter .~ Nothing
+2 -2
View File
@@ -16,11 +16,11 @@ textInputFocus ::
World -> World ->
Maybe ((String -> f String) -> World -> f World) Maybe ((String -> f String) -> World -> f World)
textInputFocus w = case w ^? hud . subInventory of textInputFocus w = case w ^? hud . subInventory of
Just NoSubInventory{} -> case he ^? diSelection . _Just . _1 of Just NoSubInventory{} -> case he ^? diSelection . _Just . slSec of
Just (-1) -> Just $ hud . diInvFilter . _Just Just (-1) -> Just $ hud . diInvFilter . _Just
Just 2 -> Just $ hud . diCloseFilter . _Just Just 2 -> Just $ hud . diCloseFilter . _Just
_ -> Nothing _ -> Nothing
Just CombineInventory{} -> case he ^? subInventory . ciSelection . _Just . _1 of Just CombineInventory{} -> case he ^? subInventory . ciSelection . _Just . slSec of
Just (-1) -> Just $ hud . subInventory . ciFilter . _Just Just (-1) -> Just $ hud . subInventory . ciFilter . _Just
_ -> Nothing _ -> Nothing
Just DisplayTerminal{_termID = tmid} -> do Just DisplayTerminal{_termID = tmid} -> do
+6 -7
View File
@@ -17,7 +17,6 @@ module Dodge.Inventory (
) where ) where
import Data.Function import Data.Function
import qualified Data.IntSet as IS
import Data.Maybe import Data.Maybe
import Dodge.Base import Dodge.Base
import Dodge.Data.SelectionList import Dodge.Data.SelectionList
@@ -87,7 +86,7 @@ rmInvItem cid invid w =
where where
pointcid = cWorld . lWorld . creatures . ix cid pointcid = cWorld . lWorld . creatures . ix cid
updateselectionextra updateselectionextra
| cid == 0 = hud . diSelection . _Just . _3 %~ const mempty | cid == 0 = hud . diSelection . _Just . slSet %~ const mempty
| otherwise = id | otherwise = id
updateselection updateselection
| cid == 0 && cr ^? crManipulation . manObject . imSelectedItem == Just invid = | cid == 0 && cr ^? crManipulation . manObject . imSelectedItem == Just invid =
@@ -166,7 +165,7 @@ changeSwapOther manlens n f i w = fromMaybe w $ do
& cWorld . lWorld . creatures . ix 0 . crManipulation . manObject . manlens & cWorld . lWorld . creatures . ix 0 . crManipulation . manObject . manlens
%~ doswap %~ doswap
& hud . closeItems %~ swapIndices i k & hud . closeItems %~ swapIndices i k
& hud . diSelection . _Just . _2 %~ doswap & hud . diSelection . _Just . slInt %~ doswap
& worldEventFlags . at InventoryChange ?~ () & worldEventFlags . at InventoryChange ?~ ()
swapItemWith :: swapItemWith ::
@@ -182,7 +181,7 @@ swapItemWith f (j, i) = case j of
changeSwapWith :: (Int -> IM.IntMap (SelectionItem ()) -> Maybe Int) -> World -> World changeSwapWith :: (Int -> IM.IntMap (SelectionItem ()) -> Maybe Int) -> World -> World
changeSwapWith f w changeSwapWith f w
| Just (j,i,_) <- w ^. hud . diSelection = swapItemWith f (j,i) w | Just (Sel j i _) <- w ^. hud . diSelection = swapItemWith f (j,i) w
| otherwise = w | otherwise = w
--changeSwapWith :: (Int -> IM.IntMap (SelectionItem ()) -> Maybe Int) -> World -> World --changeSwapWith :: (Int -> IM.IntMap (SelectionItem ()) -> Maybe Int) -> World -> World
@@ -192,7 +191,7 @@ changeSwapWith f w
-- Just (5, i, _) -> w & changeSwapOther ispCloseButton 5 f i -- Just (5, i, _) -> w & changeSwapOther ispCloseButton 5 f i
-- _ -> w -- _ -> w
invSetSelection :: (Int, Int, IS.IntSet) -> World -> World invSetSelection :: Selection -> World -> World
invSetSelection sel w = invSetSelection sel w =
w w
& hud . diSelection ?~ sel & hud . diSelection ?~ sel
@@ -208,8 +207,8 @@ invSetSelectionPos i j w =
& setInvPosFromSS & setInvPosFromSS
& cWorld . lWorld %~ crUpdateItemLocations 0 & cWorld . lWorld %~ crUpdateItemLocations 0
where where
f Nothing = Just (i, j, mempty) f Nothing = Just (Sel i j mempty)
f (Just (_, _, s)) = Just (i, j, s) f (Just (Sel _ _ s)) = Just (Sel i j s)
scrollAugInvSel :: Int -> World -> World scrollAugInvSel :: Int -> World -> World
scrollAugInvSel yi w scrollAugInvSel yi w
+1 -1
View File
@@ -43,7 +43,7 @@ tryPutItemInInv cid itid w = do
& updateselectionextra invid & updateselectionextra invid
where where
updateselectionextra i updateselectionextra i
| cid == 0 = hud . diSelection . _Just . _3 %~ IS.map (f i) | cid == 0 = hud . diSelection . _Just . slSet %~ IS.map (f i)
| otherwise = id | otherwise = id
f j i | i >= _unNInt j = i + 1 f j i | i >= _unNInt j = i + 1
| otherwise = i | otherwise = i
+1 -1
View File
@@ -97,7 +97,7 @@ setInvPosFromSS w = w
& cWorld . lWorld . creatures . ix 0 . crManipulation . manObject .~ thesel & cWorld . lWorld . creatures . ix 0 . crManipulation . manObject .~ thesel
where where
thesel = fromMaybe SelNothing $ do thesel = fromMaybe SelNothing $ do
(i, j, _) <- w ^? hud . diSelection . _Just Sel i j _ <- w ^? hud . diSelection . _Just
case i of case i of
(-1) -> Just SortInventory (-1) -> Just SortInventory
0 -> do 0 -> do
+4 -4
View File
@@ -27,8 +27,8 @@ swapInvItems f i w = fromMaybe w $ do
ss <- w ^? hud . diSections . ix 0 . ssItems ss <- w ^? hud . diSections . ix 0 . ssItems
k <- f i ss k <- f i ss
let updateselection = case w ^? hud . diSelection . _Just of let updateselection = case w ^? hud . diSelection . _Just of
Just (0, j,_) | j == k -> hud . diSelection . _Just . _2 .~ i Just (Sel 0 j _) | j == k -> hud . diSelection . _Just . slInt .~ i
Just (0, j,_) | j == i -> hud . diSelection . _Just . _2 .~ k Just (Sel 0 j _) | j == i -> hud . diSelection . _Just . slInt .~ k
_ -> id _ -> id
return $ return $
w w
@@ -55,11 +55,11 @@ swapInvItems f i w = fromMaybe w $ do
swapAnyExtraSelection :: Int -> Int -> World -> World swapAnyExtraSelection :: Int -> Int -> World -> World
swapAnyExtraSelection i k w = fromMaybe w $ do swapAnyExtraSelection i k w = fromMaybe w $ do
is <- w ^? hud . diSelection . _Just . _3 is <- w ^? hud . diSelection . _Just . slSet
let f = if i `IS.member` is then IS.insert k else id let f = if i `IS.member` is then IS.insert k else id
g = if k `IS.member` is then IS.insert i else id g = if k `IS.member` is then IS.insert i else id
return $ return $
w & hud . diSelection . _Just . _3 w & hud . diSelection . _Just . slSet
%~ (f . g . IS.delete i . IS.delete k) %~ (f . g . IS.delete i . IS.delete k)
checkConnection :: SoundOrigin -> SoundID -> Int -> Int -> World -> World checkConnection :: SoundOrigin -> SoundID -> Int -> Int -> World -> World
+5 -5
View File
@@ -60,7 +60,7 @@ drawInventory sss w cfig =
<> itemconnections <> itemconnections
<> drawMouseOver cfig w <> drawMouseOver cfig w
where where
f = fmap (\(x, y, _) -> (x, y)) f = fmap (\(Sel x y _) -> (x, y))
curs = invCursorParams w curs = invCursorParams w
itemconnections = fromMaybe mempty $ do itemconnections = fromMaybe mempty $ do
inv' <- w ^? cWorld . lWorld . creatures . ix 0 . crInv inv' <- w ^? cWorld . lWorld . creatures . ix 0 . crInv
@@ -131,14 +131,14 @@ drawMouseOver cfig w =
drawDragSelected :: Configuration -> World -> Maybe Picture drawDragSelected :: Configuration -> World -> Maybe Picture
drawDragSelected cfig w = do drawDragSelected cfig w = do
ys <- w ^? hud . diSelection . _Just . _3 ys <- w ^? hud . diSelection . _Just . slSet
guard $ guard $
not (IS.null ys) not (IS.null ys)
&& ( case w ^? hud . subInventory of && ( case w ^? hud . subInventory of
Just NoSubInventory -> True Just NoSubInventory -> True
_ -> False _ -> False
) )
(i, _, _) <- w ^? hud . diSelection . _Just Sel i _ _ <- w ^? hud . diSelection . _Just
sss <- w ^? hud . diSections sss <- w ^? hud . diSections
let f x = (selSecDrawCursorAt invDP BackdropCursor sss (i, x) <>) let f x = (selSecDrawCursorAt invDP BackdropCursor sss (i, x) <>)
return . translateScreenPos cfig (invDP ^. ldpPos) return . translateScreenPos cfig (invDP ^. ldpPos)
@@ -188,7 +188,7 @@ drawCombineInventory cfig sss w =
where where
curs = BoundaryCursor [North, South, West] curs = BoundaryCursor [North, South, West]
msel = msel =
fmap (\(x, y, _) -> (x, y)) $ fmap (\(Sel x y _) -> (x, y)) $
w ^? hud . subInventory . ciSelection . _Just w ^? hud . subInventory . ciSelection . _Just
drawExamineInventory :: Configuration -> World -> Picture drawExamineInventory :: Configuration -> World -> Picture
@@ -254,7 +254,7 @@ drawRBOptions cfig w = fold $ do
i <- w ^? rbOptions . opSel i <- w ^? rbOptions . opSel
let ae = getEquipmentAllocation invid w let ae = getEquipmentAllocation invid w
sss <- w ^? hud . diSections sss <- w ^? hud . diSections
(i', j, _) <- w ^? hud . diSelection . _Just Sel i' j _ <- w ^? hud . diSelection . _Just
curpos <- selSecYint i' j sss curpos <- selSecYint i' j sss
let ytext = drawListElement 0 1 0 curpos . text let ytext = drawListElement 0 1 0 curpos . text
midstr = equipAllocString ae midstr = equipAllocString ae
+1 -1
View File
@@ -115,7 +115,7 @@ mouseCursorType u = case u ^. uvWorld . input . mouseContext of
MouseGameRotate -> rotate a (drawVerticalDoubleArrow 5) MouseGameRotate -> rotate a (drawVerticalDoubleArrow 5)
where where
w = u ^. uvWorld w = u ^. uvWorld
selsec = u ^? uvWorld . hud . diSelection . _Just . _1 selsec = u ^? uvWorld . hud . diSelection . _Just . slSec
a = fromMaybe 0 $ do a = fromMaybe 0 $ do
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos
return . toClosestMultiple (pi / 32) $ return . toClosestMultiple (pi / 32) $
+1 -1
View File
@@ -13,7 +13,7 @@ interactWithCloseObj e w = worldEventFlags . at InventoryChange ?~ () $ case e o
getSelectedCloseObj :: World -> Maybe (Either (NewInt ItmInt) Button) getSelectedCloseObj :: World -> Maybe (Either (NewInt ItmInt) Button)
getSelectedCloseObj w = do getSelectedCloseObj w = do
(i, j, _) <- w ^? hud . diSelection . _Just Sel i j _ <- w ^? hud . diSelection . _Just
case i of case i of
3 -> Left <$> w ^? hud . closeItems . ix j 3 -> Left <$> w ^? hud . closeItems . ix j
5 -> do 5 -> do
+18 -29
View File
@@ -10,6 +10,7 @@ module Dodge.SelectionSections (
inverseSelNumPos, inverseSelNumPos,
) where ) where
import Dodge.Data.HUD
import Dodge.Data.CardinalPoint import Dodge.Data.CardinalPoint
import qualified Data.IntSet as IS import qualified Data.IntSet as IS
import Control.Applicative import Control.Applicative
@@ -24,64 +25,52 @@ import Dodge.Data.SelectionList
import Dodge.ScreenPos import Dodge.ScreenPos
import Geometry.Data import Geometry.Data
scrollSelectionSections :: scrollSelectionSections :: Int -> IMSS a -> Maybe Selection -> Maybe Selection
Int ->
IMSS a ->
Maybe (Int, Int,IS.IntSet) ->
Maybe (Int, Int,IS.IntSet)
scrollSelectionSections yi sss msel scrollSelectionSections yi sss msel
| yi == 0 = msel | yi == 0 = msel
| yi > 0 = foldl' (&) msel $ replicate yi (ssScrollUsing ssLookupUp sss) | yi > 0 = foldl' (&) msel $ replicate yi (ssScrollUsing ssLookupUp sss)
| otherwise = foldl' (&) msel $ replicate (negate yi) (ssScrollUsing ssLookupDown sss) | otherwise = foldl' (&) msel $ replicate (negate yi) (ssScrollUsing ssLookupDown sss)
nextInSectionSS :: nextInSectionSS :: IMSS a -> Maybe Selection -> Maybe Selection
IM.IntMap (SelectionSection a) ->
Maybe (Int, Int, IS.IntSet) ->
Maybe (Int, Int, IS.IntSet)
nextInSectionSS = ssScrollUsing ssLookupNextMax nextInSectionSS = ssScrollUsing ssLookupNextMax
--setFirstPosSelectionSections :: SelectionSections a -> SelectionSections a
--setFirstPosSelectionSections sss = fromMaybe sss $ do
-- (i, j, _) <- ssLookupMin sss
-- return $ sss & sssExtra . sssSelPos ?~ (i, j)
ssScrollUsing :: ssScrollUsing ::
(Int -> Int -> IM.IntMap (SelectionSection a) -> Maybe (Int, Int, SelectionItem a)) -> (Int -> Int -> IMSS a -> Maybe (Int, Int, SelectionItem a)) ->
IM.IntMap (SelectionSection a) -> IMSS a ->
Maybe (Int, Int, IS.IntSet) -> Maybe Selection ->
Maybe (Int, Int, IS.IntSet) Maybe Selection
ssScrollUsing g = ssScrollUsing g =
ssScrollMinOnFail ssScrollMinOnFail
g g
. fmap (ssItems %~ IM.filter _siIsSelectable) . fmap (ssItems %~ IM.filter _siIsSelectable)
ssScrollMinOnFail :: ssScrollMinOnFail ::
(Int -> Int -> IM.IntMap (SelectionSection a) -> Maybe (Int, Int, SelectionItem a)) -> (Int -> Int -> IMSS a -> Maybe (Int, Int, SelectionItem a)) ->
IM.IntMap (SelectionSection a) -> IMSS a ->
Maybe (Int, Int, IS.IntSet) -> Maybe Selection ->
Maybe (Int, Int, IS.IntSet) Maybe Selection
ssScrollMinOnFail f sss msel = fmap (\(i, j, _) -> (i, j, q i j)) $ l <|> ssLookupMin sss ssScrollMinOnFail f sss msel = fmap (\(i, j, _) -> Sel i j (q i j)) $ l <|> ssLookupMin sss
where where
q i j = fromMaybe mempty $ do q i j = fromMaybe mempty $ do
(k,_,xs) <- msel ^? _Just Sel k _ xs <- msel ^? _Just
guard $ j `IS.member` xs && i == k guard $ j `IS.member` xs && i == k
return xs return xs
l = do l = do
(i, j, _) <- msel Sel i j _ <- msel
f i j sss f i j sss
ssSetCursor :: ssSetCursor ::
(IM.IntMap (SelectionSection a) -> Maybe (Int, Int, SelectionItem a)) -> (IM.IntMap (SelectionSection a) -> Maybe (Int, Int, SelectionItem a)) ->
IM.IntMap (SelectionSection a) -> IM.IntMap (SelectionSection a) ->
Maybe (Int, Int, IS.IntSet) -> Maybe Selection ->
Maybe (Int, Int, IS.IntSet) Maybe Selection
ssSetCursor f sss msel = fromMaybe msel $ do ssSetCursor f sss msel = fromMaybe msel $ do
(i, j, _) <- f sss (i, j, _) <- f sss
let newxs = fromMaybe mempty $ do let newxs = fromMaybe mempty $ do
(k,_,xs) <- msel Sel k _ xs <- msel
guard $ k == i && j `IS.member` xs guard $ k == i && j `IS.member` xs
return xs return xs
return $ Just (i, j,newxs) return $ Just (Sel i j newxs)
ssLookupMax :: IM.IntMap (SelectionSection a) -> Maybe (Int, Int, SelectionItem a) ssLookupMax :: IM.IntMap (SelectionSection a) -> Maybe (Int, Int, SelectionItem a)
ssLookupMax sss = do ssLookupMax sss = do
+1 -1
View File
@@ -378,7 +378,7 @@ updateMouseContextGame cfig u = case u ^. uvWorld . input . mouseContext of
return $ OverInvSelect selpos return $ OverInvSelect selpos
overcomb = do overcomb = do
sss <- w ^? hud . subInventory . ciSections sss <- w ^? hud . subInventory . ciSections
(xl, xr, _) <- w ^? hud . subInventory . ciSelection . _Just Sel xl xr _ <- w ^? hud . subInventory . ciSelection . _Just
let msel = (xl, xr) let msel = (xl, xr)
let mpossel = inverseSelNumPos cfig secondColumnParams sss (w ^. input . mousePos) let mpossel = inverseSelNumPos cfig secondColumnParams sss (w ^. input . mousePos)
return $ case mpossel of return $ case mpossel of
+28 -28
View File
@@ -46,18 +46,18 @@ updateUseInputInGame :: Universe -> Universe
updateUseInputInGame u = updateFunctionKeys $ case u ^. uvWorld . hud of updateUseInputInGame u = updateFunctionKeys $ case u ^. uvWorld . hud of
HUD{_subInventory = si, _diSelection = disel} -> case si of HUD{_subInventory = si, _diSelection = disel} -> case si of
DisplayTerminal tmid -> updateKeysInTerminal tmid u DisplayTerminal tmid -> updateKeysInTerminal tmid u
CombineInventory{_ciSections = sss, _ciSelection = msel@(Just (-1, _, _))} -> CombineInventory{_ciSections = sss, _ciSelection = msel@(Just (Sel (-1) _ _))} ->
u u
& tohud . subInventory %~ docombineregexinput sss msel & tohud . subInventory %~ docombineregexinput sss msel
& uvWorld . worldEventFlags . at CombineInventoryChange ?~ () & uvWorld . worldEventFlags . at CombineInventoryChange ?~ ()
_ _
| disel ^? _Just . _1 == Just (-1) -> | disel ^? _Just . slSec == Just (-1) ->
u u
& tohud %~ dodisplayregexinput diInvFilter diInvFilter (-1) & tohud %~ dodisplayregexinput diInvFilter diInvFilter (-1)
& uvWorld . worldEventFlags . at InventoryChange ?~ () & uvWorld . worldEventFlags . at InventoryChange ?~ ()
& uvWorld %~ setInvPosFromSS & uvWorld %~ setInvPosFromSS
_ _
| disel ^? _Just . _1 == Just 2 -> | disel ^? _Just . slSec == Just 2 ->
u u
& tohud %~ dodisplayregexinput diCloseFilter diCloseFilter 2 & tohud %~ dodisplayregexinput diCloseFilter diCloseFilter 2
& uvWorld . worldEventFlags . at InventoryChange ?~ () & uvWorld . worldEventFlags . at InventoryChange ?~ ()
@@ -128,7 +128,7 @@ doDrag cfig n k mmouseover w = fromMaybe w $ do
guard (n /= 0) guard (n /= 0)
ss <- w ^? hud . diSections . ix k . ssItems ss <- w ^? hud . diSections . ix k . ssItems
x <- mmouseover x <- mmouseover
is <- w ^? hud . diSelection . _Just . _3 is <- w ^? hud . diSelection . _Just . slSet
return $ return $
if concurrentIS is if concurrentIS is
then shiftInvItems cfig n k x is ss w then shiftInvItems cfig n k x is ss w
@@ -138,7 +138,7 @@ tryDropSelected :: Maybe (Int, Int) -> World -> Maybe World
tryDropSelected mpos w = do tryDropSelected mpos w = do
guard $ maybe True (\(i, _) -> i == 3) mpos guard $ maybe True (\(i, _) -> i == 3) mpos
cr <- w ^? cWorld . lWorld . creatures . ix 0 cr <- w ^? cWorld . lWorld . creatures . ix 0
(0, _, xs) <- w ^? hud . diSelection . _Just Sel 0 _ xs <- w ^? hud . diSelection . _Just
return . foldl' (flip $ dropItem cr) w . IS.toDescList $ xs return . foldl' (flip $ dropItem cr) w . IS.toDescList $ xs
tryPickupSelected :: Int -> Maybe (Int, Int) -> World -> Maybe World tryPickupSelected :: Int -> Maybe (Int, Int) -> World -> Maybe World
@@ -146,7 +146,7 @@ tryPickupSelected k mpos w = do
guard $ k == 3 guard $ k == 3
guard $ maybe True (\(i, _) -> i == 0 || i == 1) mpos guard $ maybe True (\(i, _) -> i == 0 || i == 1) mpos
cr <- w ^? cWorld . lWorld . creatures . ix 0 cr <- w ^? cWorld . lWorld . creatures . ix 0
xs <- w ^? hud . diSelection . _Just . _3 xs <- w ^? hud . diSelection . _Just . slSet
let nfreeslots = crNumFreeSlots (w ^. cWorld . lWorld . items) cr let nfreeslots = crNumFreeSlots (w ^. cWorld . lWorld . items) cr
itmstopickup = mapMaybe g $ IS.toList xs itmstopickup = mapMaybe g $ IS.toList xs
slotsneeded = alaf Sum foldMap itInvHeight itmstopickup slotsneeded = alaf Sum foldMap itInvHeight itmstopickup
@@ -158,7 +158,7 @@ tryPickupSelected k mpos w = do
where where
newdisel j xs = newdisel j xs =
hud . diSelection hud . diSelection
?~ (0, j, IS.fromDistinctAscList [j .. j + IS.size xs -1]) ?~ Sel 0 j (IS.fromDistinctAscList [j .. j + IS.size xs -1])
g i = do g i = do
NInt j <- w ^? hud . closeItems . ix i NInt j <- w ^? hud . closeItems . ix i
w ^? cWorld . lWorld . items . ix j w ^? cWorld . lWorld . items . ix j
@@ -171,23 +171,23 @@ updateMouseReleaseInGame w = case w ^. input . mouseContext of
OverInvDragSelect (Just ssel) mesel OverInvDragSelect (Just ssel) mesel
| ScancodeLShift `M.member` (w ^. input . pressedKeys) -> | ScancodeLShift `M.member` (w ^. input . pressedKeys) ->
w & input . mouseContext .~ MouseInGame w & input . mouseContext .~ MouseInGame
& hud . diSelection . _Just . _3 & hud . diSelection . _Just . slSet
%~ getuniques %~ getuniques
( maybe ( maybe
mempty mempty
(h ssel) (h ssel)
(guard (ssel ^? _1 == w ^? hud . diSelection . _Just . _1) >> mesel ^? _Just) (guard (ssel ^? _1 == w ^? hud . diSelection . _Just . slSec) >> mesel ^? _Just)
) )
OverInvDragSelect (Just ssel) (Just esel) -> OverInvDragSelect (Just ssel) (Just esel) ->
w & input . mouseContext .~ MouseInGame w & input . mouseContext .~ MouseInGame
& invSetSelection (f (fst ssel, esel) (h ssel esel)) & invSetSelection (f (fst ssel, esel) (h ssel esel))
OverInvDragSelect{} -> OverInvDragSelect{} ->
w & input . mouseContext .~ MouseInGame w & input . mouseContext .~ MouseInGame
& hud . diSelection . _Just . _3 %~ const mempty & hud . diSelection . _Just . slSet %~ const mempty
_ -> w _ -> w
where where
getuniques x y = IS.union x y IS.\\ IS.intersection x y getuniques x y = IS.union x y IS.\\ IS.intersection x y
f (x, y) z = (x, y, z) f (x, y) z = Sel x y z
h (k, i) j = fold $ do h (k, i) j = fold $ do
sss <- w ^? hud . diSections . ix k . ssItems sss <- w ^? hud . diSections . ix k . ssItems
let (_, xss) = IM.split (min i j -1) sss let (_, xss) = IM.split (min i j -1) sss
@@ -259,16 +259,16 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
_ -> w & hud . subInventory . ciFilter ?~ ("#" ++ str) _ -> w & hud . subInventory . ciFilter ?~ ("#" ++ str)
_ -> w _ -> w
where where
f (x, y) = (x, y, mempty) f (x, y) = Sel x y mempty
selsec = w ^? hud . diSelection . _Just . _1 selsec = w ^? hud . diSelection . _Just . slSec
endRegex :: Int -> World -> Maybe (Int, Int, IS.IntSet) -> Maybe (Int, Int, IS.IntSet) endRegex :: Int -> World -> Maybe Selection -> Maybe Selection
endRegex i w = ssSetCursor (ssLookupDown i j) sss endRegex i w = ssSetCursor (ssLookupDown i j) sss
where where
sss = w ^. hud . diSections sss = w ^. hud . diSections
j = maybe 0 fst $ IM.lookupMin =<< sss ^? ix i . ssItems j = maybe 0 fst $ IM.lookupMin =<< sss ^? ix i . ssItems
endCombineRegex :: World -> Maybe (Int, Int, IS.IntSet) -> Maybe (Int, Int, IS.IntSet) endCombineRegex :: World -> Maybe Selection -> Maybe Selection
endCombineRegex w = ssSetCursor (ssLookupDown 0 j) sss endCombineRegex w = ssSetCursor (ssLookupDown 0 j) sss
where where
sss = w ^. hud . subInventory . ciSections sss = w ^. hud . subInventory . ciSections
@@ -279,8 +279,8 @@ endCombineRegex w = ssSetCursor (ssLookupDown 0 j) sss
startDrag :: (Int, Int) -> World -> World startDrag :: (Int, Int) -> World -> World
startDrag (a, b) w = setcontext $ case w ^? hud . diSelection . _Just of startDrag (a, b) w = setcontext $ case w ^? hud . diSelection . _Just of
Just (i, _, xs) | i == a && b `IS.member` xs -> w Just (Sel i _ xs) | i == a && b `IS.member` xs -> w
_ -> invSetSelection (a, b, IS.singleton b) w _ -> invSetSelection (Sel a b (IS.singleton b)) w
where where
setcontext = input . mouseContext .~ OverInvDrag a (Just (a, b)) setcontext = input . mouseContext .~ OverInvDrag a (Just (a, b))
@@ -336,10 +336,10 @@ shiftInvItems cfig n k x xs ss w = setSelWhileDragging . fromMaybe w $ do
setSelWhileDragging :: World -> World setSelWhileDragging :: World -> World
setSelWhileDragging w = fromMaybe w $ do setSelWhileDragging w = fromMaybe w $ do
(i, _, xs) <- w ^? hud . diSelection . _Just Sel i _ xs <- w ^? hud . diSelection . _Just
(k, j) <- w ^? input . mouseContext . mcoMaybeSelect . _Just (k, j) <- w ^? input . mouseContext . mcoMaybeSelect . _Just
guard $ i == k && j `IS.member` xs guard $ i == k && j `IS.member` xs
return $ w & hud . diSelection . _Just . _2 .~ j return $ w & hud . diSelection . _Just . slInt .~ j
shiftInvItemsUp :: Int -> IS.IntSet -> World -> World shiftInvItemsUp :: Int -> IS.IntSet -> World -> World
shiftInvItemsUp j is w = IS.foldl' f w is shiftInvItemsUp j is w = IS.foldl' f w is
@@ -446,9 +446,9 @@ doRegexInput ::
Input -> Input ->
Int -> Int ->
IMSS a -> IMSS a ->
Maybe (Int, Int, IS.IntSet) -> Maybe Selection ->
Maybe String -> Maybe String ->
(IMSS a, Maybe (Int, Int, IS.IntSet), Maybe String) (IMSS a, Maybe Selection, Maybe String)
doRegexInput inp i sss msel filts doRegexInput inp i sss msel filts
| backspacetonothing || escapekey = endregex i 0 | backspacetonothing || escapekey = endregex i 0
| endkeys = endregex (i + 1) (j -1) | endkeys = endregex (i + 1) (j -1)
@@ -489,14 +489,14 @@ updateBackspaceRegex w = case di ^? subInventory of
_ -> w _ -> w
where where
secfocus a b = fromMaybe False $ do secfocus a b = fromMaybe False $ do
i <- di ^? diSelection . _Just . _1 i <- di ^? diSelection . _Just . slSec
return $ i == a || i == b return $ i == a || i == b
trybackspace x filtget filtset selset he = fromMaybe he $ do trybackspace x filtget filtset selset he = fromMaybe he $ do
str <- he ^? filtget . _Just str <- he ^? filtget . _Just
return $ case str of return $ case str of
(_ : _) -> (_ : _) ->
he & filtset . _Just %~ init he & filtset . _Just %~ init
& selset ?~ (x, 0, mempty) & selset ?~ Sel x 0 mempty
[] -> he & filtset .~ Nothing [] -> he & filtset .~ Nothing
di = w ^. hud di = w ^. hud
@@ -504,19 +504,19 @@ updateEnterRegex :: World -> World
updateEnterRegex w = case w ^? hud . subInventory of updateEnterRegex w = case w ^? hud . subInventory of
Just NoSubInventory{} Just NoSubInventory{}
| secfocus [-1, 0, 1] -> | secfocus [-1, 0, 1] ->
w & hud . diSelection ?~ (-1, 0, mempty) w & hud . diSelection ?~ Sel (-1) 0 mempty
& hud . diInvFilter %~ enterregex & hud . diInvFilter %~ enterregex
Just NoSubInventory{} Just NoSubInventory{}
| secfocus [2, 3] -> | secfocus [2, 3] ->
w & hud . diSelection ?~ (2, 0, mempty) w & hud . diSelection ?~ Sel 2 0 mempty
& hud . diCloseFilter %~ enterregex & hud . diCloseFilter %~ enterregex
Just CombineInventory{} -> Just CombineInventory{} ->
w & hud . subInventory . ciFilter %~ enterregex w & hud . subInventory . ciFilter %~ enterregex
& hud . subInventory . ciSelection ?~ (-1, 0, mempty) & hud . subInventory . ciSelection ?~ Sel (-1) 0 mempty
_ -> w _ -> w
where where
secfocus xs = fromMaybe False $ do secfocus xs = fromMaybe False $ do
i <- w ^? hud . diSelection . _Just . _1 i <- w ^? hud . diSelection . _Just . slSec
return $ i `elem` xs return $ i `elem` xs
enterregex = (<|> Just "") enterregex = (<|> Just "")
@@ -547,7 +547,7 @@ tryCombine (i, j) w = fromMaybe w $ do
return $ return $
(createItemYou it (foldr (destroyInvItem 0 . NInt) w (sort is))) (createItemYou it (foldr (destroyInvItem 0 . NInt) w (sort is)))
& soundStart InventorySound p wrench1S Nothing & soundStart InventorySound p wrench1S Nothing
& hud . diSelection . _Just . _3 .~ mempty & hud . diSelection . _Just . slSet .~ mempty
maybeExitCombine :: World -> World maybeExitCombine :: World -> World
maybeExitCombine w maybeExitCombine w
+41 -35
View File
@@ -239,7 +239,7 @@ CombClust src/Dodge/Combine/Graph.hs 19;" t
CombEdge src/Dodge/Combine/Graph.hs 32;" t CombEdge src/Dodge/Combine/Graph.hs 32;" t
CombNode src/Dodge/Combine/Graph.hs 25;" t CombNode src/Dodge/Combine/Graph.hs 25;" t
CombinableItem src/Dodge/Data/Combine.hs 5;" t CombinableItem src/Dodge/Data/Combine.hs 5;" t
CombineInventory src/Dodge/Data/HUD.hs 26;" C CombineInventory src/Dodge/Data/HUD.hs 25;" C
CombineInventoryChange src/Dodge/Data/World.hs 32;" C CombineInventoryChange src/Dodge/Data/World.hs 32;" C
ComsSS src/Dodge/Data/Scenario.hs 98;" C ComsSS src/Dodge/Data/Scenario.hs 98;" C
ConcurrentEffect src/Loop/Data.hs 6;" t ConcurrentEffect src/Loop/Data.hs 6;" t
@@ -343,7 +343,7 @@ DestroyItem src/Dodge/Data/Scenario.hs 7;" C
Detector src/Dodge/Data/Item/Combine.hs 183;" t Detector src/Dodge/Data/Item/Combine.hs 183;" t
Dirt src/Dodge/Data/Material.hs 11;" C Dirt src/Dodge/Data/Material.hs 11;" C
DisasterType src/Dodge/Data/Scenario.hs 24;" t DisasterType src/Dodge/Data/Scenario.hs 24;" t
DisplayTerminal src/Dodge/Data/HUD.hs 31;" C DisplayTerminal src/Dodge/Data/HUD.hs 30;" C
Distortion src/Dodge/Data/Distortion.hs 12;" t Distortion src/Dodge/Data/Distortion.hs 12;" t
DivineRetribution src/Dodge/Data/Scenario.hs 35;" C DivineRetribution src/Dodge/Data/Scenario.hs 35;" C
DoActionIf src/Dodge/Data/ActionPlan.hs 116;" C DoActionIf src/Dodge/Data/ActionPlan.hs 116;" C
@@ -416,7 +416,7 @@ EquipmentPlatformSF src/Dodge/Data/ComposedItem.hs 17;" C
Escape src/Dodge/Data/Scenario.hs 10;" C Escape src/Dodge/Data/Scenario.hs 10;" C
EscapeMenuOption src/Dodge/Data/Universe.hs 76;" t EscapeMenuOption src/Dodge/Data/Universe.hs 76;" t
Essential src/Shape/Data.hs 34;" C Essential src/Shape/Data.hs 34;" C
ExamineInventory src/Dodge/Data/HUD.hs 20;" C ExamineInventory src/Dodge/Data/HUD.hs 19;" C
Explore src/Dodge/Data/Scenario.hs 4;" C Explore src/Dodge/Data/Scenario.hs 4;" C
Explosion src/Dodge/Data/SoundOrigin.hs 38;" C Explosion src/Dodge/Data/SoundOrigin.hs 38;" C
ExplosionPayload src/Dodge/Data/Payload.hs 11;" C ExplosionPayload src/Dodge/Data/Payload.hs 11;" C
@@ -443,7 +443,7 @@ FetchItem src/Dodge/Data/Scenario.hs 11;" C
FireSpark src/Dodge/Data/Spark.hs 22;" C FireSpark src/Dodge/Data/Spark.hs 22;" C
Fixated src/Dodge/Data/Creature/Perception.hs 62;" C Fixated src/Dodge/Data/Creature/Perception.hs 62;" C
FixedCoordLayer src/Picture/Data.hs 28;" C FixedCoordLayer src/Picture/Data.hs 28;" C
FixedSelectionWidth src/Dodge/Data/SelectionList.hs 40;" C FixedSelectionWidth src/Dodge/Data/SelectionList.hs 39;" C
FlIt src/Dodge/Data/FloorItem.hs 15;" C FlIt src/Dodge/Data/FloorItem.hs 15;" C
Flame src/Dodge/Data/Flame.hs 13;" t Flame src/Dodge/Data/Flame.hs 13;" t
FlameBeamCombine src/Dodge/Data/Beam.hs 39;" C FlameBeamCombine src/Dodge/Data/Beam.hs 39;" C
@@ -535,7 +535,7 @@ HEATSENSOR src/Dodge/Data/Item/Combine.hs 83;" C
HELD src/Dodge/Data/Item/Combine.hs 17;" C HELD src/Dodge/Data/Item/Combine.hs 17;" C
HOMINGMODULE src/Dodge/Data/Item/Combine.hs 102;" C HOMINGMODULE src/Dodge/Data/Item/Combine.hs 102;" C
HOSE src/Dodge/Data/Item/Combine.hs 55;" C HOSE src/Dodge/Data/Item/Combine.hs 55;" C
HUD src/Dodge/Data/HUD.hs 33;" t HUD src/Dodge/Data/HUD.hs 32;" t
HalfRes src/Dodge/Data/Config.hs 97;" C HalfRes src/Dodge/Data/Config.hs 97;" C
HammerTrigger src/Dodge/Data/TriggerType.hs 10;" C HammerTrigger src/Dodge/Data/TriggerType.hs 10;" C
HardQuit src/Dodge/Data/Universe.hs 70;" C HardQuit src/Dodge/Data/Universe.hs 70;" C
@@ -753,7 +753,7 @@ MakeTempLight src/Dodge/Data/WorldEffect.hs 34;" C
ManipulatedObject src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 22;" t ManipulatedObject src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 22;" t
Manipulation src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 16;" t Manipulation src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 16;" t
Manipulator src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 17;" C Manipulator src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 17;" C
MapperInventory src/Dodge/Data/HUD.hs 21;" C MapperInventory src/Dodge/Data/HUD.hs 20;" C
MapperSF src/Dodge/Data/ComposedItem.hs 39;" C MapperSF src/Dodge/Data/ComposedItem.hs 39;" C
Material src/Dodge/Data/Material.hs 11;" t Material src/Dodge/Data/Material.hs 11;" t
MaterialSound src/Dodge/Data/SoundOrigin.hs 35;" C MaterialSound src/Dodge/Data/SoundOrigin.hs 35;" C
@@ -866,9 +866,10 @@ NoResurrection src/Dodge/Data/Corpse.hs 14;" C
NoRightButtonOptions src/Dodge/Data/RightButtonOptions.hs 16;" C NoRightButtonOptions src/Dodge/Data/RightButtonOptions.hs 16;" C
NoRoomClipBoundaries src/Dodge/Data/Config.hs 107;" C NoRoomClipBoundaries src/Dodge/Data/Config.hs 107;" C
NoSF src/Dodge/Data/ComposedItem.hs 29;" C NoSF src/Dodge/Data/ComposedItem.hs 29;" C
NoSel src/Dodge/Data/HUD.hs 47;" C
NoShadowFidelity src/Shape/Data.hs 25;" C NoShadowFidelity src/Shape/Data.hs 25;" C
NoShadows src/Dodge/Data/Config.hs 103;" C NoShadows src/Dodge/Data/Config.hs 103;" C
NoSubInventory src/Dodge/Data/HUD.hs 19;" C NoSubInventory src/Dodge/Data/HUD.hs 18;" C
NoTrigger src/Dodge/Data/TriggerType.hs 11;" C NoTrigger src/Dodge/Data/TriggerType.hs 11;" C
NoWorldEffect src/Dodge/Data/WorldEffect.hs 23;" C NoWorldEffect src/Dodge/Data/WorldEffect.hs 23;" C
Noclip src/Dodge/Data/Config.hs 70;" C Noclip src/Dodge/Data/Config.hs 70;" C
@@ -1197,13 +1198,15 @@ SecretCabal src/Dodge/Data/Scenario.hs 44;" C
SectionCursor src/Dodge/Data/SelectionList.hs 23;" t SectionCursor src/Dodge/Data/SelectionList.hs 23;" t
SeeAbove src/Dodge/Data/Wall.hs 42;" C SeeAbove src/Dodge/Data/Wall.hs 42;" C
SeeThrough src/Dodge/Data/Wall.hs 41;" C SeeThrough src/Dodge/Data/Wall.hs 41;" C
Sel src/Dodge/Data/HUD.hs 46;" C
SelCloseButton src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 33;" C SelCloseButton src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 33;" C
SelCloseItem src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 31;" C SelCloseItem src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 31;" C
SelItem src/Dodge/Data/SelectionList.hs 44;" C SelItem src/Dodge/Data/SelectionList.hs 42;" C
SelNothing src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 29;" C SelNothing src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 29;" C
Select_creature src/Dodge/Data/Config.hs 94;" C Select_creature src/Dodge/Data/Config.hs 94;" C
SelectedItem src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 24;" C SelectedItem src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 24;" C
SelectionItem src/Dodge/Data/SelectionList.hs 43;" t Selection src/Dodge/Data/HUD.hs 45;" t
SelectionItem src/Dodge/Data/SelectionList.hs 41;" t
SelectionSection src/Dodge/Data/SelectionList.hs 29;" t SelectionSection src/Dodge/Data/SelectionList.hs 29;" t
SelectionWidth src/Dodge/Data/SelectionList.hs 39;" t SelectionWidth src/Dodge/Data/SelectionList.hs 39;" t
SelfTree src/Dodge/Data/MetaTree.hs 18;" t SelfTree src/Dodge/Data/MetaTree.hs 18;" t
@@ -1293,7 +1296,7 @@ Stone src/Dodge/Data/Material.hs 11;" C
StorageSS src/Dodge/Data/Scenario.hs 94;" C StorageSS src/Dodge/Data/Scenario.hs 94;" C
Strategy src/Dodge/Data/ActionPlan.hs 176;" t Strategy src/Dodge/Data/ActionPlan.hs 176;" t
StrategyActions src/Dodge/Data/ActionPlan.hs 188;" C StrategyActions src/Dodge/Data/ActionPlan.hs 188;" C
SubInventory src/Dodge/Data/HUD.hs 18;" t SubInventory src/Dodge/Data/HUD.hs 17;" t
Superfluous src/Shape/Data.hs 38;" C Superfluous src/Shape/Data.hs 38;" C
Surface src/Shape/Data.hs 41;" t Surface src/Shape/Data.hs 41;" t
Survive src/Dodge/Data/Scenario.hs 5;" C Survive src/Dodge/Data/Scenario.hs 5;" C
@@ -1432,7 +1435,7 @@ UseHeld src/Dodge/Data/Item/Use.hs 31;" C
UseInt src/Dodge/Data/Item/Use.hs 33;" C UseInt src/Dodge/Data/Item/Use.hs 33;" C
UseInvItem src/Dodge/Data/WorldEffect.hs 35;" C UseInvItem src/Dodge/Data/WorldEffect.hs 35;" C
UseItem src/Dodge/Data/ActionPlan.hs 37;" C UseItem src/Dodge/Data/ActionPlan.hs 37;" C
UseItemWidth src/Dodge/Data/SelectionList.hs 41;" C UseItemWidth src/Dodge/Data/SelectionList.hs 39;" C
UseMapper src/Dodge/Data/Item/Use.hs 39;" C UseMapper src/Dodge/Data/Item/Use.hs 39;" C
UseMvTargetPos src/Dodge/Data/ActionPlan.hs 163;" C UseMvTargetPos src/Dodge/Data/ActionPlan.hs 163;" C
UseNothing src/Dodge/Data/Item/Use.hs 34;" C UseNothing src/Dodge/Data/Item/Use.hs 34;" C
@@ -1635,9 +1638,9 @@ _camViewFrom src/Dodge/Data/Camera.hs 29;" f
_camZoom src/Dodge/Data/Camera.hs 26;" f _camZoom src/Dodge/Data/Camera.hs 26;" f
_canID src/Dodge/Data/LWorld.hs 170;" f _canID src/Dodge/Data/LWorld.hs 170;" f
_carriage src/Dodge/Data/Creature/Stance.hs 14;" f _carriage src/Dodge/Data/Creature/Stance.hs 14;" f
_carteCenter src/Dodge/Data/HUD.hs 39;" f _carteCenter src/Dodge/Data/HUD.hs 38;" f
_carteRot src/Dodge/Data/HUD.hs 41;" f _carteRot src/Dodge/Data/HUD.hs 40;" f
_carteZoom src/Dodge/Data/HUD.hs 40;" f _carteZoom src/Dodge/Data/HUD.hs 39;" f
_cdtCloseLeft src/Dodge/Data/DoubleTree.hs 88;" f _cdtCloseLeft src/Dodge/Data/DoubleTree.hs 88;" f
_cdtCloseLeft src/Dodge/Data/DoubleTree.hs 96;" f _cdtCloseLeft src/Dodge/Data/DoubleTree.hs 96;" f
_cdtCloseRight src/Dodge/Data/DoubleTree.hs 90;" f _cdtCloseRight src/Dodge/Data/DoubleTree.hs 90;" f
@@ -1653,11 +1656,11 @@ _ceString src/Dodge/Data/Universe.hs 67;" f
_chasmShader src/Data/Preload/Render.hs 46;" f _chasmShader src/Data/Preload/Render.hs 46;" f
_chasmVBO src/Data/Preload/Render.hs 45;" f _chasmVBO src/Data/Preload/Render.hs 45;" f
_chasms src/Dodge/Data/CWorld.hs 30;" f _chasms src/Dodge/Data/CWorld.hs 30;" f
_ciFilter src/Dodge/Data/HUD.hs 29;" f _ciFilter src/Dodge/Data/HUD.hs 28;" f
_ciInvIDs src/Dodge/Data/Combine.hs 6;" f _ciInvIDs src/Dodge/Data/Combine.hs 6;" f
_ciItem src/Dodge/Data/Combine.hs 7;" f _ciItem src/Dodge/Data/Combine.hs 7;" f
_ciSections src/Dodge/Data/HUD.hs 27;" f _ciSections src/Dodge/Data/HUD.hs 26;" f
_ciSelection src/Dodge/Data/HUD.hs 28;" f _ciSelection src/Dodge/Data/HUD.hs 27;" f
_cigType src/Dodge/Data/Camera.hs 19;" f _cigType src/Dodge/Data/Camera.hs 19;" f
_clPos src/Dodge/Data/Cloud.hs 15;" f _clPos src/Dodge/Data/Cloud.hs 15;" f
_clTimer src/Dodge/Data/Cloud.hs 17;" f _clTimer src/Dodge/Data/Cloud.hs 17;" f
@@ -1678,8 +1681,8 @@ _cldtUp src/Dodge/Data/DoubleTree.hs 45;" f
_cldtUp src/Dodge/Data/DoubleTree.hs 53;" f _cldtUp src/Dodge/Data/DoubleTree.hs 53;" f
_clickPos src/Dodge/Data/Input.hs 42;" f _clickPos src/Dodge/Data/Input.hs 42;" f
_clickWorldPos src/Dodge/Data/Input.hs 44;" f _clickWorldPos src/Dodge/Data/Input.hs 44;" f
_closeButtons src/Dodge/Data/HUD.hs 43;" f _closeButtons src/Dodge/Data/HUD.hs 42;" f
_closeItems src/Dodge/Data/HUD.hs 42;" f _closeItems src/Dodge/Data/HUD.hs 41;" f
_cloudEBO src/Data/Preload/Render.hs 51;" f _cloudEBO src/Data/Preload/Render.hs 51;" f
_cloudShader src/Data/Preload/Render.hs 50;" f _cloudShader src/Data/Preload/Render.hs 50;" f
_cloudVBO src/Data/Preload/Render.hs 49;" f _cloudVBO src/Data/Preload/Render.hs 49;" f
@@ -1764,10 +1767,10 @@ _debugV3 src/Dodge/Data/Universe.hs 59;" f
_debug_booleans src/Dodge/Data/Config.hs 57;" f _debug_booleans src/Dodge/Data/Config.hs 57;" f
_debug_view_clip_bounds src/Dodge/Data/Config.hs 56;" f _debug_view_clip_bounds src/Dodge/Data/Config.hs 56;" f
_delayedEvents src/Dodge/Data/LWorld.hs 137;" f _delayedEvents src/Dodge/Data/LWorld.hs 137;" f
_diCloseFilter src/Dodge/Data/HUD.hs 38;" f _diCloseFilter src/Dodge/Data/HUD.hs 37;" f
_diInvFilter src/Dodge/Data/HUD.hs 37;" f _diInvFilter src/Dodge/Data/HUD.hs 36;" f
_diSections src/Dodge/Data/HUD.hs 35;" f _diSections src/Dodge/Data/HUD.hs 34;" f
_diSelection src/Dodge/Data/HUD.hs 36;" f _diSelection src/Dodge/Data/HUD.hs 35;" f
_dimAttachPos src/Dodge/Data/Item/Misc.hs 16;" f _dimAttachPos src/Dodge/Data/Item/Misc.hs 16;" f
_dimCenter src/Dodge/Data/Item/Misc.hs 15;" f _dimCenter src/Dodge/Data/Item/Misc.hs 15;" f
_dimRad src/Dodge/Data/Item/Misc.hs 14;" f _dimRad src/Dodge/Data/Item/Misc.hs 14;" f
@@ -2016,9 +2019,9 @@ _magBelowID src/Dodge/Data/Muzzle.hs 22;" f
_magnets src/Dodge/Data/LWorld.hs 130;" f _magnets src/Dodge/Data/LWorld.hs 130;" f
_mainAction src/Dodge/Data/ActionPlan.hs 171;" f _mainAction src/Dodge/Data/ActionPlan.hs 171;" f
_manObject src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 17;" f _manObject src/Dodge/Data/Item/Use/Consumption/LoadAction.hs 17;" f
_mapInvItmID src/Dodge/Data/HUD.hs 24;" f _mapInvItmID src/Dodge/Data/HUD.hs 23;" f
_mapInvOffset src/Dodge/Data/HUD.hs 22;" f _mapInvOffset src/Dodge/Data/HUD.hs 21;" f
_mapInvZoom src/Dodge/Data/HUD.hs 23;" f _mapInvZoom src/Dodge/Data/HUD.hs 22;" f
_matUBO src/Data/Preload/Render.hs 39;" f _matUBO src/Data/Preload/Render.hs 39;" f
_mbAttach src/Dodge/Data/MetaTree.hs 16;" f _mbAttach src/Dodge/Data/MetaTree.hs 16;" f
_mbTree src/Dodge/Data/MetaTree.hs 16;" f _mbTree src/Dodge/Data/MetaTree.hs 16;" f
@@ -2331,13 +2334,13 @@ _shapeHalfSize src/Shape/Data.hs 18;" f
_shapeShader src/Data/Preload/Render.hs 25;" f _shapeShader src/Data/Preload/Render.hs 25;" f
_shellPayload src/Dodge/Data/Item/Combine.hs 103;" f _shellPayload src/Dodge/Data/Item/Combine.hs 103;" f
_shockwaves src/Dodge/Data/LWorld.hs 118;" f _shockwaves src/Dodge/Data/LWorld.hs 118;" f
_siColor src/Dodge/Data/SelectionList.hs 49;" f _siColor src/Dodge/Data/SelectionList.hs 47;" f
_siHeight src/Dodge/Data/SelectionList.hs 46;" f _siHeight src/Dodge/Data/SelectionList.hs 44;" f
_siIsSelectable src/Dodge/Data/SelectionList.hs 48;" f _siIsSelectable src/Dodge/Data/SelectionList.hs 46;" f
_siOffX src/Dodge/Data/SelectionList.hs 50;" f _siOffX src/Dodge/Data/SelectionList.hs 48;" f
_siPayload src/Dodge/Data/SelectionList.hs 51;" f _siPayload src/Dodge/Data/SelectionList.hs 49;" f
_siPictures src/Dodge/Data/SelectionList.hs 45;" f _siPictures src/Dodge/Data/SelectionList.hs 43;" f
_siWidth src/Dodge/Data/SelectionList.hs 47;" f _siWidth src/Dodge/Data/SelectionList.hs 45;" f
_sideEffect src/Loop/Data.hs 13;" f _sideEffect src/Loop/Data.hs 13;" f
_sideImpulses src/Dodge/Data/ActionPlan.hs 170;" f _sideImpulses src/Dodge/Data/ActionPlan.hs 170;" f
_silhouetteEBO src/Data/Preload/Render.hs 27;" f _silhouetteEBO src/Data/Preload/Render.hs 27;" f
@@ -2348,6 +2351,9 @@ _skVel src/Dodge/Data/Spark.hs 15;" f
_skinHead src/Dodge/Data/Creature/Misc.hs 78;" f _skinHead src/Dodge/Data/Creature/Misc.hs 78;" f
_skinLower src/Dodge/Data/Creature/Misc.hs 80;" f _skinLower src/Dodge/Data/Creature/Misc.hs 80;" f
_skinUpper src/Dodge/Data/Creature/Misc.hs 79;" f _skinUpper src/Dodge/Data/Creature/Misc.hs 79;" f
_slInt src/Dodge/Data/HUD.hs 46;" f
_slSec src/Dodge/Data/HUD.hs 46;" f
_slSet src/Dodge/Data/HUD.hs 46;" f
_smoothScrollAmount src/Dodge/Data/Input.hs 41;" f _smoothScrollAmount src/Dodge/Data/Input.hs 41;" f
_soundAngDist src/Sound/Data.hs 49;" f _soundAngDist src/Sound/Data.hs 49;" f
_soundChannel src/Sound/Data.hs 48;" f _soundChannel src/Sound/Data.hs 48;" f
@@ -2375,7 +2381,7 @@ _stuckCrID src/Dodge/Data/Projectile.hs 50;" f
_stuckCrOffset src/Dodge/Data/Projectile.hs 50;" f _stuckCrOffset src/Dodge/Data/Projectile.hs 50;" f
_stuckCrRot src/Dodge/Data/Projectile.hs 50;" f _stuckCrRot src/Dodge/Data/Projectile.hs 50;" f
_stuckWlID src/Dodge/Data/Projectile.hs 51;" f _stuckWlID src/Dodge/Data/Projectile.hs 51;" f
_subInventory src/Dodge/Data/HUD.hs 34;" f _subInventory src/Dodge/Data/HUD.hs 33;" f
_swColor src/Dodge/Data/Shockwave.hs 18;" f _swColor src/Dodge/Data/Shockwave.hs 18;" f
_swDam src/Dodge/Data/Shockwave.hs 23;" f _swDam src/Dodge/Data/Shockwave.hs 23;" f
_swDirection src/Dodge/Data/Shockwave.hs 19;" f _swDirection src/Dodge/Data/Shockwave.hs 19;" f
@@ -2396,7 +2402,7 @@ _tbPos src/Dodge/Data/TractorBeam.hs 14;" f
_tbStartPos src/Dodge/Data/TractorBeam.hs 15;" f _tbStartPos src/Dodge/Data/TractorBeam.hs 15;" f
_tbTime src/Dodge/Data/TractorBeam.hs 17;" f _tbTime src/Dodge/Data/TractorBeam.hs 17;" f
_tbVel src/Dodge/Data/TractorBeam.hs 16;" f _tbVel src/Dodge/Data/TractorBeam.hs 16;" f
_termID src/Dodge/Data/HUD.hs 31;" f _termID src/Dodge/Data/HUD.hs 30;" f
_terminals src/Dodge/Data/LWorld.hs 128;" f _terminals src/Dodge/Data/LWorld.hs 128;" f
_teslaArcs src/Dodge/Data/LWorld.hs 116;" f _teslaArcs src/Dodge/Data/LWorld.hs 116;" f
_testFloat src/Dodge/Data/World.hs 43;" f _testFloat src/Dodge/Data/World.hs 43;" f