forked from brevven/silicon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrol.lua
More file actions
15 lines (14 loc) · 838 Bytes
/
control.lua
File metadata and controls
15 lines (14 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
script.on_event( defines.events.on_console_chat, function(event)
-- refresh recipes, in case of settings change
if event.message and event.message == "SiliconRecipes" 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["silicon-wafer"] then
game.players[event.player_index].force.recipes["silicon-wafer"].enabled=true
end
if game.players[event.player_index].force.recipes["solar-cell"] then
game.players[event.player_index].force.recipes["solar-cell"].enabled=true
end
if game.players[event.player_index].force.recipes["hydrogen-chloride"] then
game.players[event.player_index].force.recipes["hydrogen-chloride"].enabled=true
end
end
end)