diff options
| author | historia <[not public]> | 2026-07-09 05:27:10 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-09 05:27:10 -0400 |
| commit | c705ae942573984784ef501bf8198f61f5206ddd (patch) | |
| tree | c964066f3a244002bf75cb50a877630f46496f81 /internal/game/core_flagstore.go | |
| parent | 74153c7814fc4cef988066ef04e38731a943bc12 (diff) | |
| download | thehouseoficarus-c705ae942573984784ef501bf8198f61f5206ddd.tar.gz | |
refactor: simplify yaml, remove support for old scalar fields
Diffstat (limited to 'internal/game/core_flagstore.go')
| -rw-r--r-- | internal/game/core_flagstore.go | 10 |
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 } } |
