minor compat aai, k2

This commit is contained in:
Brevven 2022-05-29 18:10:43 -07:00
parent 39790a40b2
commit 7dde159f28
5 changed files with 32 additions and 5 deletions

View file

@ -35,7 +35,9 @@ if util.me.use_fullerenes() then
util.add_prerequisite("graphene", "fullerenes")
util.add_prerequisite("military-3", "fullerenes")
util.replace_some_ingredient("poison-capsule", "coal", 9, "fullerenes", 90)
if not mods.Krastorio2 then
util.replace_some_ingredient("slowdown-capsule", "coal", 4, "fullerenes", 40)
end
-- K2
util.add_ingredient("kr-biter-virus", "fullerenes", 100)

View file

@ -1,4 +1,11 @@
---------------------------------------------------------------------------------------------------
Version: 0.1.8
Date: 2022-05-30
Changes:
- AAI: Improve AAI tech tree when Graphite enabled: steam power after basic fluid handling.
- K2: Do not unlock electric mining drill with automation core.
- K2: Fullerenes no longer required for slowdown capsules, due to earlier unlock in K2.
---------------------------------------------------------------------------------------------------
Version: 0.1.7
Date: 2022-04-25
Fixes:

View file

@ -95,13 +95,18 @@ if not mods.Krastorio2 and not mods["aai-industry"] and not mods.bzaluminum then
end
if not mods["aai-industry"] then
if mods.Krastorio2 then
util.add_effect("kr-automation-core", { type = "unlock-recipe", recipe = "electric-mining-drill" })
else
if not mods.Krastorio2 then
util.set_enabled("electric-mining-drill", true)
end
end
if mods["aai-industry"] then
-- AAI Industry now unlocks steam much later. Move it to an earlier sensible location in the tech tree.
util.set_prerequisite("steam-power", {"basic-fluid-handling"})
util.set_tech_recipe("steam-power", {{"automation-science-pack", 1}})
end
-- Must be last
util.create_list()

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]

View file

@ -1,6 +1,6 @@
{
"name": "bzcarbon",
"version": "0.1.7",
"version": "0.1.8",
"factorio_version": "1.1",
"title": "Graphite & Diamonds",
"author": "Brevven",