From c090985a08d9006127c3f8c8dddcea593579ac8e Mon Sep 17 00:00:00 2001 From: Brevven Date: Wed, 7 Feb 2024 09:04:13 -0800 Subject: [PATCH] avoid nil subgroups --- changelog.txt | 5 +++++ info.json | 2 +- refractory-updates.lua | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index fa3bc0f..1b1200e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.2.14 +Date: 2024-02-07 + Fixes: + - Attempt to fix a rare compatibility issue related to indexing nil value +--------------------------------------------------------------------------------------------------- Version: 0.2.13 Date: 2023-12-28 Changes: diff --git a/info.json b/info.json index 306d5c8..3e2e334 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzfoundry", - "version": "0.2.13", + "version": "0.2.14", "factorio_version": "1.1", "title": "Foundry", "author": "Brevven", diff --git a/refractory-updates.lua b/refractory-updates.lua index ddc17cf..b812992 100644 --- a/refractory-updates.lua +++ b/refractory-updates.lua @@ -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,