diff --git a/lignumis/prototypes/compatibility/k2so.lua b/lignumis/prototypes/compatibility/k2so.lua index afd1849..88637a9 100644 --- a/lignumis/prototypes/compatibility/k2so.lua +++ b/lignumis/prototypes/compatibility/k2so.lua @@ -1,6 +1,44 @@ +local Technology = require("__cf-lib__/data/Technology") + if not mods["Krastorio2-spaced-out"] then return end data.raw.recipe["burner-inserter"].ingredients = { { type = "item", name = "wooden-gear-wheel", amount = 1 }, { type = "item", name = "lumber", amount = 1 } -} \ No newline at end of file +} + +Technology:new("kr-automation-core"):addPrerequisite("iron-processing") + +local function lock_recipes(technology, recipes) + local tech = Technology:new(technology) + for _, recipe in pairs(recipes) do + tech:addRecipe(recipe) + data.raw.recipe[recipe].enabled = false + end +end + +lock_recipes("iron-processing", { + "iron-stick", + "kr-wind-turbine", + "kr-iron-beam", + "kr-inserter-parts" +}) + +lock_recipes("copper-processing", { + "copper-cable", + "small-electric-pole" +}) + +lock_recipes("planet-discovery-nauvis", { + "kr-rare-metals" +}) + +Technology:new("electronics"):removeRecipe("kr-electronic-circuit-wood") + +if settings.startup["kr-realistic-weapons"].value then + local pistol_attack = data.raw.gun["pistol"].attack_parameters + pistol_attack.ammo_categories = pistol_attack.ammo_categories or { pistol_attack.ammo_category } + pistol_attack.ammo_category = nil + table.insert(pistol_attack.ammo_categories, "bullet") + data.raw.recipe["firearm-magazine"].enabled = false +end \ No newline at end of file