-
Notifications
You must be signed in to change notification settings - Fork 6
/
data.lua
62 lines (56 loc) · 1.71 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
--require 'prototypes/inputs'
require 'prototypes/items'
--require 'prototypes/style'
--require 'prototypes/shortcuts'
local actions = require('actions')
local function icon(s, x, y)
return {
filename = "__BlueprintSignals__/graphics/shortcut-bar-buttons-" .. s .. ".png",
priority = "extra-high-no-scale",
flags = { "icon" },
size = s,
x = s*(x or 0),
y = s*(y or 0),
scale = 1
}
end
for name, action in pairs(actions) do
if action.key_sequence then
data:extend{ {
type = "custom-input",
name = name,
key_sequence = action.key_sequence,
order = action.order
}}
end
if action.icon ~= nil then
local sprite = icon(32, action.icon, 1)
sprite.type = "sprite"
sprite.name = name
data:extend {
sprite,
{
name = name,
type = "shortcut",
localised_name = { "controls." .. name },
associated_control_input = (action.key_sequence and name or nil),
action = "lua",
toggleable = action.toggleable or false,
icon = icon(32, action.icon, 1),
disabled_icon = icon(32, action.icon, 1),
small_icon = icon(24, action.icon, 1),
disabled_small_icon = icon(24, action.icon, 1),
style = action.shortcut_style,
order = "b[blueprints]-s[bps]-" .. action.order
}
}
end
end
data:extend({
{
type = "custom-input",
name = "BlueprintSignals_cleared_cursor_proxy",
key_sequence = "",
linked_game_control = "clear-cursor"
}
})