diff --git a/source/funkin/mods/ModsFolder.hx b/source/funkin/mods/ModsFolder.hx index 8a65d4b4..c3248495 100644 --- a/source/funkin/mods/ModsFolder.hx +++ b/source/funkin/mods/ModsFolder.hx @@ -49,6 +49,7 @@ class ModsFolder { * @param force Whenever the mod should be reloaded if it has already been loaded */ public static function loadMod(mod:String, force:Bool = false) { + #if MOD_SUPPORT if (mod == null) return null; // may be loading base game if (FileSystem.exists('${modsPath}$mod.zip')) { @@ -60,6 +61,9 @@ class ModsFolder { loadedMods.push(mod); return e; } + #else + return null; + #end } /** diff --git a/source/funkin/system/Logs.hx b/source/funkin/system/Logs.hx index 932f6f66..e4e94372 100644 --- a/source/funkin/system/Logs.hx +++ b/source/funkin/system/Logs.hx @@ -8,6 +8,8 @@ import funkin.windows.WindowsAPI.ConsoleColor; class Logs { private static var __showing:Bool = false; + + public static var nativeTrace = Log.trace; public static function init() { Log.trace = function(v : Dynamic, ?infos : Null) { @@ -79,7 +81,8 @@ class Logs { Sys.print("\r\n"); __showing = false; #else - trace(text); + @:privateAccess + nativeTrace([for(t in text) t.text].join("")); #end } diff --git a/source/funkin/system/Main.hx b/source/funkin/system/Main.hx index 3fe29a33..c18d8e5b 100644 --- a/source/funkin/system/Main.hx +++ b/source/funkin/system/Main.hx @@ -110,7 +110,9 @@ class Main extends Sprite // TODO: Mod switching ModsFolder.init(); + #if MOD_SUPPORT ModsFolder.switchMod("introMod"); + #end #if GLOBAL_SCRIPT funkin.scripting.GlobalScript.init(); diff --git a/source/funkin/system/Paths.hx b/source/funkin/system/Paths.hx index 91e76d05..f9adf6da 100644 --- a/source/funkin/system/Paths.hx +++ b/source/funkin/system/Paths.hx @@ -175,7 +175,7 @@ class Paths if (!key.endsWith("/")) key = key + "/"; - if (ModsFolder.currentModFolder == null) + if (ModsFolder.currentModFolder == null && !scanSource) return getFolderContent(key, false, addPath, true); var folderPath:String = scanSource ? getPreloadPath(key) : getLibraryPathForce(key, 'mods/${ModsFolder.currentModFolder}');