From 29d2cf1970d430bb912bc22c899fb05778f0a260 Mon Sep 17 00:00:00 2001 From: SpookyDervish Date: Mon, 27 Oct 2025 15:57:34 +1100 Subject: [PATCH] more inbuilt --- plugin_loader.py | 2 ++ plugins/test-plugin/lua/main.lua | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin_loader.py b/plugin_loader.py index fb3281f..27a020b 100644 --- a/plugin_loader.py +++ b/plugin_loader.py @@ -100,6 +100,8 @@ class PluginLoader(Window): sandbox.print = self.log #self.lua_runtime.globals().print sandbox.math = self.lua_runtime.globals().math sandbox.string = self.lua_runtime.globals().string + sandbox.tostring = self.lua_runtime.globals().tostring + sandbox.tonumber = self.lua_runtime.globals().tonumber sandbox.berry = lua_runtime_stuff setfenv(0, sandbox) diff --git a/plugins/test-plugin/lua/main.lua b/plugins/test-plugin/lua/main.lua index 379d35a..a3696c0 100644 --- a/plugins/test-plugin/lua/main.lua +++ b/plugins/test-plugin/lua/main.lua @@ -1,8 +1,7 @@ local plugin = {} function plugin.init() - berry.ui.notify(tostring(math.random(10))) + berry.ui.notify(tostring(math.random(1,10))) end -return plugin -123 \ No newline at end of file +return plugin \ No newline at end of file