Cleanup inventory management, tweak dragging start
This commit is contained in:
@@ -20,16 +20,13 @@ you w = w ^?! cWorld . lWorld . creatures . ix 0
|
||||
yourSelectedItem :: World -> Maybe Item
|
||||
yourSelectedItem w = do
|
||||
Sel 0 i <- w ^? hud . diSelection . _Just
|
||||
--revise2 i <- you w ^? crManipulation . manObject . imSelectedItem
|
||||
--revise1 i <- you w ^? crManipulation . manObject . imSelectedItem
|
||||
j <- _crInv (you w) ^? ix (NInt i)
|
||||
j <- w ^? cWorld . lWorld . creatures . ix 0 . crInv . ix (NInt i)
|
||||
w ^? cWorld . lWorld . items . ix j
|
||||
|
||||
yourRootItem :: World -> Maybe Item
|
||||
yourRootItem w = do
|
||||
i <- w ^? hud . manObject . hiRootSelectedItem
|
||||
--revise1 i <- you w ^? crManipulation . manObject . imRootSelectedItem
|
||||
j <- _crInv (you w) ^? ix i
|
||||
j <- w ^? cWorld . lWorld . creatures . ix 0 . crInv . ix i
|
||||
w ^? cWorld . lWorld . items . ix j
|
||||
|
||||
yourRootItemDT :: World -> Maybe (DTree OItem)
|
||||
|
||||
Reference in New Issue
Block a user