summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/autofire/autofire_menu.lua
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2022-03-23 20:27:30 +1100
committer GitHub <noreply@github.com>2022-03-23 20:27:30 +1100
commite6588480c477a8132676abbbb32bfc42287d8c6d (patch)
treeb483f8b9e049a280f68ae7b0af9c57372676f5df /plugins/autofire/autofire_menu.lua
parentbb3f3e5abd7051ed371fe7fbdd0f49a56cc03f1f (diff)
Lua engine improvements (#9453)
Made auto-boot script errors and plugin bootstrap errors fatal. Run auto-boot scripts in a sandbox. Globals can be accessed, but not set. The sandbox is cleared on hard reset, but not on soft reset. Added (hopefully) useful to string metafunctions to device_t and address space that show short names and tags. Fixed issues in plugins that surface when strict type checking is enabled, as this means numbers and nil are not automatically converted to strings. Plugins should be tested with debug builds to check for this. Made save item read_block raise an error on invalid arguments rather than returning an empty string, and made it use luaL_buffer directly rather than using the helper wrapper. Changed some more function bindings to use set_function to avoid issues related to ThePhD/sol2#608, and got rid of some unnecessary lambda captures.
Diffstat (limited to 'plugins/autofire/autofire_menu.lua')
-rw-r--r--plugins/autofire/autofire_menu.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/autofire/autofire_menu.lua b/plugins/autofire/autofire_menu.lua
index 5c87e27a63d..e2287ce2276 100644
--- a/plugins/autofire/autofire_menu.lua
+++ b/plugins/autofire/autofire_menu.lua
@@ -157,8 +157,8 @@ local function populate_configure_menu(menu)
configure_selection_save = #menu
end
table.insert(menu, {_p('plugin-autofire', 'Hotkey'), key_name, hotkey_poller and 'lr' or ''})
- table.insert(menu, {_p('plugin-autofire', 'On frames'), current_button.on_frames, current_button.on_frames > 1 and 'lr' or 'r'})
- table.insert(menu, {_p('plugin-autofire', 'Off frames'), current_button.off_frames, current_button.off_frames > 1 and 'lr' or 'r'})
+ table.insert(menu, {_p('plugin-autofire', 'On frames'), tostring(current_button.on_frames), current_button.on_frames > 1 and 'lr' or 'r'})
+ table.insert(menu, {_p('plugin-autofire', 'Off frames'), tostring(current_button.off_frames), current_button.off_frames > 1 and 'lr' or 'r'})
configure_menu_active = true
end