add optional solar cell

This commit is contained in:
Brevven 2021-02-28 00:16:50 -08:00
parent 3a821d15bc
commit fbf1c2c86b
6 changed files with 71 additions and 12 deletions

View file

@ -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)