From 2f34e75f27e5f99cfc1c5f8eaf6ab4ff2fddb1d9 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 16 Sep 2026 14:09:22 -0400 Subject: fix: reserved-loot pickup, credit pickup, payout recovery, and slot stake/bonus shutdown handling --- internal/game/cmd_get.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'internal/game/cmd_get.go') diff --git a/internal/game/cmd_get.go b/internal/game/cmd_get.go index 515d2ab..7a5181f 100644 --- a/internal/game/cmd_get.go +++ b/internal/game/cmd_get.go @@ -270,8 +270,10 @@ func (g *Game) doGetAll(sess *net.Session) { continue } if itemID == "credits" { - taken, ok := g.World.RemoveReservedItem(p.RoomID, itemID, 999999, p.Name) - if !ok { + // Same capped-removal rule as pickupCredits: the request is a + // sentinel above any possible stock, not an exact quantity. + taken := g.World.RemoveAvailableItem(p.RoomID, itemID, 999999, p.Name) + if taken <= 0 { continue } p.Credits += taken @@ -368,11 +370,11 @@ func (g *Game) doGetAll(sess *net.Session) { } func (g *Game) pickupCredits(sess *net.Session, p *player.Player, itemID string) { - qty, ok := g.World.RemoveReservedItem(p.RoomID, itemID, 999999, p.Name) - if !ok { - sess.WriteLine("That's not yours!") - return - } + // Take whatever credits are accessible: a sentinel quantity far above + // any possible stock. RemoveReservedItem is all-or-nothing and would + // reject a request larger than the stack; RemoveAvailableItem caps the + // removal at what is actually on the ground. + qty := g.World.RemoveAvailableItem(p.RoomID, itemID, 999999, p.Name) if qty <= 0 { return } -- cgit v1.2.3