1
0
This repository has been archived on 2023-04-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
IndustrialDisplayPlates-Arc…/migrations/steel-display.lua
T
Deadlock989 423cf5aff2 Update steel-display.lua
ickputzdirwech's fix only handled specific cases and ignored the values for technologies and recipes defined in globals.lua
also didn't handle the situation where any IR unlocks are specified
2020-11-22 09:10:07 +00:00

12 lines
529 B
Lua

local DID = require("globals")
for index, force in pairs(game.forces) do
for display,displaydata in pairs(DID.displays) do
if displaydata.IR_unlock and force.technologies[displaydata.IR_unlock] and force.technologies[displaydata.IR_unlock].researched then
force.recipes[display].enabled = true
elseif displaydata.unlock and force.technologies[displaydata.unlock] and force.technologies[displaydata.unlock].researched then
force.recipes[display].enabled = true
end
end
end