summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/timer/init.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/timer/init.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/timer/init.lua')
-rw-r--r--plugins/timer/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/timer/init.lua b/plugins/timer/init.lua
index e7d7155b4c1..35dbb6431ac 100644
--- a/plugins/timer/init.lua
+++ b/plugins/timer/init.lua
@@ -38,7 +38,7 @@ function timer.startplugin()
{ '---', '', '' },
{ _p("plugin-timer", "Current time"), sectohms(time), "off" },
{ _p("plugin-timer", "Total time"), sectohms(total), "off" },
- { _p("plugin-timer", "Play Count"), play_count, "off" } },
+ { _p("plugin-timer", "Play Count"), tostring(play_count), "off" } },
highlight,
"idle"
end