From 153acb7f644d755c45533b7c5311e3ffa47e8973 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 05:31:09 -0400 Subject: fix: harden engine across casino, economy, concurrency, security, and content --- internal/game/cmd_craft.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'internal/game/cmd_craft.go') diff --git a/internal/game/cmd_craft.go b/internal/game/cmd_craft.go index fe52511..a1e0c38 100644 --- a/internal/game/cmd_craft.go +++ b/internal/game/cmd_craft.go @@ -40,7 +40,7 @@ func (g *Game) doStationSkill(sess *net.Session, input string, recipeType string } if input != "" { - g.doWithInput(sess, p, filtered, input, skill, flagKey, label, verbCap) + g.doWithInput(sess, p, filtered, input, recipeType, skill, flagKey, label, verbCap) return } @@ -76,7 +76,7 @@ func (g *Game) doStationSkill(sess *net.Session, input string, recipeType string g.showProductionTable(sess, p, available, label, recipeType, flagKey, verbCap, false) } -func (g *Game) doWithInput(sess *net.Session, p *player.Player, items []*item.ItemDef, input string, skill player.SkillName, flagKey, label, verbCap string) { +func (g *Game) doWithInput(sess *net.Session, p *player.Player, items []*item.ItemDef, input, recipeType string, skill player.SkillName, flagKey, label, verbCap string) { qty, productName := parseQty(input) productName = strings.TrimSpace(productName) @@ -109,7 +109,11 @@ func (g *Game) doWithInput(sess *net.Session, p *player.Player, items []*item.It return } - g.showProductionTable(sess, p, available, label, label, flagKey, verbCap, false) + // The menu stores its skill as PendingSkill and handleProductChoice + // looks it up with player.SkillName: pass the recipe type ("crafting", + // "pharmacy", "construction"), exactly like the no-input path, never the + // capitalised display label (a map miss that resolves to level 1). + g.showProductionTable(sess, p, available, label, recipeType, flagKey, verbCap, false) } func (g *Game) itemVisible(p *player.Player, def *item.ItemDef) bool { -- cgit v1.2.3