From 216a6db872f8901c3d2ca2587f3addca5c4b49f9 Mon Sep 17 00:00:00 2001 From: jayden <46307433+krmeet@users.noreply.github.com> Date: Sat, 30 Dec 2023 19:26:04 +0000 Subject: [PATCH] let luac files actually run --- src/pc/lua/smlua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pc/lua/smlua.c b/src/pc/lua/smlua.c index 0a219f21..fd9ca690 100644 --- a/src/pc/lua/smlua.c +++ b/src/pc/lua/smlua.c @@ -275,7 +275,7 @@ void smlua_init(void) { gPcDebug.lastModRun = gLuaActiveMod; for (int j = 0; j < mod->fileCount; j++) { struct ModFile* file = &mod->files[j]; - if (!str_ends_with(file->relativePath, ".lua")) { + if (!(str_ends_with(file->relativePath, ".lua") || str_ends_with(file->relativePath, ".luac"))) { continue; } smlua_load_script(mod, file, i); @@ -288,7 +288,7 @@ void smlua_init(void) { void smlua_update(void) { lua_State* L = gLuaState; if (L == NULL) { return; } - + smlua_call_event_hooks(HOOK_UPDATE); // Collect our garbage after calling our hooks. // If we don't, Lag can quickly build up from our mods.