Attempt install pyqt5
Some checks failed
Build Dusk / build-linux (push) Failing after 1m48s
Build Dusk / build-psp (push) Failing after 2m4s

This commit is contained in:
2025-12-04 00:12:04 -06:00
parent 9f507be7bc
commit de78be3e25
3 changed files with 20 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ errorret_t scriptManagerInit() {
luaL_openlibs(SCRIPT_MANAGER.luaState);
lua_register(SCRIPT_MANAGER.luaState, "luaCallable", luaCallable);
// SCript test
// Script test.
assetscript_t script;
assetLoad("script/test.dsf", &script);
@@ -46,11 +46,10 @@ errorret_t scriptManagerInit() {
assetScriptDispose(&script);
errorOk();
}
errorret_t scriptManagerExec(const char_t *script) {
errorret_t scriptManagerExecString(const char_t *script) {
if(SCRIPT_MANAGER.luaState == NULL) {
errorThrow("Lua state is not initialized");
}
@@ -64,6 +63,20 @@ errorret_t scriptManagerExec(const char_t *script) {
errorOk();
}
errorret_t scriptManagerExecFile(const char_t *filename) {
if(SCRIPT_MANAGER.luaState == NULL) {
errorThrow("Lua state is not initialized");
}
if(luaL_dofile(SCRIPT_MANAGER.luaState, filename) != LUA_OK) {
const char_t *strErr = lua_tostring(SCRIPT_MANAGER.luaState, -1);
lua_pop(SCRIPT_MANAGER.luaState, 1);
errorThrow("Failed to execute Lua file: %s", strErr);
}
errorOk();
}
errorret_t scriptManagerDispose() {
if(SCRIPT_MANAGER.luaState != NULL) {
lua_close(SCRIPT_MANAGER.luaState);