-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata.lua
69 lines (63 loc) · 1.63 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
local range_powered = settings.startup["power-propagation-range"].value
local invisible_pole = table.deepcopy(data.raw["electric-pole"]["small-electric-pole"])
invisible_pole.name = "power-propagation-invisible-pole"
invisible_pole.flags = {
"not-blueprintable",
"not-deconstructable",
"placeable-off-grid",
"not-on-map",
"hide-alt-info",
"not-selectable-in-game",
"not-upgradable",
"not-in-kill-statistics",
"not-flammable",
"not-repairable",
}
invisible_pole.selection_box = nil
invisible_pole.collision_box = nil
invisible_pole.collision_mask = { layers = {} }
invisible_pole.resistances =
{
{
type = "electric",
percent = 100
}
}
invisible_pole.pictures = {
layers = {
{
filename = "__core__/graphics/empty.png",
priority = "high",
width = 1,
height = 1,
direction_count = 1,
},
},
}
-- Add connection points for the wires
invisible_pole.connection_points = {
{
wire = {
copper = { 0, 0 },
red = { 0, 0 },
green = { 0, 0 },
},
shadow = {
copper = { 0, 0 },
red = { 0, 0 },
green = { 0, 0 },
},
},
}
-- Base settings for the invisible pole
invisible_pole.supply_area_distance = 1
invisible_pole.maximum_wire_distance = 1 -- Not used since we connect manually
invisible_pole.draw_copper_wires = false
invisible_pole.draw_circuit_wires = false
invisible_pole.auto_connect_up_to_n_wires = 0 -- Disable automatic connections
for i = 1, 30 do
local pole = table.deepcopy(invisible_pole)
pole.name = "power-propagation-invisible-pole-" .. i
pole.supply_area_distance = 0.5 + i * 0.5 + range_powered * 0.5
data:extend({ pole })
end