From 593aa98edb6a7a6041685720519349c328469fea Mon Sep 17 00:00:00 2001 From: Brevven Date: Tue, 24 Dec 2024 15:48:25 -0800 Subject: [PATCH] fix startup crash with Cerys and other mods --- changelog.txt | 5 +++++ info.json | 2 +- titanium-recipe-updates.lua | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6051024..01e8ba4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.2 +Date: 2024-12-24 + Fixes: + - Attempt fix for crash related to recipe results without names. +--------------------------------------------------------------------------------------------------- Version: 2.0.1 Date: 2024-12-24 Fixes: diff --git a/info.json b/info.json index 5fc8b0a..001a946 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "2.0.1", + "version": "2.0.2", "factorio_version": "2.0", "title": "Titanium", "author": "Brevven", diff --git a/titanium-recipe-updates.lua b/titanium-recipe-updates.lua index ac0c64f..00e0d37 100644 --- a/titanium-recipe-updates.lua +++ b/titanium-recipe-updates.lua @@ -41,7 +41,7 @@ if (not mods["bobplates"]) then -- All equipment that uses steel now uses titanium. Who wants to carry around steel! for name, recipe in pairs(data.raw.recipe) do - if recipe.results and recipe.results[1] and recipe.results[1].name:find("equipment") then + if recipe.results and recipe.results[1] and recipe.results[1].name and recipe.results[1].name:find("equipment") then util.replace_ingredient(recipe.name, "steel-plate", util.me.titanium_plate) end end