Change selection set to work for multiple sections

This commit is contained in:
2026-05-13 11:18:52 +01:00
parent e4bd971017
commit 91480c957d
14 changed files with 372 additions and 299 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ module Dodge.Inventory.Add (
pickUpItemAt,
) where
import Dodge.Data.SelectionList
import Linear
import qualified Data.IntSet as IS
import Control.Lens
@@ -44,7 +45,8 @@ tryPutItemInInv cid itid w = do
& cWorld . highlightItems . at itid ?~ 20
where
updateselectionextra i
| cid == 0 = (hud . diSelection . _Just . slSet %~ IS.map (f i))
-- | cid == 0 = (hud . diSelection . _Just . slSet %~ IS.map (f i))
| cid == 0 = (hud . diSections . ix 0 . ssSet %~ IS.map (f i))
. (hud . diSelection . _Just . slInt %~ f i)
| otherwise = id
f j i | i >= _unNInt j = i + 1