Add newtype to floor item ids
This commit is contained in:
@@ -13,6 +13,7 @@ module Dodge.Inventory (
|
||||
module Dodge.Inventory.RBList
|
||||
) where
|
||||
|
||||
import NewInt
|
||||
import Dodge.Inventory.Location
|
||||
import Dodge.Inventory.RBList
|
||||
import Control.Applicative
|
||||
@@ -195,10 +196,12 @@ updateCloseObjects w =
|
||||
. filter ((/=) BtNoLabel . _btState)
|
||||
. IM.elems
|
||||
$ w ^. cWorld . lWorld . buttons
|
||||
currentClose = filt $ map Left (IM.elems $ w ^. cWorld . lWorld . floorItems) ++ activeButtons
|
||||
currentClose = filt $ map Left (IM.elems $ w ^. cWorld . lWorld . floorItems . unNIntMap)
|
||||
++ activeButtons
|
||||
oldClose = filt $ mapMaybe updatebyid $ w ^. hud . closeObjects
|
||||
oldCloseFiltered = intersectBy closeObjEq oldClose currentClose
|
||||
updatebyid (Left flid) = fmap Left $ w ^? cWorld . lWorld . floorItems . ix (_flItID flid)
|
||||
updatebyid (Left flid) = fmap Left $ w ^? cWorld . lWorld . floorItems . unNIntMap
|
||||
. ix (_unNInt $ _flItID flid)
|
||||
updatebyid (Right btid) = fmap Right $ w ^? cWorld . lWorld . buttons . ix (_btID btid)
|
||||
|
||||
changeSwapSel :: Int -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user