command to unlock recipes
This commit is contained in:
parent
b78485eaa5
commit
7372f357b6
3 changed files with 25 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.1.5
|
||||||
|
Date: 2022-12-05
|
||||||
|
Changes:
|
||||||
|
- Added a command "NaturalGasRecipes" to unlock recipes if necessary.
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.1.4
|
Version: 0.1.4
|
||||||
Date: 2022-12-02
|
Date: 2022-12-02
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
19
control.lua
19
control.lua
|
@ -11,6 +11,25 @@ function on_console_chat(event)
|
||||||
player.print("Wrote recipes to script-output/"..filename)
|
player.print("Wrote recipes to script-output/"..filename)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif event.message and event.message == "NaturalGasRecipes" 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["bakelite"] then
|
||||||
|
game.players[event.player_index].force.recipes["bakelite"].enabled=true
|
||||||
|
end
|
||||||
|
if game.players[event.player_index].force.recipes["phenol"] then
|
||||||
|
game.players[event.player_index].force.recipes["phenol"].enabled=true
|
||||||
|
end
|
||||||
|
if game.players[event.player_index].force.recipes["phenol-from-oil"] then
|
||||||
|
game.players[event.player_index].force.recipes["phenol-from-oil"].enabled=true
|
||||||
|
end
|
||||||
|
if game.players[event.player_index].force.recipes["basic-chemical-plant"] then
|
||||||
|
game.players[event.player_index].force.recipes["basic-chemical-plant"].enabled=true
|
||||||
|
end
|
||||||
|
if game.players[event.player_index].force.recipes["formaldehyde"] then
|
||||||
|
game.players[event.player_index].force.recipes["formaldehyde"].enabled=true
|
||||||
|
end
|
||||||
|
if game.players[event.player_index].force.recipes["gas-extractor"] then
|
||||||
|
game.players[event.player_index].force.recipes["gas-extractor"].enabled=true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
script.on_event(defines.events.on_console_chat, on_console_chat)
|
script.on_event(defines.events.on_console_chat, on_console_chat)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzgas",
|
"name": "bzgas",
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
"title": "Natural Gas",
|
"title": "Natural Gas",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue