-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcontrol.lua
More file actions
48 lines (42 loc) · 1.1 KB
/
control.lua
File metadata and controls
48 lines (42 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
script.on_event(defines.events.on_player_created, function(event)
local player = game.players[event.player_index]
if defines.controllers.god == player.controller_type then
return
end
if defines.controllers.ghost == player.controller_type then
return
end
local items
local armor
items = {
{"modular-armor", 1},
{"construction-robot", 20},
}
armor = {
{"personal-roboport-equipment"},
{"personal-roboport-equipment"},
{"battery-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
{"solar-panel-equipment"},
}
for i, v in pairs(items) do
player.insert{name = v[1], count = v[2]}
end
local grid = player.get_inventory(defines.inventory.player_armor)[1].grid
for i, v in pairs(armor) do
grid.put({name = v[1]})
end
end)