aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-07 16:24:27 -0400
committerhistoria <[not public]>2026-07-07 16:24:27 -0400
commitab2597b22ccdb71116992aec78080d9858358d04 (patch)
tree8beae4060c2831c4a68f92b682b5350cfa1d0afb /internal/game/act.go
parent3f30fa3eec9c2e2acf9a984ccefb9529a25e688a (diff)
downloadthehouseoficarus-ab2597b22ccdb71116992aec78080d9858358d04.tar.gz
rename flags to global_flags (differentiate from player_flags)
Diffstat (limited to 'internal/game/act.go')
-rw-r--r--internal/game/act.go7
1 files changed, 4 insertions, 3 deletions
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