From 010fa439399581391fcd509d2058191ff4fa74b3 Mon Sep 17 00:00:00 2001 From: historia Date: Sat, 20 Jun 2026 21:36:32 -0400 Subject: feat: stop command added --- internal/game/cmd_stop.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 internal/game/cmd_stop.go (limited to 'internal/game/cmd_stop.go') 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.") +} -- cgit v1.2.3