diff --git a/changelog.txt b/changelog.txt index 4ac1eaf..92e3c80 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 0.5.7 +Date: 2021-06-05 + Changes: + - K2 & Dectorio: Ploppable rock recipes now require zircon + - Reduced zircon richness around starting area a little bit more, yet again +--------------------------------------------------------------------------------------------------- Version: 0.5.6 Date: 2021-02-22 Features: diff --git a/data-updates.lua b/data-updates.lua index d19edab..294f87d 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -4,21 +4,7 @@ require("zircon-matter") require("map-gen-preset-updates") require("omni") require("strange-matter") - -local util = require("data-util"); +require("zircon-rocks") + --- Add zircon to rocks -local min = 9 -local max = 11 -if mods["alien-biomes"] then - min = 5 - max = 7 -end -for _, e in pairs(data.raw["simple-entity"]) do - if (e.subgroup == "grass" or e.subgroup == "wrecks") and e.name:match("rock%-") then - local adjusted_max = e.name:match("huge") and max * 2 or max - local adjusted_min = e.name:match("huge") and min * 2 or min - util.add_minable_result("simple-entity", e.name, {name="zircon", amount_min=adjusted_min, amount_max=adjusted_max}) - end -end diff --git a/data-util.lua b/data-util.lua index 84b7785..6ce0745 100644 --- a/data-util.lua +++ b/data-util.lua @@ -54,6 +54,19 @@ function util.contains(table, sought) return false end +-- Set/override a technology's prerequisites +function util.set_prerequisite(technology_name, prerequisites) + local technology = data.raw.technology[technology_name] + if technology then + technology.prerequisites = {} + for i, prerequisite in pairs(prerequisites) do + if data.raw.technology[prerequisite] then + table.insert(technology.prerequisites, prerequisite) + end + end + end +end + -- Add a prerequisite to a given technology function util.add_prerequisite(technology_name, prerequisite) local technology = data.raw.technology[technology_name] @@ -541,10 +554,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 960f289..6c6c047 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzzirconium", - "version": "0.5.6", + "version": "0.5.7", "factorio_version": "1.1", "title": "Zirconium", "author": "Brevven",