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/cmd_setflag.go | |
| parent | 3f30fa3eec9c2e2acf9a984ccefb9529a25e688a (diff) | |
| download | thehouseoficarus-ab2597b22ccdb71116992aec78080d9858358d04.tar.gz | |
rename flags to global_flags (differentiate from player_flags)
Diffstat (limited to 'internal/game/cmd_setflag.go')
| -rw-r--r-- | internal/game/cmd_setflag.go | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/internal/game/cmd_setflag.go b/internal/game/cmd_setflag.go deleted file mode 100644 index a18c635..0000000 --- a/internal/game/cmd_setflag.go +++ /dev/null @@ -1,38 +0,0 @@ -package game - -import ( - "fmt" - "strconv" - - "thehouseoficarus/internal/net" -) - -func (g *Game) executeSetFlag(sess *net.Session, args []string, rawInput string) { - if !g.checkAdmin(sess) { - sess.WriteLine("Unknown command.") - return - } - if len(args) == 0 { - sess.WriteLine("Usage: setflag <flag_name> [value]") - return - } - name := args[0] - var value any = true - if len(args) > 1 { - valStr := args[1] - switch valStr { - case "true": - value = true - case "false": - value = false - default: - if n, err := strconv.Atoi(valStr); err == nil { - value = n - } else { - value = valStr - } - } - } - g.Flags.Set(name, value) - sess.WriteLine(fmt.Sprintf("Flag '%s' set to %v.", name, value)) -} |
