todo: videos on zip mods

This commit is contained in:
Yoshman29
2023-04-02 03:34:12 +02:00
parent 14442ba5b5
commit a2523b34df
2 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ class ModsFolderLibrary extends AssetLibrary implements ModsAssetLibrary {
}
public override function getAudioBuffer(id:String):AudioBuffer {
if (!exists(id, "SOUND"))
if (!exists(id, "SOUND"))
return null;
var path = getAssetPath();
editedTimes[id] = FileSystem.stat(path).mtime.getTime();
@@ -101,7 +101,7 @@ class ModsFolderLibrary extends AssetLibrary implements ModsAssetLibrary {
return [];
}
public override function exists(asset:String, type:String):Bool {
public override function exists(asset:String, type:String):Bool {
if(!__parseAsset(asset)) return false;
return FileSystem.exists(getAssetPath());
}
+5 -2
View File
@@ -125,8 +125,11 @@ class ZipFolderLibrary extends AssetLibrary implements ModsAssetLibrary {
for(k=>e in assets) {
if (k.toLowerCase().startsWith(_parsedAsset)) {
var fileName = k.substr(_parsedAsset.length);
if (fileName.contains("/"))
content.push(fileName.split("/")[0]);
if (fileName.contains("/")) {
var s = fileName.split("/")[0];
if (!content.contains(s))
content.push(s);
}
}
}
return content;