From 8ee8982b8759bcae116647cc993867f4c8b0a6ce Mon Sep 17 00:00:00 2001 From: workhorse Date: Fri, 19 Jun 2026 20:24:52 -0400 Subject: reorganized items, objects, and rooms in directories. oranized module names. added startup checks. --- internal/game/cmd_drop.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'internal/game/cmd_drop.go') diff --git a/internal/game/cmd_drop.go b/internal/game/cmd_drop.go index d3141e3..551b014 100644 --- a/internal/game/cmd_drop.go +++ b/internal/game/cmd_drop.go @@ -180,6 +180,20 @@ func (g *Game) doDrop(sess *net.Session, input string) { } } +func (g *Game) executeDrop(sess *net.Session, args []string, rawInput string) { + if len(args) == 0 { + sess.WriteLine("Drop what?") + } else if args[0] == "all" { + if len(args) == 1 { + g.doDropAll(sess) + } else { + g.doDropAllNamed(sess, strings.Join(args[1:], " ")) + } + } else { + g.doDrop(sess, strings.Join(args, " ")) + } +} + func (g *Game) handleDropAllConfirm(sess *net.Session, input string) { p := sess.Player if p == nil { -- cgit v1.2.3