diff options
| author | historia <[not public]> | 2026-10-05 19:30:49 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-05 19:30:49 -0400 |
| commit | a5447965e7808d656a5e5d9326a9ca0231148f85 (patch) | |
| tree | 618d46ccf2119658d0a6cc9e7b7a27fd75c0fee0 /internal/game/production_menu.go | |
| parent | 1091d0fae96d152c11aec1bb2dd949f51ed5aa1e (diff) | |
| download | thehouseoficarus-a5447965e7808d656a5e5d9326a9ca0231148f85.tar.gz | |
feat: sym-link containment, batch count prompt for crafting
Diffstat (limited to 'internal/game/production_menu.go')
| -rw-r--r-- | internal/game/production_menu.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/game/production_menu.go b/internal/game/production_menu.go index 5d712da..ad44853 100644 --- a/internal/game/production_menu.go +++ b/internal/game/production_menu.go @@ -290,6 +290,18 @@ func itemIDs(defs []*item.ItemDef) []string { func (g *Game) promptHowMany(sess *net.Session, itemID string) { sess.PendingItemID = itemID sess.SetState(net.StateHowMany) + yield := 1 + if item := g.loadCraftItem(itemID); item != nil { + if c := g.usableCraft(sess.Player, item); c != nil && c.OutputQty > 0 { + yield = c.OutputQty + } + } + // The count is batches, not units: say so and show the per-batch yield so + // "15" cannot silently mean 225 arrow shafts. + if yield > 1 { + sess.Write(fmt.Sprintf("How many batches (each makes %d, return for all)?: ", yield)) + return + } sess.Write("How many (return for all)?: ") } |
