From 7783108515afc518d532b52949462a074e29757a Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 8 Oct 2024 10:05:03 +0100 Subject: [PATCH] Make updateInventoryPositioning fire less often --- ghcidOutput | 2 +- src/Dodge/Data/DoubleTree.hs | 2 +- src/Dodge/Update.hs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ghcidOutput b/ghcidOutput index d17983443..ce84523ae 100644 --- a/ghcidOutput +++ b/ghcidOutput @@ -1 +1 @@ -All good (597 modules, at 22:32:07) +All good (597 modules, at 10:01:53) diff --git a/src/Dodge/Data/DoubleTree.hs b/src/Dodge/Data/DoubleTree.hs index d0ee3282d..b61f3fdbc 100644 --- a/src/Dodge/Data/DoubleTree.hs +++ b/src/Dodge/Data/DoubleTree.hs @@ -1,6 +1,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE StrictData #-} +--{-# LANGUAGE StrictData #-} {-# LANGUAGE TemplateHaskell #-} module Dodge.Data.DoubleTree where diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index 37de99b3d..bfb4c9a77 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -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