diff --git a/NASB Voice Mod/Managers/VoicepackManager.cs b/NASB Voice Mod/Managers/VoicepackManager.cs index e9ef51e..1f11e6c 100644 --- a/NASB Voice Mod/Managers/VoicepackManager.cs +++ b/NASB Voice Mod/Managers/VoicepackManager.cs @@ -22,6 +22,8 @@ public static VoicepackManager Instance private set; } + public static string folder = Path.Combine(Paths.BepInExRootPath, "Voicepacks"); + public List voicepacks = new List(); public VoicepackManager() @@ -31,6 +33,8 @@ public VoicepackManager() audioPlayer = new GameObject("VoiceMod Audio Player").AddComponent(); GameObject.DontDestroyOnLoad(audioPlayer.gameObject); + if (!Directory.Exists(folder)) Directory.CreateDirectory(folder); + Task.Run(() => LoadAllVoicepacks()); } @@ -39,9 +43,8 @@ private void LoadAllVoicepacks() var stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); - var folder = Path.Combine(Paths.BepInExRootPath, "Voicepacks"); - Directory.CreateDirectory(folder); - var files = Directory.GetFiles(folder, "*.zip"); + string[] supportedFileTypes = { ".zip", ".voicepack" }; + var files = Directory.GetFiles(folder).Where(x => supportedFileTypes.Contains(Path.GetExtension(x).ToLower())); foreach (var file in files) { diff --git a/NASB Voice Mod/PluginInfo.cs b/NASB Voice Mod/PluginInfo.cs index d264e24..fd70522 100644 --- a/NASB Voice Mod/PluginInfo.cs +++ b/NASB Voice Mod/PluginInfo.cs @@ -4,6 +4,6 @@ class PluginInfo { public const string PLUGIN_GUID = "com.steven.nasb.voicemod"; public const string PLUGIN_NAME = "Voice Mod"; - public const string PLUGIN_VERSION = "1.0.0"; + public const string PLUGIN_VERSION = "1.1.0"; } } diff --git a/README.md b/README.md index bfc088e..1071fcf 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Then, go to the [latest release of this mod](https://github.com/DeadlyKitten/Nic Place voicepacks in `BepInEx/Voicepacks` (run the game with the mod installed if you don't see this folder). -**Voicepacks must be in ZIP format!** Use the [Voicepack Packer](https://github.com/DeadlyKitten/NickVoicepackPacker) to create your own custom voicepacks. +**Voicepacks must be in .VOICEPACK (preferred) or .ZIP (legacy) format!** Use the [Voicepack Packer](https://github.com/DeadlyKitten/NickVoicepackPacker) to create your own custom voicepacks. Only use one per character, additional voicepacks will be ignored!