aboutsummaryrefslogtreecommitdiff
path: root/internal/game/core_flagstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/core_flagstore.go')
-rw-r--r--internal/game/core_flagstore.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/internal/game/core_flagstore.go b/internal/game/core_flagstore.go
index 18578b7..5dd8d00 100644
--- a/internal/game/core_flagstore.go
+++ b/internal/game/core_flagstore.go
@@ -1,6 +1,10 @@
package game
-import "sync"
+import (
+ "sync"
+
+ "thehouseoficarus/internal/engine"
+)
// GlobalFlagChangeCallback is invoked when a global flag value actually changes
// (old value differs from new, or new flag is created with a truthy value).
@@ -39,7 +43,7 @@ func (f *GlobalFlagStore) Set(name string, value any) {
cbs := f.callbacks
f.mu.Unlock()
- if !existed || !valuesEqual(old, value) {
+ if !existed || !engine.ValuesEqual(old, value) {
for _, cb := range cbs {
cb(name, value)
}
@@ -52,7 +56,7 @@ func (f *GlobalFlagStore) SetAll(m map[string]any) {
for k, v := range m {
old, existed := f.flags[k]
f.flags[k] = v
- if !existed || !valuesEqual(old, v) {
+ if !existed || !engine.ValuesEqual(old, v) {
changed[k] = v
}
}