diff options
| author | historia <[not public]> | 2026-06-19 18:20:26 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-19 18:20:26 -0400 |
| commit | 0ea4eec5dd2122c6704216971eb1249276297867 (patch) | |
| tree | 430fbbef04e837820f1d031c190f52ecd6112e25 /internal/game/action_toggle.go | |
| parent | 3a58125d14bb307f861b38c6c5b0a63babde7e08 (diff) | |
| download | thehouseoficarus-0ea4eec5dd2122c6704216971eb1249276297867.tar.gz | |
shop fixes, 'toggle' completely removed, movement speed increased
Diffstat (limited to 'internal/game/action_toggle.go')
| -rw-r--r-- | internal/game/action_toggle.go | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/internal/game/action_toggle.go b/internal/game/action_toggle.go deleted file mode 100644 index db7a199..0000000 --- a/internal/game/action_toggle.go +++ /dev/null @@ -1,48 +0,0 @@ -package game - -import ( - "fmt" - - "thehouseoficarus/internal/net" - "thehouseoficarus/internal/object" - "thehouseoficarus/internal/player" -) - -func (g *Game) startToggle(sess *net.Session, p *player.Player, obj *object.ObjectDef) { - cfg, err := g.BehaviorStore.LoadToggle(obj.BehaviorID) - if err != nil { - sess.WriteLine("Nothing happens.") - return - } - - if cfg.Check != nil { - val, ok := g.WorldFlags[cfg.Check.Flag] - if cfg.Check.Not { - if ok && val == cfg.Check.Value { - sess.WriteLine("Nothing happens.") - return - } - } else { - if !ok || val != cfg.Check.Value { - sess.WriteLine("Nothing happens.") - return - } - } - } - - for flag, val := range cfg.SetFlags { - g.WorldFlags[flag] = val - } - - p.ActionState = &ActionState{Type: ActionToggling, TargetName: obj.Name} - - sess.WriteLine(fmt.Sprintf("\n%s", cfg.Message)) - - if g.Hub != nil { - for _, other := range g.Hub.PlayersInRoom(p.RoomID) { - if other != sess && other.Player != nil { - other.WriteLine(g.colorize(other, "broadcast", fmt.Sprintf("\n%s uses the %s.", p.Name, obj.Name))) - } - } - } -} |
