-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdata-final-fixes.lua
More file actions
98 lines (94 loc) · 3.29 KB
/
data-final-fixes.lua
File metadata and controls
98 lines (94 loc) · 3.29 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
local colors = {
["white"] = {1.0, 1.0, 1.0},
["red"] = {1.0, 0.0, 0.0},
["green"] = {0.0, 1.0, 0.0},
["blue"] = {0.0, 0.0, 1.0},
["yellow"] = {1.0, 1.0, 0.0},
["magenta"] = {1.0, 0.0, 1.0},
["cyan"] = {0.0, 1.0, 1.0}
}
for color, rgb in pairs(colors) do
for _, thickness in pairs {
"factorio-like-belt-indicator",
"factorio-like-pipe-indicator",
"double-thick-line",
"double-thin-line",
"extra-thick-line",
"thick-line",
"thin-line"
} do for _, stale in pairs {
true,
false
} do
data:extend{
{
type = "corpse",
name = "underground-indicators-dash-" .. color .. "-" .. thickness .. (stale and "-stale" or ""),
flags = {"not-on-map", "placeable-off-grid", "not-deconstructable", "not-blueprintable"},
selectable_in_game = false,
time_before_shading_off = stale and 0 or 96,
time_before_removed = 120,
animation_render_layer = "air-object",
hidden_in_factoriopedia = true,
animation = {{
filename = "__UndergroundIndicatorsFixed__/graphics/" .. thickness .. "-dash.png",
width = 64,
height = 64,
direction_count = 4,
line_length = 4,
frame_count = 1,
scale = 0.5,
tint = rgb,
}}
},
{
type = "corpse",
name = "underground-indicators-rect-" .. color .. "-" .. thickness .. (stale and "-stale" or ""),
flags = {"not-on-map", "placeable-off-grid", "not-deconstructable", "not-blueprintable"},
selectable_in_game = false,
time_before_shading_off = stale and 0 or 96,
time_before_removed = 120,
final_render_layer = "air-object",
hidden_in_factoriopedia = true,
animation = {{
filename = "__UndergroundIndicatorsFixed__/graphics/" .. thickness .. "-rect.png",
width = 64,
height = 64,
frame_count = 1,
scale = 0.5,
tint = rgb
}}
}
}
end end
end
if settings.startup["underground-indicators-placement-indicator"] then
for u, underground in pairs(data.raw["underground-belt"]) do
underground.radius_visualisation_specification = {
sprite = {
filename = "__UndergroundIndicatorsFixed__/graphics/" .. settings.startup["underground-indicators-placement-belt"].value .. "-rect.png",
size = 64,
scale = 1,
tint = colors[settings.startup["underground-indicators-placement-color"].value]
},
distance = 0.5,
offset = {0, -underground.max_distance},
draw_on_selection = false
}
end
for u, underground in pairs(data.raw["pipe-to-ground"]) do
if #underground.fluid_box.pipe_connections > 1 and underground.fluid_box.pipe_connections[2].max_underground_distance then
underground.radius_visualisation_specification = {
sprite = {
filename = "__UndergroundIndicatorsFixed__/graphics/" .. settings.startup["underground-indicators-placement-pipe"].value .. "-rect.png",
size = 64,
scale = 1,
tint = colors[settings.startup["underground-indicators-placement-color"].value]
},
distance = 0.5,
offset = {0, underground.fluid_box.pipe_connections[2].max_underground_distance},
draw_on_selection = false
}
end
end
end