aboutsummaryrefslogtreecommitdiff
path: root/internal/game/core_flags.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-09 05:27:10 -0400
committerhistoria <[not public]>2026-07-09 05:27:10 -0400
commitc705ae942573984784ef501bf8198f61f5206ddd (patch)
treec964066f3a244002bf75cb50a877630f46496f81 /internal/game/core_flags.go
parent74153c7814fc4cef988066ef04e38731a943bc12 (diff)
downloadthehouseoficarus-c705ae942573984784ef501bf8198f61f5206ddd.tar.gz
refactor: simplify yaml, remove support for old scalar fields
Diffstat (limited to 'internal/game/core_flags.go')
-rw-r--r--internal/game/core_flags.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/game/core_flags.go b/internal/game/core_flags.go
index 5e1c812..c78f3c3 100644
--- a/internal/game/core_flags.go
+++ b/internal/game/core_flags.go
@@ -1,6 +1,9 @@
package game
-import "thehouseoficarus/internal/player"
+import (
+ "thehouseoficarus/internal/engine"
+ "thehouseoficarus/internal/player"
+)
func getPlayerFlagInt(p *player.Player, key string) int {
if p.Flags == nil {
@@ -37,7 +40,7 @@ func (g *Game) setPlayerFlag(p *player.Player, key string, val any) {
p.EnsureFlags()
old, existed := p.Flags[key]
p.Flags[key] = val
- if !existed || !valuesEqual(old, val) {
+ if !existed || !engine.ValuesEqual(old, val) {
g.firePlayerFlagTrigger(p, key, val)
}
}