diff --git a/changelog.txt b/changelog.txt index aaa4077..198325d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.2.0 +Date: 2022-06-26 + Features: + - Beta support for 248k. Carbon fiber uses graphite. More changes to come. +--------------------------------------------------------------------------------------------------- Version: 0.1.10 Date: 2022-06-09 Changes: diff --git a/compatibility/248k.lua b/compatibility/248k.lua new file mode 100644 index 0000000..a7ec7cb --- /dev/null +++ b/compatibility/248k.lua @@ -0,0 +1,4 @@ +local util = require("__bzcarbon__.data-util"); + +util.remove_ingredient("fu_carbon_fiber_recipe", "fi_crushed_coal_item") +util.add_ingredient("fu_carbon_fiber_recipe", "graphite", 3) diff --git a/data-updates.lua b/data-updates.lua index ec57df8..c8bec7f 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -2,6 +2,7 @@ require("carbon-recipe-updates") require("map-gen-preset-updates") require("carbon-matter") require("strange-matter") +require("compatibility/248k") require("carbon-recipe-modules") -- Should be last import, need in both updates and final-fixes -- require("omni") diff --git a/data-util.lua b/data-util.lua index 6ce0745..1dc5fef 100644 --- a/data-util.lua +++ b/data-util.lua @@ -457,14 +457,19 @@ function util.replace_product(recipe_name, old, new) end function replace_product(recipe, old, new) - if recipe ~= nil and recipe.results ~= nil then + if recipe then + if recipe.main_product == old then + recipe.main_product = new + end if recipe.result == old then - recipe.results = new + recipe.result = new return end - for i, result in pairs(recipe.results) do - if result.name == old then result.name = new end - if result[1] == old then result[1] = new end + if recipe.results then + for i, result in pairs(recipe.results) do + if result.name == old then result.name = new end + if result[1] == old then result[1] = new end + end end end end diff --git a/info.json b/info.json index 18258ee..e93de82 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzcarbon", - "version": "0.1.10", + "version": "0.2.0", "factorio_version": "1.1", "title": "Graphite & Diamonds", "author": "Brevven", @@ -14,6 +14,7 @@ "? space-exploration", "? aai-industry", "? Krastorio2", + "? 248k", "? deadlock-beltboxes-loaders", "? DeadlockCrating" ],