-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.lua
53 lines (45 loc) · 1.4 KB
/
data.lua
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
49
50
51
52
--
-- Patch robo chests to have 4 charging points instead of 1
--
for _,name in pairs({ "bob-robochest", "bob-robochest-2", "bob-robochest-3", "bob-robochest-4" }) do
local obj = data.raw["roboport"][name]
if obj ~= nil then
--log("%%% tweaking "..name)
obj.charging_offsets = { {-0.5, -0.5}, {0.5, -0.5}, {-0.5, 0.5}, {0.5, 0.5}, }
end
end
--
-- Create a zone expander that has a small logistics radius and no construction radius
--
local entity = data.raw["roboport"]["bob-logistic-zone-expander"]
local item = data.raw["item"]["bob-logistic-zone-expander"]
local tech = data.raw["technology"]["bob-robo-modular-1"]
if entity ~= nil and item ~= nil and tech ~= nil then
local name = "tritano-logistic-zone-expander-1"
--log("%%% creating "..name)
entity = table.deepcopy(entity);
entity.name = name
entity.minable.result = entity.name
entity.logistics_radius = 5
entity.construction_radius = 0
item = table.deepcopy(item)
item.name = name
item.place_result = name
item.order = item.order:gsub("%d*]$", "zzz-"..name.."]")
table.insert(tech.effects, { type = "unlock-recipe", recipe = name })
data.raw["roboport"][name] = entity
data.raw["item"][name] = item
data:extend({
{
type = "recipe",
name = name,
enabled = "false",
ingredients =
{
{"steel-plate", 3},
{"roboport-antenna-1", 1},
},
result = name,
energy_required = 2
}})
end