I noticed that other threads for compat requests with AAI Industry exists, but I decided to take a crack at fixing it, and with a few extra lines in the add_prerequisites() function this is solved, and it at least runs successfully. It could still be unwinnable, but I think this is at least a non-committal way to allow others to tackle that part if they desire.
--- Adds prerequisites to a technology's list of prerequisites.
---@param name string
---@param prerequisites string[]
function utils.add_prerequisites(name, prerequisites)
local technology = data.raw.technology[name]
technology.prerequisites = technology.prerequisites or {}
-- NEW STARTS HERE
local existing = {}
for _, prerequisite in pairs(technology.prerequisites) do
existing[prerequisite] = true
end
for _, prerequisite in pairs(prerequisites) do
if not existing[prerequisite] then
technology.prerequisites[#technology.prerequisites+1] = prerequisite
end
end
end
Simply registers existing prerequisites into a set, so that duplicates don't exist, since that was the only load error (specifically, it was "engine" being duplicated in the "chemical-science-pack" tech prerequisites).
Tested this with Fulgora, Vulcanus, Gleba, and Aquilo (with Dredgeworks: Frozen Reaches)