aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_setflag.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/cmd_setflag.go
parent3f30fa3eec9c2e2acf9a984ccefb9529a25e688a (diff)
downloadthehouseoficarus-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.go38
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))
-}