aboutsummaryrefslogtreecommitdiff
path: root/internal/game/production_index.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:05:14 -0400
committerhistoria <[not public]>2026-10-05 17:05:14 -0400
commite42952469dadfb3535633c66c881050ac128703c (patch)
treea78f7396b72cdbd6fa4f6c454c830f40cf2ad0cb /internal/game/production_index.go
parent90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (diff)
downloadthehouseoficarus-e42952469dadfb3535633c66c881050ac128703c.tar.gz
fix: gather verbs, walk oom, admin path bypass, roulette refund
Diffstat (limited to 'internal/game/production_index.go')
-rw-r--r--internal/game/production_index.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/game/production_index.go b/internal/game/production_index.go
index 22e944e..4ded387 100644
--- a/internal/game/production_index.go
+++ b/internal/game/production_index.go
@@ -229,6 +229,12 @@ func planIngredients(c *item.CraftDef, countItem func(string) int) []consumption
if c == nil {
return nil
}
+ // A craft with no ingredient entries is not "always satisfied": it would
+ // consume nothing and loop forever producing output. Treat it as
+ // unsatisfiable; the validator also rejects it.
+ if len(c.Ingredients) == 0 {
+ return nil
+ }
reserved := make(map[string]int, len(c.Ingredients))
plan := make([]consumption, 0, len(c.Ingredients))
for i := range c.Ingredients {