diff options
| author | historia <[not public]> | 2026-06-18 02:34:56 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-18 02:34:56 -0400 |
| commit | fae979b75e37b6ad57e57062a1b637a37ec87174 (patch) | |
| tree | 53daaa52b5f844b5b1a50a1bad909cafdb63eabc /internal/game/utils.go | |
| parent | 1a9a486ca57f4de4fd1d8f00ee1a2a421f9d2273 (diff) | |
| download | thehouseoficarus-fae979b75e37b6ad57e57062a1b637a37ec87174.tar.gz | |
cleaned up various crafting menus
Diffstat (limited to 'internal/game/utils.go')
| -rw-r--r-- | internal/game/utils.go | 14 |
1 files changed, 14 insertions, 0 deletions
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 |
