diff options
| author | historia <[not public]> | 2026-07-07 16:24:27 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-07 16:24:27 -0400 |
| commit | ab2597b22ccdb71116992aec78080d9858358d04 (patch) | |
| tree | 8beae4060c2831c4a68f92b682b5350cfa1d0afb /internal/game/act_room.go | |
| parent | 3f30fa3eec9c2e2acf9a984ccefb9529a25e688a (diff) | |
| download | thehouseoficarus-ab2597b22ccdb71116992aec78080d9858358d04.tar.gz | |
rename flags to global_flags (differentiate from player_flags)
Diffstat (limited to 'internal/game/act_room.go')
| -rw-r--r-- | internal/game/act_room.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/game/act_room.go b/internal/game/act_room.go index ddca261..da74d6e 100644 --- a/internal/game/act_room.go +++ b/internal/game/act_room.go @@ -161,8 +161,8 @@ func (g *Game) fireEnterStep(seq *enterSeq, step world.EnterStep) { } } } - if len(step.SetFlags) > 0 || len(step.SetPlayerFlags) > 0 { - g.applyFlagMutations(p, step.SetFlags, step.SetPlayerFlags) + if len(step.SetGlobalFlags) > 0 || len(step.SetPlayerFlags) > 0 { + g.applyFlagMutations(p, step.SetGlobalFlags, step.SetPlayerFlags) g.AccountStore.SaveCharacter(p) } if step.SpawnMob != nil { @@ -229,10 +229,10 @@ func (g *Game) isCharLive(name string, sess *net.Session) bool { return g.loggedInChars[name] == sess } -// applyFlagMutations sets world and player flags, shared by on_enter steps and +// applyFlagMutations sets global and player flags, shared by on_enter steps and // exit traversal. -func (g *Game) applyFlagMutations(p *player.Player, setFlags, setPlayerFlags map[string]any) { - g.Flags.SetAll(setFlags) +func (g *Game) applyFlagMutations(p *player.Player, setGlobalFlags, setPlayerFlags map[string]any) { + g.GlobalFlags.SetAll(setGlobalFlags) if len(setPlayerFlags) > 0 { for k, v := range setPlayerFlags { g.setPlayerFlag(p, k, v) |
