Skip to content

Commit

Permalink
grr
Browse files Browse the repository at this point in the history
  • Loading branch information
RalseiSmol03 authored Jun 10, 2023
2 parents 56ec1a0 + 9c577e3 commit 2b15a18
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/Paths.hx
Original file line number Diff line number Diff line change
Expand Up @@ -246,19 +246,19 @@ class Paths
return File.getContent(modFolders(key));
#end

if (FileSystem.exists(getPreloadPath(key)))
return File.getContent(getPreloadPath(key));
if (FileSystem.exists(SUtil.getStorageDirectory() + getPreloadPath(key)))
return File.getContent(SUtil.getStorageDirectory() + getPreloadPath(key));

if (currentLevel != null)
{
var levelPath:String = '';
if(currentLevel != 'shared') {
levelPath = getLibraryPathForce(key, currentLevel);
levelPath = SUtil.getStorageDirectory() + getLibraryPathForce(key, currentLevel);
if (FileSystem.exists(levelPath))
return File.getContent(levelPath);
}

levelPath = getLibraryPathForce(key, 'shared');
levelPath = SUtil.getStorageDirectory() + getLibraryPathForce(key, 'shared');
if (FileSystem.exists(levelPath))
return File.getContent(levelPath);
}
Expand All @@ -274,7 +274,7 @@ class Paths
return file;
}
#end
return 'assets/fonts/$key';
return SUtil.getStorageDirectory() + 'assets/fonts/$key';
}

inline static public function fileExists(key:String, type:AssetType, ?ignoreMods:Bool = false, ?library:String)
Expand Down Expand Up @@ -370,7 +370,7 @@ class Paths
}
#end
// I hate this so god damn much
var gottenPath:String = getPath('$path/$key.$SOUND_EXT', SOUND, library);
var gottenPath:String = SUtil.getStorageDirectory() + getPath('$path/$key.$SOUND_EXT', SOUND, library);
gottenPath = gottenPath.substring(gottenPath.indexOf(':') + 1, gottenPath.length);
// trace(gottenPath);
if(!currentTrackedSounds.exists(gottenPath))
Expand All @@ -385,7 +385,7 @@ class Paths

#if MODS_ALLOWED
inline static public function mods(key:String = '') {
return 'mods/' + key;
return SUtil.getStorageDirectory() + 'mods/' + key;
}

inline static public function modsFont(key:String) {
Expand Down Expand Up @@ -435,7 +435,7 @@ class Paths
return fileToCheck;
}
}
return 'mods/' + key;
return SUtil.getStorageDirectory() + 'mods/' + key;
}
static public function getModDirectories():Array<String> {
var list:Array<String> = [];
Expand Down

0 comments on commit 2b15a18

Please sign in to comment.