From 9a7def9500fbedaf87f26cc8c0e2e937762f3e97 Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 5 Nov 2021 22:33:37 -0700 Subject: [PATCH] k2 beta comp --- changelog.txt | 5 +++++ data-util.lua | 7 +++++++ info.json | 2 +- lead-matter.lua | 3 ++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 1258676..3429e00 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.6.0 +Date: 2021-11-06 + Changes: + - K2: Compatible with beta +--------------------------------------------------------------------------------------------------- Version: 0.5.9 Date: 2021-10-11 Fixes: diff --git a/data-util.lua b/data-util.lua index e6e7451..03359d2 100644 --- a/data-util.lua +++ b/data-util.lua @@ -22,6 +22,13 @@ function util.get_stack_size(default) return default end +function util.k2assets() + if mods["Krastorio2Assets"] then + return "__Krastorio2Assets__" + end + return "__Krastorio2__/graphics" +end + -- check if a table contains a sought value function util.contains(table, sought) for i, value in pairs(table) do diff --git a/info.json b/info.json index f47bd2d..25997fb 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzlead", - "version": "0.5.9", + "version": "0.6.0", "factorio_version": "1.1", "title": "Lead", "author": "Brevven", diff --git a/lead-matter.lua b/lead-matter.lua index 14e87a1..19b544d 100644 --- a/lead-matter.lua +++ b/lead-matter.lua @@ -1,5 +1,6 @@ -- Matter recipes for Krastorio2 if mods["Krastorio2"] then +local util = require("__bzlead__.data-util"); local matter = require("__Krastorio2__/lib/public/data-stages/matter-util") data:extend( @@ -10,7 +11,7 @@ data:extend( icons = { { - icon = "__Krastorio2__/graphics/technologies/matter-stone.png", + icon = util.k2assets().."/technologies/matter-stone.png", icon_size = 256, }, {