add optional solar cell
This commit is contained in:
parent
3a821d15bc
commit
fbf1c2c86b
6 changed files with 71 additions and 12 deletions
11
control.lua
11
control.lua
|
|
@ -1 +1,12 @@
|
|||
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
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue