From 0b798c9c8200f598ab33c07f0c561207a003f663 Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 7 Jul 2026 03:31:53 +0200 Subject: [PATCH] Tidy pack.go split: drop unused lp param and named returns --- game/pack.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/game/pack.go b/game/pack.go index 234b853..cb86121 100644 --- a/game/pack.go +++ b/game/pack.go @@ -98,7 +98,7 @@ func (g *RogueGame) packInsert(obj *Object, fromFloor bool) (*Object, bool) { if op := p.Pack[i]; op.Kind == obj.Kind && op.Which == obj.Which { var ok bool - obj, lp, merged, ok = g.packMatch(obj, op, i, lp, fromFloor) + obj, lp, merged, ok = g.packMatch(obj, op, i, fromFloor) if !ok { return nil, false } @@ -156,7 +156,7 @@ func packScanWhich(pack []*Object, obj *Object, i, lp int) (int, int) { // anything else marks the insertion point (the matched-subtype switch // of pack.c add_pack). It returns the resulting entry, the insert-after // index, whether a merge happened, and ok false when the pack is full. -func (g *RogueGame) packMatch(obj, op *Object, i, lp int, fromFloor bool) (*Object, int, bool, bool) { +func (g *RogueGame) packMatch(obj, op *Object, i int, fromFloor bool) (*Object, int, bool, bool) { switch { case op.Kind.MergesInPack(): if !g.packRoom(fromFloor, obj) { @@ -393,8 +393,9 @@ func (g *RogueGame) pickyInven() { } // promptPackItem picks something out of a pack for a purpose (pack.c -// get_item); ok reports whether the player chose an item. -func (g *RogueGame) promptPackItem(purpose string, kind ObjectKind) (obj *Object, ok bool) { +// get_item); the second result reports whether the player chose an +// item. +func (g *RogueGame) promptPackItem(purpose string, kind ObjectKind) (*Object, bool) { p := &g.Player if len(p.Pack) == 0 { g.msg("you aren't carrying anything")