-
Notifications
You must be signed in to change notification settings - Fork 7
/
control.lua
21 lines (20 loc) · 1.15 KB
/
control.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)