diff --git a/changelog.txt b/changelog.txt index ad69d6a..98904f3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.1.5 +Date: 2025-02-01 + Changes: + - Add shiftite recipe for Janus mod +--------------------------------------------------------------------------------------------------- Version: 2.1.4 Date: 2025-01-25 Changes: diff --git a/control-util.lua b/control-util.lua index c21f3aa..7ba42cc 100644 --- a/control-util.lua +++ b/control-util.lua @@ -173,7 +173,7 @@ function regenerate_ore(event) game.print("Could not find surface for "..planet..". May not exist, or may not yet be explored.") return end - if resource[1] == params[2] and resource[2] == planet then + if resource[1] == params[2] and (resource[2] == planet or "tenebris" == planet) then if #params == 5 then local settings = {frequency=params[3], size=params[4], richness=params[5]} local map_gen_settings = game.surfaces[planet].map_gen_settings diff --git a/data-updates.lua b/data-updates.lua index e3cae4d..8e1f541 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -34,5 +34,8 @@ util.add_minable_result("simple-entity", "fulgoran-ruin-small", {type="item", na util.add_minable_result("simple-entity", "big-fulgora-rock", {type="item", name="tin-ore", amount_min=10, amount_max=22}) util.add_minable_result("simple-entity", "big-fulgora-rock", {type="item", name="lead-ore", amount_min=10, amount_max=22}) + + +util.add_shiftite_recipe("tin-plate", {"delta"}, 1) -- Must be last util.create_list() diff --git a/data-util.lua b/data-util.lua index 9b471b3..0560a31 100644 --- a/data-util.lua +++ b/data-util.lua @@ -127,6 +127,35 @@ function util.copy_recipe(recipe_name, new_recipe_name) end end +function util.add_shiftite_recipe(item, shiftites, quantity) + if not mods["janus"] then return end + if not data.raw.item[item] then return end + local its = {} + for _, shiftite in pairs(shiftites) do + local it = "janus-shiftite-"..shiftite + if data.raw.item[it] then + table.insert(its, util.item(it, quantity)) + end + end + if its then + local name = "shiftite-to-"..item + data:extend({{ + type = "recipe", + name = name, + localised_name = {"", {"item-name."..item}, " ← Shiftite"}, + category = "janus-shiftite", + subgroup = "janus-basic-from-shiftite", + ingredients = its, + results = {util.item(item, 5)}, + energy_required = 2.5, + order = "zzz", + enabled = false, + auto_recycle = false, + }}) + util.add_unlock("janus-time-distorter", name) + end +end + -- Add the gleba rock. If it exists, still add resource to mine from it function util.add_gleba_rock(resource, amount_min, amount_max) if (not data.raw.planet.gleba or diff --git a/info.json b/info.json index da0fdf1..31a10f9 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztin", - "version": "2.1.4", + "version": "2.1.5", "factorio_version": "2.0", "title": "Tin", "author": "Brevven",