This commit is contained in:
Brevven 2023-03-18 23:14:26 -07:00
parent c9ac4c7195
commit 1bafd5c7f2
5 changed files with 58 additions and 1 deletions

View file

@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.0.5
Date: 2023-03-19
Features:
- Compatible with ModMash Splinter Gold
---------------------------------------------------------------------------------------------------
Version: 0.0.4
Date: 2023-03-18
Fixes:

View file

@ -0,0 +1,49 @@
local futil = require("util");
local util = require("data-util");
if mods.modmashsplintergold then
util.multiply_recipe("gold-plate", 2)
util.replace_ingredient("gold-plate", "gold-ore", "gold-ingot", 1)
util.set_enabled("gold-plate", false)
util.add_unlock("gold-processing", "gold-plate")
util.set_enabled("gold-ore", false)
util.set_hidden("gold-ore", true)
for name, recipe in pairs(data.raw.recipe) do
local amt = util.get_ingredient_amount(name, "gold-plate")
if amt == 0 then
amt = util.get_ingredient_amount(name, "gold-cable")
end
if amt > 0 then
util.set_enabled(name, false)
util.remove_prior_unlocks("gold-processing", name)
util.add_unlock("gold-processing", name)
if recipe.icons then
for i, icon in pairs(recipe.icons) do
if string.match(icon.icon, "gold%-ore") then
icon.scale = (icon.scale or 1) / 2
end
end
end
end
end
-- alternate electronic circuit recipe that uses gold
util.remove_raw("recipe", "electronic-circuit-with-gold")
local ec = futil.table.deepcopy(data.raw.recipe["electronic-circuit"])
ec.name = "electronic-circuit-with-gold"
data:extend({ec})
util.replace_ingredient("electronic-circuit-with-gold", "copper-cable", "gold-cable")
util.set_icons("electronic-circuit-with-gold", {
{
icon = "__base__/graphics/icons/electronic-circuit.png",
icon_size = 64, icon_mipmaps = 4
},
{
icon = "__modmashsplintergold__/graphics/icons/gold-cable.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.25, shift = {8,-8}
},
})
end

View file

@ -2,6 +2,7 @@ require("stacking")
require("prototypes/electronic-circuit-final")
require("modules")
require("prototypes/oil-updates")
require("compatibility/modmashsplintergold")
-- require("tin-recipe-final-5d")
-- require("tin-recipe-final-rrr")

View file

@ -1,6 +1,6 @@
{
"name": "bzgold",
"version": "0.0.4",
"version": "0.0.5",
"factorio_version": "1.1",
"title": "Noble Metals",
"author": "Brevven",
@ -23,6 +23,7 @@
"? Krastorio2",
"? bobelectronics",
"? MDbobelectronics",
"? modmashsplintergold",
"? deadlock-beltboxes-loaders",
"? DeadlockCrating"
],

View file

@ -20,3 +20,4 @@ util.set_icons("electronic-circuit-silver", {
if util.check_unlock("electronics", "electronic-circuit") then
util.add_unlock("electronics", "electronic-circuit-silver")
end