asdasdasdasdasd

This commit is contained in:
2025-10-27 13:11:33 +11:00
parent 48b6e535a2
commit 2da07762a4
2 changed files with 11 additions and 2 deletions

View File

@@ -17,11 +17,18 @@ class PluginLoader(Window):
start_open=True
)
self.lua_runtime = lua51.LuaRuntime()
@work
async def find_plugins(self):
log = self.query_one(RichLog)
log.write("[b]Setting up LUA runtime..[/]")
self.lua_runtime = lua51.LuaRuntime()
lua_runtime_stuff = {
"ui": {
"notify": self.notify
}
}
log.write("[b]Finding plugins...[/]")
# Find all plugins (they're just in the plugins folder for now)
@@ -83,6 +90,7 @@ 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.berry = lua_runtime_stuff
setfenv(0, sandbox)
executed_code = self.lua_runtime.execute(code)

View File

@@ -1,6 +1,7 @@
local plugin = {}
function plugin.init()
berry.ui.notify("hiiii")
end
function plugin.main()