zircaloy fixes

This commit is contained in:
Brevven 2022-07-07 21:05:59 -07:00
parent 233ca6ffbc
commit 3719d84e7e
5 changed files with 75 additions and 22 deletions

21
control.lua Normal file
View file

@ -0,0 +1,21 @@
script.on_event( defines.events.on_console_chat, function(event)
-- refresh recipes, in case of settings change
if event.message and event.message == "ZirconiumRecipes" and (not event.player_index or not game.players[event.player_index] or game.players[event.player_index].admin) then
if game.players[event.player_index].force.recipes["zirconia"] then
game.players[event.player_index].force.recipes["zirconia"].enabled=true
end
if game.players[event.player_index].force.recipes["zirconium-plate"] then
game.players[event.player_index].force.recipes["zirconium-plate"].enabled=true
end
if game.players[event.player_index].force.recipes["zircaloy-4"] then
game.players[event.player_index].force.recipes["zircaloy-4"].enabled=true
end
if game.players[event.player_index].force.recipes["cermet"] then
game.players[event.player_index].force.recipes["cermet"].enabled=true
end
if game.players[event.player_index].force.recipes["zirconium-tungstate"] then
game.players[event.player_index].force.recipes["zirconium-tungstate"].enabled=true
end
end
end)