diff options
author | 2021-11-04 09:55:26 +1100 | |
---|---|---|
committer | 2021-11-04 09:55:26 +1100 | |
commit | 8c6cb643e3d38251ae3c4f8b18a1ccd58020a707 (patch) | |
tree | 79b599cfd0f2d64fcfe868b3630f294aa904e01e /plugins/autofire/autofire_menu.lua | |
parent | e44d51c21fe2248a33ab8c760e1ac52c6f70d6fb (diff) |
plugins: Simplify logic in autofire and inputmacro plugins to try and avoid leaking state across sessions.
Diffstat (limited to 'plugins/autofire/autofire_menu.lua')
-rw-r--r-- | plugins/autofire/autofire_menu.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/autofire/autofire_menu.lua b/plugins/autofire/autofire_menu.lua index ec2fd6311cf..f614c1523fc 100644 --- a/plugins/autofire/autofire_menu.lua +++ b/plugins/autofire/autofire_menu.lua @@ -62,7 +62,7 @@ local function create_new_button() end local function is_button_complete(button) - return button.port and button.field and button.key and button.on_frames and button.off_frames and button.button and button.counter + return button.port and button.mask and button.type and button.key and button.on_frames and button.off_frames and button.button and button.counter end -- Main menu @@ -169,7 +169,7 @@ local function handle_configure_menu(index, event) if event == 'select' then configure_selection_save = header_height + index table.insert(menu_stack, MENU_TYPES.BUTTON) - if current_button.port and current_button.field then + if current_button.port and current_button.button then initial_input = current_button.button end return true @@ -298,7 +298,8 @@ local function populate_button_menu() local function action(field) if field then current_button.port = field.port.tag - current_button.field = field.name + current_button.mask = field.mask + current_button.type = field.type current_button.button = field end initial_input = nil |