Change selection set to work for multiple sections
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user