control script TungstenRecipes

This commit is contained in:
Brevven 2022-08-08 14:53:13 -07:00
parent 750c3f0043
commit 1deec17d08
3 changed files with 33 additions and 0 deletions

9
control.lua Normal file
View file

@ -0,0 +1,9 @@
script.on_event( defines.events.on_console_chat, function(event)
-- refresh recipes, in case of settings change
if event.message and event.message == "TungstenRecipes" 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["cuw"] then
game.players[event.player_index].force.recipes["cuw"].enabled=true
end
end
end)