diff --git a/CustomAvatar.sln b/CustomAvatar.sln index 50c2b0b..44cd48c 100644 --- a/CustomAvatar.sln +++ b/CustomAvatar.sln @@ -6,17 +6,11 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU - 0_11_2|Any CPU = 0_11_2|Any CPU - 0_11_1|Any CPU = 0_11_1|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.Debug|Any CPU.ActiveCfg = Release|Any CPU {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.Debug|Any CPU.Build.0 = Release|Any CPU {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.Release|Any CPU.ActiveCfg = Release|Any CPU {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.Release|Any CPU.Build.0 = Release|Any CPU - {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.0_11_2|Any CPU.ActiveCfg = 0_11_2|Any CPU - {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.0_11_2|Any CPU.Build.0 = 0_11_2|Any CPU - {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.0_11_1|Any CPU.ActiveCfg = 0_11_1|Any CPU - {8207B0AC-FCA6-47AA-B634-795271F4E5D0}.0_11_1|Any CPU.Build.0 = 0_11_1|Any CPU EndGlobalSection EndGlobal diff --git a/CustomAvatar/AvatarLoader.cs b/CustomAvatar/AvatarLoader.cs index 7a33ae5..685a326 100644 --- a/CustomAvatar/AvatarLoader.cs +++ b/CustomAvatar/AvatarLoader.cs @@ -4,7 +4,6 @@ namespace CustomAvatar { -#if BS_0_11_2 public class AvatarLoader { private static readonly string[] AvatarExtensions = @@ -46,92 +45,4 @@ private static void GetAvatarsInPath(string path, Action call FileBrowserModel.GetContentOfDirectory(path, AvatarExtensions, callback); } } -#elif BS_0_11_1 - public class AvatarLoader - { - private readonly List _avatars = new List(); - - public IReadOnlyList Avatars - { - get { return _avatars; } - } - - public AvatarLoader(string customAvatarsPath, Action> loadedCallback) - { - void AvatarPathsLoaded(FileBrowserItem[] items) - { - foreach (var item in items) - { - if (Directory.Exists(item.fullPath)) continue; - var newAvatar = new CustomAvatar(item.fullPath); - _avatars.Add(newAvatar); - } - - loadedCallback(_avatars.ToArray()); - } - - GetAvatarsInPath(customAvatarsPath, AvatarPathsLoaded); - } - - public int IndexOf(CustomAvatar customAvatar) - { - return _avatars.IndexOf(customAvatar); - } - - private static void GetAvatarsInPath(string path, Action callback) - { - AvatarFileBrowserModel.Instance.GetContentOfDirectory(path, callback); - } - - public class AvatarFileBrowserModel : FileBrowserModel - { - public static readonly AvatarFileBrowserModel Instance = new AvatarFileBrowserModel(); - - protected override FileBrowserItem[] GetContentOfDirectory(string path) - { - var list = new List(); - var path2 = path + "\\.."; - if (Path.GetFullPath(path2) != Path.GetFullPath(path)) - { - list.Add(new DirectoryBrowserItem("..", Path.GetFullPath(path2))); - } - if (!CanOpenDirectory(path)) - { - return list.ToArray(); - } - path = Path.GetFullPath(path); - var directories = Directory.GetDirectories(path); - foreach (var path3 in directories) - { - list.Add(new DirectoryBrowserItem(Path.GetFileName(path3), Path.GetFullPath(path3))); - } - var files = Directory.GetFiles(path); - foreach (var path4 in files) - { - var a = Path.GetExtension(path4).ToLower(); - if (a == ".avatar") - { - list.Add(new FileBrowserItem(Path.GetFileName(path4), Path.GetFullPath(path4))); - } - } - return list.ToArray(); - } - - private static bool CanOpenDirectory(string path) - { - bool result; - try - { - Directory.GetDirectories(path); - result = true; - } - catch - { - result = false; - } - return result; - } - } - } -#endif } \ No newline at end of file diff --git a/CustomAvatar/CustomAvatar.csproj b/CustomAvatar/CustomAvatar.csproj index bdd7696..39f7323 100644 --- a/CustomAvatar/CustomAvatar.csproj +++ b/CustomAvatar/CustomAvatar.csproj @@ -49,14 +49,6 @@ bin\0.11.2\ - - bin\0_11_2\ - BS_0_11_2 - - - bin\0_11_1\ - BS_0_11_1 - ..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\Assembly-CSharp.dll diff --git a/CustomAvatar/Plugin.cs b/CustomAvatar/Plugin.cs index 422610c..81a17fd 100644 --- a/CustomAvatar/Plugin.cs +++ b/CustomAvatar/Plugin.cs @@ -60,7 +60,7 @@ public string Name public string Version { - get { return "3.1.0-beta"; } + get { return "3.1.1-beta"; } } public static void Log(string message) diff --git a/CustomAvatar/Properties/AssemblyInfo.cs b/CustomAvatar/Properties/AssemblyInfo.cs index 4686b5c..73ae7e2 100644 --- a/CustomAvatar/Properties/AssemblyInfo.cs +++ b/CustomAvatar/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.1.0.0")] -[assembly: AssemblyFileVersion("3.1.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("3.1.1.0")] +[assembly: AssemblyFileVersion("3.1.1.0")] \ No newline at end of file