From 5795d6a60935e72313729fa2ba79957b809c05bd Mon Sep 17 00:00:00 2001 From: Scrymmery <49278078+Scrymmery@users.noreply.github.com> Date: Sun, 15 Jan 2023 15:54:46 +0300 Subject: [PATCH] Update init_package_loading.lua (#104) * Update init_package_loading.lua on game start, there was an error "The current directory is not inside the noita-mp". fixed it, io.popen("cd"):read("*a") were return Noita directory, not mod also don't think we need to check for correct directory, it can't be uncorrect now it works(how i think) as it supposed to be. P.S: there are still error about libs, if i understood correctly, you want to move all libs from \lua_modules to \files\lib\external\ , so i didn't touch it (kinda strange that it's already defined in mod, but still not moved) * Update init_package_loading.lua keep directory check --- mods/noita-mp/files/scripts/init/init_package_loading.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/noita-mp/files/scripts/init/init_package_loading.lua b/mods/noita-mp/files/scripts/init/init_package_loading.lua index 104f03b2c..21b33695c 100644 --- a/mods/noita-mp/files/scripts/init/init_package_loading.lua +++ b/mods/noita-mp/files/scripts/init/init_package_loading.lua @@ -2,7 +2,7 @@ function getNoitaMpRootDirectory() -- Get the current directory of the script or the executable - local currentDirectory = io.popen("cd"):read("*a") + local currentDirectory = io.popen("cd"):read("*l") .. "/" .. debug.getinfo(1).source print("currentDirectory: " .. currentDirectory) -- Check if we are inside of noita-mp directory. Don't forget to escape the dash!