Make updateInventoryPositioning fire less often

This commit is contained in:
2024-10-08 10:05:03 +01:00
parent 507c8e9819
commit 7783108515
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
All good (597 modules, at 22:32:07)
All good (597 modules, at 10:01:53)
+1 -1
View File
@@ -1,6 +1,6 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
--{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.DoubleTree
where
+2 -2
View File
@@ -102,12 +102,12 @@ setClickWorldPos u = fmap
updateWorldEventFlags :: Universe -> Universe
updateWorldEventFlags u =
(uvWorld . worldEventFlags .~ mempty)
. updateInventoryPositioning
$ foldr updateWorldEventFlag u (u ^. uvWorld . worldEventFlags)
updateWorldEventFlag :: WorldEventFlag -> Universe -> Universe
updateWorldEventFlag wef = case wef of
InventoryChange -> id -- TODO determine more precisely when the inventory does change
--InventoryChange -> id -- TODO determine more precisely when the inventory does change
InventoryChange -> updateInventoryPositioning
CombineInventoryChange -> updateCombinePositioning
maybeOpenTerminal :: Universe -> Universe