avoid nil subgroups

This commit is contained in:
Brevven 2024-02-07 09:04:13 -08:00
parent 71b7c40fd4
commit c090985a08
3 changed files with 7 additions and 2 deletions

View file

@ -101,7 +101,7 @@ function make_recipe(recipe)
r.result_count = nil
r.enabled = false
r.category = recipe.category == "casting" and "casting" or "founding"
r.subgroup = data.raw.item[found_result].subgroup
r.subgroup = data.raw.item[found_result] and data.raw.item[found_result].subgroup or "foundry-intermediate"
icons = rusty_icons.of(data.raw.recipe[recipe.name])
table.insert(
icons,