control.lua
Code: Select all
script.on_event(defines.events.on_player_created, function(event)
local player = game.get_player(event.player_index)
player.insert{name="iron-plate", count=8}
player.insert{name="pistol", count=1}
player.insert{name="basic-bullet-magazine", count=10}
player.insert{name="burner-mining-drill", count = 1}
player.insert{name="stone-furnace", count = 1}
if (#game.players <= 1) then
game.show_message_dialog{text = {"msg-intro"}}
end
end)
I can disable craft this items via
Code: Select all
data.raw["recipe"]["pistol"].enabled = "false"