From c705ae942573984784ef501bf8198f61f5206ddd Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 9 Jul 2026 05:27:10 -0400 Subject: refactor: simplify yaml, remove support for old scalar fields --- internal/game/core_flagstore.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'internal/game/core_flagstore.go') 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 } } -- cgit v1.2.3