Tweak posture
This commit is contained in:
@@ -4,6 +4,7 @@ module Dodge.Inventory.Location (
|
||||
setInvPosFromSS,
|
||||
) where
|
||||
|
||||
import Dodge.Item.AimStance
|
||||
import Control.Lens
|
||||
import Data.Foldable
|
||||
--import Data.IntMap.Merge.Strict
|
||||
@@ -104,10 +105,13 @@ setInvPosFromSS w = w
|
||||
( fmap (\k -> w ^?! cWorld . lWorld . items . ix k) $
|
||||
you w ^. crInv
|
||||
)
|
||||
dt <- invIMDT ((\k -> w ^?! cWorld . lWorld . items . ix k) <$> you w ^. crInv) ^? ix rootid
|
||||
-- there is redundancy above
|
||||
return
|
||||
SelectedItem
|
||||
{ _imSelectedItem = NInt j
|
||||
, _imRootSelectedItem = NInt rootid
|
||||
, _imAimStance = itemAimStance ((\(x,y,_) -> (x,y)) <$> dt)
|
||||
, _imAttachedItems = aset
|
||||
}
|
||||
1 -> Just SelNothing
|
||||
|
||||
Reference in New Issue
Block a user