Skip to content

Commit 5377969

Browse files
committed
Mention custom LH installation directory when patching:
Closes #125
1 parent 3b50ddc commit 5377969

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

exePatch/patcher.lua

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,17 @@ end
7979
function P:openExe()
8080
local dir = require("levelhead.misc").getInstallationPath()
8181
if not dir then
82+
local other = "If you are using the non-Steam version, please get in touch so support can be added.\n"
83+
.."If you're doing something weird, specify a custom path using the misc. setting levelheadInstallationPath."
84+
local customDir = Settings.misc.levelheadInstallationPath
85+
if customDir and customDir~="" then
86+
other = string.format(
87+
"A custom directory was specified in the settings, but it didn't contain a Levelhead.exe: %q",
88+
customDir
89+
)
90+
end
8291
return nil, "Could not find Levelhead installation directory\n"
83-
.."If you are using the non-Steam version, please get in touch so support can be added."
92+
..other
8493
end
8594
--Can't use nativefs because it doesn't let us open the file in a way to edit in it's middle
8695
local file, err = io.open(dir.."Levelhead.exe","r+b")

0 commit comments

Comments
 (0)