aboutsummaryrefslogtreecommitdiff
path: root/internal/game/utils.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-18 02:34:56 -0400
committerhistoria <[not public]>2026-06-18 02:34:56 -0400
commitfae979b75e37b6ad57e57062a1b637a37ec87174 (patch)
tree53daaa52b5f844b5b1a50a1bad909cafdb63eabc /internal/game/utils.go
parent1a9a486ca57f4de4fd1d8f00ee1a2a421f9d2273 (diff)
downloadthehouseoficarus-fae979b75e37b6ad57e57062a1b637a37ec87174.tar.gz
cleaned up various crafting menus
Diffstat (limited to 'internal/game/utils.go')
-rw-r--r--internal/game/utils.go14
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