From 0ea4eec5dd2122c6704216971eb1249276297867 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 19 Jun 2026 18:20:26 -0400 Subject: shop fixes, 'toggle' completely removed, movement speed increased --- internal/game/cmd_drop.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'internal/game/cmd_drop.go') diff --git a/internal/game/cmd_drop.go b/internal/game/cmd_drop.go index 1fd99b4..d3141e3 100644 --- a/internal/game/cmd_drop.go +++ b/internal/game/cmd_drop.go @@ -5,12 +5,11 @@ import ( "strings" "thehouseoficarus/internal/net" - "thehouseoficarus/internal/player" ) func (g *Game) doDropAll(sess *net.Session) { - p := sess.Player.(*player.Player) - g.CancelAction(p) + p := sess.Player + g.cancelAction(p) p.ActionState = &ActionState{Type: ActionDropping, TargetName: "inventory"} count := 0 @@ -28,8 +27,8 @@ func (g *Game) doDropAll(sess *net.Session) { } func (g *Game) doDropAllNamed(sess *net.Session, input string) { - p := sess.Player.(*player.Player) - g.CancelAction(p) + p := sess.Player + g.cancelAction(p) matches := g.findInventoryMatches(input, p) if len(matches) == 0 { @@ -86,8 +85,8 @@ func (g *Game) doDropAllNamed(sess *net.Session, input string) { } func (g *Game) doDrop(sess *net.Session, input string) { - p := sess.Player.(*player.Player) - g.CancelAction(p) + p := sess.Player + g.cancelAction(p) qty, itemName := parseQty(input) @@ -182,14 +181,14 @@ func (g *Game) doDrop(sess *net.Session, input string) { } func (g *Game) handleDropAllConfirm(sess *net.Session, input string) { - p, ok := sess.Player.(*player.Player) - if !ok { + p := sess.Player + if p == nil { sess.State = net.StateGame g.writePrompt(sess) return } - g.CancelAction(p) + g.cancelAction(p) input = strings.TrimSpace(strings.ToLower(input)) if input != "y" && input != "yes" { sess.State = net.StateGame -- cgit v1.2.3