aboutsummaryrefslogtreecommitdiff
path: root/internal/game/production_menu.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 19:30:49 -0400
committerhistoria <[not public]>2026-10-05 19:30:49 -0400
commita5447965e7808d656a5e5d9326a9ca0231148f85 (patch)
tree618d46ccf2119658d0a6cc9e7b7a27fd75c0fee0 /internal/game/production_menu.go
parent1091d0fae96d152c11aec1bb2dd949f51ed5aa1e (diff)
downloadthehouseoficarus-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.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)?: ")
}