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
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
|
local DID = require("globals")
|
||||||
|
|
||||||
for index, force in pairs(game.forces) do
|
for index, force in pairs(game.forces) do
|
||||||
local technologies = force.technologies
|
for display,displaydata in pairs(DID.displays) do
|
||||||
local recipes = force.recipes
|
if displaydata.IR_unlock and force.technologies[displaydata.IR_unlock] and force.technologies[displaydata.IR_unlock].researched then
|
||||||
|
force.recipes[display].enabled = true
|
||||||
if technologies["steel-processing"].researched then
|
elseif displaydata.unlock and force.technologies[displaydata.unlock] and force.technologies[displaydata.unlock].researched then
|
||||||
recipes["steel-display-small"].enabled = true
|
force.recipes[display].enabled = true
|
||||||
recipes["steel-display-medium"].enabled = true
|
end
|
||||||
recipes["steel-display"].enabled = true
|
end
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user