From fae979b75e37b6ad57e57062a1b637a37ec87174 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 18 Jun 2026 02:34:56 -0400 Subject: cleaned up various crafting menus --- internal/game/utils.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'internal/game/utils.go') diff --git a/internal/game/utils.go b/internal/game/utils.go index 2379fc2..55e48c6 100644 --- a/internal/game/utils.go +++ b/internal/game/utils.go @@ -60,6 +60,20 @@ func uniqueItemNames(matches []itemMatch) []string { return out } +func (g *Game) showWhichOne(sess *net.Session, matches []itemMatch) { + sess.WriteLine("Which one?") + seen := make(map[string]bool) + for _, m := range matches { + if seen[m.Name] { + continue + } + seen[m.Name] = true + def, _ := g.ItemStore.Load(m.ID) + coloredName := g.itemColorize(sess, def, m.Name) + sess.WriteLine(fmt.Sprintf(" - %s", coloredName)) + } +} + func randInt(max int) int { if max <= 0 { return 0 -- cgit v1.2.3