diff options
Diffstat (limited to 'internal/game/cmd_stop.go')
| -rw-r--r-- | internal/game/cmd_stop.go | 18 |
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.") +} |
