Update inventory every tick (for close objects)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
module Dodge.Inventory.CloseObject where
|
||||
module Dodge.Inventory.CloseObject (
|
||||
closeObjPos,
|
||||
closeObjEq,
|
||||
) where
|
||||
|
||||
import Dodge.Data.Button
|
||||
import Dodge.Data.FloorItem
|
||||
|
||||
+7
-2
@@ -101,12 +101,17 @@ setClickWorldPos u = fmap
|
||||
|
||||
updateWorldEventFlags :: Universe -> Universe
|
||||
updateWorldEventFlags u =
|
||||
(uvWorld . worldEventFlags .~ mempty)
|
||||
(uvWorld . worldEventFlags .~ mempty)
|
||||
-- for now update inventory positioning every tick
|
||||
. updateInventoryPositioning
|
||||
-- the question is how often to update the close objects section, and if
|
||||
-- this can be done independently of the other sections
|
||||
$ foldr updateWorldEventFlag u (u ^. uvWorld . worldEventFlags)
|
||||
|
||||
updateWorldEventFlag :: WorldEventFlag -> Universe -> Universe
|
||||
updateWorldEventFlag wef = case wef of
|
||||
InventoryChange -> updateInventoryPositioning
|
||||
InventoryChange -> id -- updateInventoryPositioning
|
||||
-- for now update inventory positioning every tick
|
||||
CombineInventoryChange -> updateCombinePositioning
|
||||
|
||||
maybeOpenTerminal :: Universe -> Universe
|
||||
|
||||
Reference in New Issue
Block a user