From 4dfb899ecd9eefa1b37407d8ccabb19cf2a8d4ac Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 21 Feb 2025 22:25:59 -0800 Subject: [PATCH] fix crash when adding mods in vanilla --- changelog.txt | 5 +++++ control.lua | 2 ++ info.json | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 258fced..3f3a1af 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.1.7 +Date: 2025-02-22 + Fixes: + - Vanilla: Fix runtime crash when adding certain mods to existing game. +--------------------------------------------------------------------------------------------------- Version: 2.1.6 Date: 2025-02-10 Changes: diff --git a/control.lua b/control.lua index 2c95017..6466f0c 100644 --- a/control.lua +++ b/control.lua @@ -21,6 +21,8 @@ end script.on_event(defines.events.on_technology_effects_reset, update_recycling_on_reset) function update_recycling(force) + if not force.technologies["alloy-separation"] then return end -- Tech acts as marker for whether separation recipes exist + if not force.technologies["alloy-separation"].researched then -- In this case the player is probably trying to unresearch the tech, and we should fix -- recipes as would be expected in this case diff --git a/info.json b/info.json index fb822e5..6de4671 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztin", - "version": "2.1.6", + "version": "2.1.7", "factorio_version": "2.0", "title": "Tin", "author": "Brevven",