Skip to content

Commit

Permalink
Update init_package_loading.lua (#104)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Scrymmery authored Jan 15, 2023
1 parent 0f98907 commit 5795d6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/noita-mp/files/scripts/init/init_package_loading.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit 5795d6a

Please sign in to comment.