Code: Select all
-- Reload recipes and technologies
for i, player in ipairs(game.players) do
player.force.reset_recipes()
player.force.reset_technologies()
end
for index, force in pairs(game.forces) do
-- Generate technology and recipe tables
local tech = force.technologies
local recipes = force.recipes
if tech["circuit-network"].researched then
if recipes["smart-chest-sam"] then
recipes["smart-chest-sam"].enabled = true
end
end
if tech["logistics-2"].researched then
if recipes["fast-transport-belt-sam"] then
recipes["fast-transport-belt-sam"].enabled = true
end
end
end