From 194164a77eb4f2479b94c19e6f0e1278ab608781 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 16:13:49 -0400 Subject: fix: more casino, economy, gameplay, security, and world data hardening gaps --- internal/game/production_engine.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'internal/game/production_engine.go') diff --git a/internal/game/production_engine.go b/internal/game/production_engine.go index ddada6b..89d6f55 100644 --- a/internal/game/production_engine.go +++ b/internal/game/production_engine.go @@ -128,7 +128,15 @@ func (g *Game) startProductionFromItem(sess *net.Session, p *player.Player, item return } - if craft.Type == "combine" { + // Normalize the empty craft type to "combine" here as well as in the + // craft index: an omitted `type:` is combine, but the index's normalized + // key was never written back to the recipe, so the literal comparison + // below would fall through to the production path with an empty key. + craftType := craft.Type + if craftType == "" { + craftType = "combine" + } + if craftType == "combine" { g.startCombine(sess, p, item, craft, count) return } @@ -140,7 +148,7 @@ func (g *Game) startProductionFromItem(sess *net.Session, p *player.Player, item cKey := craft.Subtype if cKey == "" { - cKey = craft.Type + cKey = craftType } info, ok := productionTypes[cKey] -- cgit v1.2.3