From 79049f891718c715a4950a596f5ab80f780cda68 Mon Sep 17 00:00:00 2001 From: Brevven Date: Tue, 24 May 2022 19:19:19 -0700 Subject: [PATCH] fix simple compress --- changelog.txt | 5 +++++ data-util.lua | 8 ++++---- info.json | 2 +- titanium-compressed.lua | 2 ++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 1808c60..0aaf36d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 1.0.9 +Date: 2022-05-25 + Features: + - Fix a breakage when used with simple compress mod. +--------------------------------------------------------------------------------------------------- Version: 1.0.8 Date: 2022-02-22 Features: diff --git a/data-util.lua b/data-util.lua index 84b7785..d700645 100644 --- a/data-util.lua +++ b/data-util.lua @@ -541,10 +541,10 @@ end -- Set recipe icons function util.set_item_icons(item_name, icons) - if data.raw.recipe[item_name] then - data.raw.recipe[item_name].icons = icons - data.raw.recipe[item_name].icon = nil - data.raw.recipe[item_name].icon_size = nil + if data.raw.item[item_name] then + data.raw.item[item_name].icons = icons + data.raw.item[item_name].icon = nil + data.raw.item[item_name].icon_size = nil end end diff --git a/info.json b/info.json index e96de63..53e7900 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "1.0.8", + "version": "1.0.9", "factorio_version": "1.1", "title": "Titanium", "author": "Brevven", diff --git a/titanium-compressed.lua b/titanium-compressed.lua index 9b13683..2437bee 100644 --- a/titanium-compressed.lua +++ b/titanium-compressed.lua @@ -1,3 +1,5 @@ +local util = require("data-util"); + if simpleCompress then if simpleCompress.ores then simpleCompress.currentSubgroup = "intermediate-product"