Distinguish between selected item and root-selected item
This commit is contained in:
@@ -4,6 +4,8 @@ module Dodge.Inventory.Add (
|
||||
createAndSelectItem,
|
||||
) where
|
||||
|
||||
import Dodge.Inventory.FindRoot
|
||||
--import Dodge.Item.Grammar
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Base.You
|
||||
@@ -47,7 +49,7 @@ createAndSelectItem itm w = case createPutItem itm w of
|
||||
w'
|
||||
& hud . hudElement . diSections . sssExtra . sssSelPos ?~ (0, i)
|
||||
& cWorld . lWorld . creatures . ix 0 . crManipulation . manObject
|
||||
.~ InInventory (SelItem i NoInvSelAction)
|
||||
.~ InInventory (SelectedItem i (getRootItemID i (you w)))
|
||||
(Nothing, w') -> w'
|
||||
|
||||
createPutItem :: Item -> World -> (Maybe Int, World)
|
||||
|
||||
Reference in New Issue
Block a user