423cf5aff2
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
12 lines
529 B
Lua
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
|