aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_stop.go
diff options
context:
space:
mode:
authorhistoria <workhorse@localhost.localdomain>2026-06-20 21:36:32 -0400
committerhistoria <workhorse@localhost.localdomain>2026-06-20 21:36:32 -0400
commit010fa439399581391fcd509d2058191ff4fa74b3 (patch)
tree2deb54f5b2724e34091e6fb97390e6958f973561 /internal/game/cmd_stop.go
parent00a0622dcb5eae90b4ec14ed16c527b81f963c3f (diff)
downloadthehouseoficarus-010fa439399581391fcd509d2058191ff4fa74b3.tar.gz
feat: stop command added
Diffstat (limited to 'internal/game/cmd_stop.go')
-rw-r--r--internal/game/cmd_stop.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/game/cmd_stop.go b/internal/game/cmd_stop.go
new file mode 100644
index 0000000..0db0ac2
--- /dev/null
+++ b/internal/game/cmd_stop.go
@@ -0,0 +1,18 @@
+package game
+
+import (
+ "thehouseoficarus/internal/net"
+)
+
+func (g *Game) executeStop(sess *net.Session, args []string, rawInput string) {
+ p := sess.Player
+ as, ok := p.ActionState.(*ActionState)
+ if !ok || as == nil || as.Type == "" {
+ sess.WriteLine("You're not doing anything.")
+ return
+ }
+ g.cancelAction(p)
+ g.cancelBgAction(p)
+ delete(g.activeQueue, p.Name)
+ sess.WriteLine("You stop what you were doing.")
+}