I've tried to work around this:
Code: Select all
GCKI.unlock_tech_map = {
-- Required mod Technology
["base"] = "automobilism",
["cargo-ships"] = "water_transport",
}
local tech
local unlock = {
type = "nothing",
icon = icon,
icon_size = 64,
icon_mipmaps = 1,
effect_description = {"techeffect-description.technology-effect"},
}
for mod_name, tech_name in pairs(GCKI.unlock_tech_map) do
tech = data.raw.technology[tech_name]
if mods[mod_name] and tech then
tech.effects = tech.effects or {}
table.insert(tech.effects, unlock)
end
end