Fixed loading of Font with Luadebug and some other configurations

This commit is contained in:
Wofsauge committed 2021-05-16 01:25:35 +02:00
1 parent 88d8d6fe19
commit dc4b4895c3
1 file changed
+7 -2
+7 -2
View File
@@ -70,8 +70,9 @@ local nullVector = Vector(0,0)
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
------------------------------- Load Font --------------------------------- ------------------------------- Load Font ---------------------------------
local isluadebug, os = pcall(require,"os") local isluadebug, os = pcall(require,"os")
if isluadebug then
local modfolder ='external item descriptions_836319872' --release mod folder name local modfolder ='external item descriptions_836319872' --release mod folder name
if not REPENTANCE then
if isluadebug then
local userPath = os.tmpname() local userPath = os.tmpname()
userPath = string.gsub(userPath, "\\", "/") userPath = string.gsub(userPath, "\\", "/")
local newPath = "" local newPath = ""
@@ -99,12 +100,16 @@ end
EID.modPath = string.gsub(EID.modPath, "\\", "/") EID.modPath = string.gsub(EID.modPath, "\\", "/")
EID.modPath = string.gsub(EID.modPath, "//", "/") EID.modPath = string.gsub(EID.modPath, "//", "/")
EID.modPath = string.gsub(EID.modPath, ":/", ":\\") EID.modPath = string.gsub(EID.modPath, ":/", ":\\")
else
EID.modPath = "../mods/"..modfolder.."/"
end
EID.font = Font() -- init font object EID.font = Font() -- init font object
local fontFile = EID.Config["FontType"] or "default" local fontFile = EID.Config["FontType"] or "default"
local success = EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt") local success = EID:loadFont(EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
if not success then if not success then
Isaac.ConsoleOutput("EID WAS NOT ABLE TO LOAD THE FONT!!!!!!!! Please contact the mod creator!") Isaac.ConsoleOutput("EID WAS NOT ABLE TO LOAD THE FONT!!!!!!!! Please contact the mod creator!\n")
Isaac.ConsoleOutput("File does not exist: "..EID.modPath .. "resources/font/eid_"..fontFile..".fnt")
return return
end end