diff options
| author | historia <[not public]> | 2026-07-09 22:15:54 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-09 22:15:54 -0400 |
| commit | ecba7f726f70b37126d852c38c7e3eec7b04d730 (patch) | |
| tree | 9129215c6e5015336fde1116395336d82bb952d1 /internal/game/core_flags.go | |
| parent | b3d4c616f59ad2519f3a0b77e3b47d6571cd2486 (diff) | |
| download | thehouseoficarus-ecba7f726f70b37126d852c38c7e3eec7b04d730.tar.gz | |
feat: old standalone trigger systems completely unified into trigger->condition->action system
Diffstat (limited to 'internal/game/core_flags.go')
| -rw-r--r-- | internal/game/core_flags.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/internal/game/core_flags.go b/internal/game/core_flags.go index c78f3c3..dbde5d7 100644 --- a/internal/game/core_flags.go +++ b/internal/game/core_flags.go @@ -41,20 +41,10 @@ func (g *Game) setPlayerFlag(p *player.Player, key string, val any) { old, existed := p.Flags[key] p.Flags[key] = val if !existed || !engine.ValuesEqual(old, val) { - g.firePlayerFlagTrigger(p, key, val) + g.firePlayerFlagTriggers(p, key, val) } } -func (g *Game) firePlayerFlagTrigger(p *player.Player, flagName string, flagValue any) { - g.charsMu.Lock() - sess := g.loggedInChars[p.Name] - g.charsMu.Unlock() - if sess == nil { - return - } - g.TriggerStore.FirePlayerInRoom(p.Name, p.RoomID, flagName, flagValue) -} - func intFromFlag(flags map[string]any, key string) int { val, ok := flags[key] if !ok { |
