Fix mod compatibilities

This commit is contained in:
Simon Brodtmann 2025-10-18 21:38:41 +02:00
parent 56593eb6f7
commit 1600710d28
3 changed files with 10 additions and 12 deletions

View file

@ -488,8 +488,8 @@ if not data.raw.fluid["nitrogen"] and not data.raw.fluid["kr-nitrogen"] then
-- Recipes for "bi-liquid-air" and "bi-nitrogen" aren't needed!
else
local oxygen = mods["Krastorio2"] and "kr-oxygen" or "oxygen"
local nitrogen = mods["Krastorio2"] and "kr-nitrogen" or "nitrogen"
local oxygen = data.raw.fluid["kr-oxygen"] and "kr-oxygen" or "oxygen"
local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen"
-- Remove recipe unlocks
thxbob.lib.tech.remove_recipe_unlock("bi-tech-fertilizer", "bi-liquid-air")
@ -515,20 +515,18 @@ else
end
-- Replace nitrogen (BI) with bob-nitrogen (Bob's) in recipe "bi-nitrogen"
if data.raw.fluid["bob-nitrogen"] then
thxbob.lib.recipe.remove_result("bi-nitrogen", "nitrogen")
local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen"
thxbob.lib.recipe.remove_result("bi-nitrogen", nitrogen)
thxbob.lib.recipe.add_result("bi-nitrogen", {
type = "fluid",
name = "bob-nitrogen",
amount = 40
})
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", "nitrogen", "bob-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "bob-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", nitrogen, "bob-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", nitrogen, "bob-nitrogen")
BioInd.writeDebug("Update nitrogen compatibility for Bob's")

View file

@ -5,7 +5,7 @@ local ICONPATH_AAI = BioInd.modRoot .. "/graphics/icons/mod_aai/"
local ICONPATH_KR = BioInd.modRoot .. "/graphics/icons/mod_krastorio/"
local ICONPATHMIPS = BioInd.modRoot .. "/graphics/icons/mips/"
local nitrogen = mods["Krastorio2"] and "kr-nitrogen" or "nitrogen"
local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen"
data:extend({
{
@ -381,7 +381,7 @@ end
-- Add recipe for sand from crushed stone if any other mod provides sand
if data.raw.item[mods["Krastorio2"] and "kr-sand" or "sand"] or
if data.raw.item[data.raw.item["kr-sand"] and "kr-sand" or "sand"] or
data.raw.item["biotech-sand"] or
data.raw.item["solid-sand"] then
@ -403,7 +403,7 @@ if data.raw.item[mods["Krastorio2"] and "kr-sand" or "sand"] or
order = "a[bi]-a-z[bi-9-sand]",
energy_required = 1,
ingredients = {{type="item", name="stone-crushed", amount=2}},
results = {{type="item", name=mods["Krastorio2"] and "kr-sand" or "sand", amount=5}},
results = {{type="item", name=data.raw.item["kr-sand"] and "kr-sand" or "sand", amount=5}},
main_product = "",
enabled = false,
allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4

View file

@ -3,7 +3,7 @@ local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ICONPATH_W = BioInd.modRoot .. "/graphics/icons/weapons/"
local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/"
local nitrogen = mods["Krastorio2"] and "kr-nitrogen" or "nitrogen"
local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen"
data:extend({