-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.lua
More file actions
108 lines (104 loc) · 3.6 KB
/
Copy pathdata.lua
File metadata and controls
108 lines (104 loc) · 3.6 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
99
100
101
102
103
104
105
106
107
108
data:extend({
{
type = "custom-input",
name = "pyops-toggle-panel",
key_sequence = "CONTROL + SHIFT + P",
consuming = "none",
action = "lua"
},
{
type = "custom-input",
name = "pyops-toggle-debug",
key_sequence = "CONTROL + SHIFT + D",
consuming = "none",
action = "lua"
},
-- Mirrors the smart-pipette (Q) key so the summary panel can pipette the good /
-- building under the cursor. Linked (no own key) — it fires alongside the normal
-- pipette, which still works everywhere else.
{
type = "custom-input",
name = "pyops-pipette",
key_sequence = "",
linked_game_control = "pipette",
action = "lua"
},
{
type = "shortcut",
name = "pyops-toggle-panel",
order = "a[pyops]",
action = "lua",
associated_control_input = "pyops-toggle-panel",
toggleable = true,
icon = "__pyops__/graphics/pyops-shortcut-x32.png",
icon_size = 32,
small_icon = "__pyops__/graphics/pyops-shortcut-x24.png",
small_icon_size = 24
},
-- Selection tool handed to the cursor by the summary panel's "Create request
-- combinator" button. Dragging it over a station + its holding chests/tanks
-- lets the mod measure real storage to size the request combinator. Cursor-only
-- and hidden — it's never crafted or kept in inventory.
{
type = "selection-tool",
name = "pyops-combinator-planner",
icon = "__pyops__/graphics/pyops-shortcut-x32.png",
icon_size = 32,
flags = { "only-in-cursor", "not-stackable" },
hidden = true,
stack_size = 1,
-- Pumps are needed to read fluid filters (which fluid each tank chain holds);
-- chests/tanks are the storage. Loaders/inserters in the drag are simply not
-- returned. Loader-pipe "tanks" are filtered out in script by prototype flags.
select = {
border_color = { r = 0.3, g = 0.6, b = 1 },
cursor_box_type = "entity",
mode = { "any-entity" },
entity_filter_mode = "whitelist",
entity_type_filters = { "container", "logistic-container", "storage-tank", "pump", "train-stop" }
},
alt_select = {
border_color = { r = 0.3, g = 0.8, b = 0.4 },
cursor_box_type = "entity",
mode = { "any-entity" },
entity_filter_mode = "whitelist",
entity_type_filters = { "container", "logistic-container", "storage-tank", "pump", "train-stop" }
}
}
})
-- Custom GUI styles for the in-game block summary. The zebra-striped rows are
-- what give Helmod's "Production block" its clean banded look; the odd-row
-- graphical set is drawn from core graphics, so we ship no images of our own.
local styles = data.raw["gui-style"].default
styles["pyops_matrix_table"] = {
type = "table_style",
hovered_row_color = { r = 0.98, g = 0.66, b = 0.22, a = 0.7 },
cell_padding = 2,
vertical_align = "top",
horizontal_spacing = 10,
vertical_spacing = 2,
odd_row_graphical_set = {
type = "composition",
filename = "__core__/graphics/gui.png",
corner_size = { 1, 1 },
position = { 78, 18 },
opacity = 0.7,
},
}
-- The number tucked under each good icon (Helmod renders these as labels, not the
-- engine's .number overlay, so small rates read as "0.06" instead of "0.0").
styles["pyops_cell_number"] = {
type = "label_style",
parent = "label",
font = "default-small",
top_padding = -4,
bottom_padding = 0,
left_padding = 0,
right_padding = 0,
horizontal_align = "center",
minimal_width = 40,
maximal_width = 40,
}
-- The PyOps panel style kit (pills, badges, cards, rows, toggles). Kept in its own
-- file so the design-time palette can be trimmed independently before shipping.
require("gui-styles")