I am puzzled how to get a shortcut to work. I created a custom selection tool and that is working fine and is perfectly selectable/spawnable with a custom-input. The button also appears on the quickbar but when clicked does nothing.
Can anyone tell me why this is happening?
Here are the relevant parts of my data.lua:
Code: Select all
data:extend({
{
type = 'custom-input',
name = 'toggle-my-tool',
key_sequence = "CONTROL + ALT + P",
action = 'spawn-item',
item_to_spawn="my-tool",
consuming = 'none',
},
{
type = 'shortcut',
name = 'my-tool-shortcut',
action = 'spawn-item',
item_to_spawn="my-tool",
style = 'red',
icon = {
...
},
associated_control_input="toggle-my-tool",
technology_to_unlock="",
},
{
type = "selection-tool",
name = "my-tool",
...
},
})