This commit is contained in:
Brevven 2023-03-23 03:12:45 -07:00
parent e41a8efa0c
commit 11a3e17c4b
9 changed files with 47 additions and 7 deletions

View file

@ -1,6 +1,8 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 0.0.6 Version: 0.0.6
Date: 2023-03-22 Date: 2023-03-22
Features:
- Basic compatility with 248k, unified gold ingot items and production lines.
Fixes: Fixes:
- SE: Satellite rocket silo no longer requires palladium, due to tech deadlock - SE: Satellite rocket silo no longer requires palladium, due to tech deadlock
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------

View file

@ -0,0 +1,18 @@
local util = require("data-util");
if mods["248k"] then
local au2 = "fu_materials_gold_ingot"
-- Swap out all 248k gold ingot for BZ gold ingot
for i, recipe in pairs(data.raw.recipe) do
util.replace_ingredient(recipe.name, au2, "gold-ingot")
util.replace_product(recipe.name, au2, "gold-ingot")
end
if mods.LootingRemnants and data.raw.recipe.gr_white_hole_cycle_fu_materials_gold_recipe~=nil then
data.raw.recipe.gr_white_hole_cycle_fu_materials_gold_recipe.exception_mods = {"Deconstruction", "LootingRemnants"}
end
-- Remove 248k gold ingot
util.remove_raw("item", au2)
end

6
compatibility/248k.lua Normal file
View file

@ -0,0 +1,6 @@
local util = require("data-util");
-- Update 248k gold production chain to include gold ore
util.add_ingredient("fi_pure_gold_recipe", "gold-ore", 10)
util.add_to_product("fi_pure_gold_recipe", "fi_materials_pure_gold", 2)

View file

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

View file

@ -1257,12 +1257,14 @@ function remove_prior_unlocks(tech, recipe)
util.remove_recipe_effect(tech, recipe) util.remove_recipe_effect(tech, recipe)
if technology.prerequisites then if technology.prerequisites then
for i, prerequisite in pairs(technology.prerequisites) do for i, prerequisite in pairs(technology.prerequisites) do
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
-- log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :| -- log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
remove_prior_unlocks(prerequisite, recipe) remove_prior_unlocks(prerequisite, recipe)
end end
end end
end end
end end
end
function util.replace_ingredients_prior_to(tech, old, new, multiplier) function util.replace_ingredients_prior_to(tech, old, new, multiplier)
if not data.raw.technology[tech] then if not data.raw.technology[tech] then
@ -1299,12 +1301,14 @@ function replace_ingredients_prior_to(tech, old, new, multiplier)
end end
if technology.prerequisites then if technology.prerequisites then
for i, prerequisite in pairs(technology.prerequisites) do for i, prerequisite in pairs(technology.prerequisites) do
-- log("BZZZ checking " .. prerequisite) -- Handy Debug :| log("BZZZ checking " .. prerequisite) -- Handy Debug :|
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
replace_ingredients_prior_to(prerequisite, old, new, multiplier) replace_ingredients_prior_to(prerequisite, old, new, multiplier)
end end
end end
end end
end end
end
function util.remove_all_recipe_effects(recipe_name) function util.remove_all_recipe_effects(recipe_name)
for name, _ in pairs(data.raw.technology) do for name, _ in pairs(data.raw.technology) do

View file

@ -17,6 +17,8 @@ require("prototypes/enriched-gold")
require("prototypes/pyroflux-gold") require("prototypes/pyroflux-gold")
require("prototypes/pyroflux-silver") require("prototypes/pyroflux-silver")
require("compatibility/248k")
local util = require("data-util"); local util = require("data-util");
if util.se6() then if util.se6() then

View file

@ -12,15 +12,14 @@ Supported compatible mods:
- Space Exploration & AAI - Space Exploration & AAI
- Krastorio 2 - Krastorio 2
- Bob's electronics - Bob's electronics, 248k, Mod Mash Splinter Gold
- Deadlock stacking, crating - Deadlock stacking, crating
Coming soon: RSO Coming soon: RSO
Coming soon: FE+, 5Dim's, ModMash, ScienceCostTweaker, etc. Coming soon: FE+, 5Dim's, ScienceCostTweaker, etc.
Many other mods are compatible but not yet fully supported. Suggestions always appreciated! Many other mods are compatible but not yet fully supported. Suggestions always appreciated!
---- ----
Special thanks to Special thanks to

View file

@ -17,6 +17,7 @@
"? bztin >= 0.1.8", "? bztin >= 0.1.8",
"? bzgas", "? bzgas",
"? bzchlorine", "? bzchlorine",
"? 248k >= 1.0.29",
"? space-exploration >= 0.6.0", "? space-exploration >= 0.6.0",
"? aai-industry", "? aai-industry",
"(?) aai-loaders", "(?) aai-loaders",

View file

@ -0,0 +1,7 @@
{
"item":
[
["fu_materials_gold_ingot", "gold-ingot"]
]
}