Code: Select all
script.on_event(defines.events.on_player_created, function(event)
local items
local armor
items = {
{"power-armor-mk2", 1},
{"construction-robot", 50},
}
armor = {
{"fusion-reactor-equipment"},
{"energy-shield-mk2-equipment"},
}
local player = game.players[event.player_index]
for i, v in pairs(items) do
player.insert{name = v[1], count = v[2]}
end
local grid = player.get_inventory(defines.inventory.character_armor)[1].grid
for i, v in pairs(armor) do
grid.put({name = v[1]})
end
end)
Thanks for the help