From ab2597b22ccdb71116992aec78080d9858358d04 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 7 Jul 2026 16:24:27 -0400 Subject: rename flags to global_flags (differentiate from player_flags) --- internal/game/act.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/game/act.go') diff --git a/internal/game/act.go b/internal/game/act.go index f2ea121..ddeed04 100644 --- a/internal/game/act.go +++ b/internal/game/act.go @@ -297,8 +297,8 @@ func (g *Game) checkCondition(sess *net.Session, c *behavior.Condition) bool { return flagMatches(present, val, c.Value, c.Not) } - if c.Flag != "" { - val, present := g.Flags.Get(c.Flag) + if c.GlobalFlag != "" { + val, present := g.GlobalFlags.Get(c.GlobalFlag) return flagMatches(present, val, c.Value, c.Not) } if c.HasItem != "" { @@ -318,7 +318,8 @@ func (g *Game) checkCondition(sess *net.Session, c *behavior.Condition) bool { return true } -// flagMatches evaluates a flag/player_flag condition. +// flagMatches evaluates a global_flag/player_flag condition. The name is +// historical; it evaluates both flag types. // // If the condition specifies no `value`, the flag matches when it is present // and truthy (so `{player_flag: x}` means "x is set" and -- cgit v1.2.3