aboutsummaryrefslogtreecommitdiff
path: root/internal/game/production_menu.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/production_menu.go')
-rw-r--r--internal/game/production_menu.go12
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)?: ")
}