ploppable rocks require zircon

This commit is contained in:
Brevven 2022-06-04 23:10:29 -07:00
parent 2f6ddd5990
commit d3072c0393
4 changed files with 26 additions and 21 deletions

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,6 @@
{
"name": "bzzirconium",
"version": "0.5.6",
"version": "0.5.7",
"factorio_version": "1.1",
"title": "Zirconium",
"author": "Brevven",