From e4400c5f1e84c18d2126f2cb502ae10685977cbb Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 20 Jun 2026 03:20:01 -0400 Subject: refactor: combined all station crafting --- internal/game/cmd_get.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'internal/game/cmd_get.go') diff --git a/internal/game/cmd_get.go b/internal/game/cmd_get.go index f3485fe..30bc8c2 100644 --- a/internal/game/cmd_get.go +++ b/internal/game/cmd_get.go @@ -77,7 +77,7 @@ func (g *Game) doGet(sess *net.Session, input string) { for i := 0; i < 28; i++ { slot := p.InvSlot(i) if slot != nil && slot.ItemID == itemID { - if _, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, qty, p.Name); !ok { + if _, ok := g.World.RemoveReservedItem(p.RoomID, itemID, qty, p.Name); !ok { sess.WriteLine("That's not yours!") return } @@ -92,7 +92,7 @@ func (g *Game) doGet(sess *net.Session, input string) { sess.WriteLine("Your inventory is full.") return } - if _, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, qty, p.Name); !ok { + if _, ok := g.World.RemoveReservedItem(p.RoomID, itemID, qty, p.Name); !ok { sess.WriteLine("That's not yours!") return } @@ -112,7 +112,7 @@ func (g *Game) doGet(sess *net.Session, input string) { if fs == -1 { break } - if _, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, 1, p.Name); !ok { + if _, ok := g.World.RemoveReservedItem(p.RoomID, itemID, 1, p.Name); !ok { break } p.SetInvSlot(fs, &player.InventorySlot{ItemID: itemID, Quantity: 1}) @@ -193,7 +193,7 @@ func (g *Game) doGetAllNamed(sess *net.Session, input string) { for i := 0; i < 28; i++ { slot := p.InvSlot(i) if slot != nil && slot.ItemID == itemID { - removed, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, wanted, p.Name) + removed, ok := g.World.RemoveReservedItem(p.RoomID, itemID, wanted, p.Name) if !ok { sess.WriteLine("That's not yours!") return @@ -209,7 +209,7 @@ func (g *Game) doGetAllNamed(sess *net.Session, input string) { sess.WriteLine("Your inventory is full.") return } - removed, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, wanted, p.Name) + removed, ok := g.World.RemoveReservedItem(p.RoomID, itemID, wanted, p.Name) if !ok { sess.WriteLine("That's not yours!") return @@ -230,7 +230,7 @@ func (g *Game) doGetAllNamed(sess *net.Session, input string) { if fs == -1 { break } - _, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, 1, p.Name) + _, ok := g.World.RemoveReservedItem(p.RoomID, itemID, 1, p.Name) if !ok { break } @@ -266,7 +266,7 @@ func (g *Game) doGetAll(sess *net.Session) { continue } if itemID == "credits" { - taken, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, 999999, p.Name) + taken, ok := g.World.RemoveReservedItem(p.RoomID, itemID, 999999, p.Name) if !ok { continue } @@ -286,7 +286,7 @@ func (g *Game) doGetAll(sess *net.Session) { for i := 0; i < 28; i++ { slot := p.InvSlot(i) if slot != nil && slot.ItemID == itemID { - _, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, qty, p.Name) + _, ok := g.World.RemoveReservedItem(p.RoomID, itemID, qty, p.Name) if !ok { qty = 0 stacked = true @@ -313,7 +313,7 @@ func (g *Game) doGetAll(sess *net.Session) { g.AccountStore.SaveCharacter(p) return } - _, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, qty, p.Name) + _, ok := g.World.RemoveReservedItem(p.RoomID, itemID, qty, p.Name) if !ok { break } @@ -339,7 +339,7 @@ func (g *Game) doGetAll(sess *net.Session) { } take := 1 - _, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, take, p.Name) + _, ok := g.World.RemoveReservedItem(p.RoomID, itemID, take, p.Name) if !ok { break } @@ -364,7 +364,7 @@ func (g *Game) doGetAll(sess *net.Session) { } func (g *Game) pickupCredits(sess *net.Session, p *player.Player, itemID string) { - qty, ok := g.World.RemoveReservedGroundItem(p.RoomID, itemID, 999999, p.Name) + qty, ok := g.World.RemoveReservedItem(p.RoomID, itemID, 999999, p.Name) if !ok { sess.WriteLine("That's not yours!") return -- cgit v1.2.3