diff options
| author | historia <[not public]> | 2026-09-18 16:13:49 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 16:13:49 -0400 |
| commit | 194164a77eb4f2479b94c19e6f0e1278ab608781 (patch) | |
| tree | 53413add8ed6f32a34d1733397e380cc98ef70ef /internal/game/production_engine.go | |
| parent | 67e01aab85607b9e601185c7d62dff576af3bb43 (diff) | |
| download | thehouseoficarus-194164a77eb4f2479b94c19e6f0e1278ab608781.tar.gz | |
fix: more casino, economy, gameplay, security, and world data hardening gaps
Diffstat (limited to 'internal/game/production_engine.go')
| -rw-r--r-- | internal/game/production_engine.go | 12 |
1 files changed, 10 insertions, 2 deletions
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] |
