diff --git a/NewHorizons/AchievementsPlus/AchievementHandler.cs b/NewHorizons/AchievementsPlus/AchievementHandler.cs index 0a6938a4..da9014f8 100644 --- a/NewHorizons/AchievementsPlus/AchievementHandler.cs +++ b/NewHorizons/AchievementsPlus/AchievementHandler.cs @@ -1,7 +1,6 @@ using NewHorizons.External.Configs; using NewHorizons.Utility; using OWML.ModHelper; -using System; using System.Collections.Generic; using System.Linq; diff --git a/NewHorizons/Builder/Props/DialogueBuilder.cs b/NewHorizons/Builder/Props/DialogueBuilder.cs index aeaf2741..3e5e75e7 100644 --- a/NewHorizons/Builder/Props/DialogueBuilder.cs +++ b/NewHorizons/Builder/Props/DialogueBuilder.cs @@ -1,6 +1,7 @@ using NewHorizons.External.Modules; using NewHorizons.Handlers; using OWML.Common; +using System.IO; using System.Xml; using UnityEngine; namespace NewHorizons.Builder.Props @@ -76,8 +77,9 @@ namespace NewHorizons.Builder.Props var dialogueTree = conversationZone.AddComponent(); - var xml = System.IO.File.ReadAllText(mod.Manifest.ModFolderPath + info.xmlFile); + var xml = File.ReadAllText(mod.Manifest.ModFolderPath + info.xmlFile); var text = new TextAsset(xml); + text.name = Path.GetFileNameWithoutExtension(info.xmlFile); dialogueTree.SetTextXml(text); AddTranslation(xml); diff --git a/NewHorizons/Builder/Props/NomaiTextBuilder.cs b/NewHorizons/Builder/Props/NomaiTextBuilder.cs index 349c45bf..6ade077e 100644 --- a/NewHorizons/Builder/Props/NomaiTextBuilder.cs +++ b/NewHorizons/Builder/Props/NomaiTextBuilder.cs @@ -3,6 +3,7 @@ using NewHorizons.Handlers; using NewHorizons.Utility; using OWML.Common; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Xml; using UnityEngine; @@ -20,14 +21,14 @@ namespace NewHorizons.Builder.Props private static GameObject _cairnPrefab; private static GameObject _recorderPrefab; private static GameObject _preCrashRecorderPrefab; - + private static Dictionary arcInfoToCorrespondingSpawnedGameObject = new Dictionary(); public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(PropModule.NomaiTextArcInfo arc) { if (!arcInfoToCorrespondingSpawnedGameObject.ContainsKey(arc)) return null; return arcInfoToCorrespondingSpawnedGameObject[arc]; } - + private static Dictionary conversationInfoToCorrespondingSpawnedGameObject = new Dictionary(); public static GameObject GetSpawnedGameObjectByNomaiTextInfo(PropModule.NomaiTextInfo convo) { @@ -85,7 +86,7 @@ namespace NewHorizons.Builder.Props _recorderPrefab = SearchUtilities.Find("Comet_Body/Prefab_NOM_Shuttle/Sector_NomaiShuttleInterior/Interactibles_NomaiShuttleInterior/Prefab_NOM_Recorder").InstantiateInactive(); _recorderPrefab.name = "Prefab_NOM_Recorder"; _recorderPrefab.transform.rotation = Quaternion.identity; - + _preCrashRecorderPrefab = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_EscapePodCrashSite/Sector_CrashFragment/Interactables_CrashFragment/Prefab_NOM_Recorder").InstantiateInactive(); _preCrashRecorderPrefab.name = "Prefab_NOM_Recorder_Vessel"; _preCrashRecorderPrefab.transform.rotation = Quaternion.identity; @@ -100,191 +101,194 @@ namespace NewHorizons.Builder.Props switch (info.type) { case PropModule.NomaiTextInfo.NomaiTextType.Wall: - { - var nomaiWallTextObj = MakeWallText(planetGO, sector, info, xmlPath).gameObject; - - nomaiWallTextObj.transform.parent = sector?.transform ?? planetGO.transform; - nomaiWallTextObj.transform.position = planetGO.transform.TransformPoint(info.position); - if (info.normal != null) { - // In global coordinates (normal was in local coordinates) - var up = (nomaiWallTextObj.transform.position - planetGO.transform.position).normalized; - var forward = planetGO.transform.TransformDirection(info.normal).normalized; + var nomaiWallTextObj = MakeWallText(planetGO, sector, info, xmlPath).gameObject; - nomaiWallTextObj.transform.up = up; - nomaiWallTextObj.transform.forward = forward; - } - if (info.rotation != null) - { - nomaiWallTextObj.transform.rotation = planetGO.transform.TransformRotation(Quaternion.Euler(info.rotation)); - } - - nomaiWallTextObj.SetActive(true); - conversationInfoToCorrespondingSpawnedGameObject[info] = nomaiWallTextObj; - break; - } - case PropModule.NomaiTextInfo.NomaiTextType.Scroll: - { - var customScroll = _scrollPrefab.InstantiateInactive(); - - var nomaiWallText = MakeWallText(planetGO, sector, info, xmlPath); - nomaiWallText.transform.parent = customScroll.transform; - nomaiWallText.transform.localPosition = Vector3.zero; - nomaiWallText.transform.localRotation = Quaternion.identity; - - nomaiWallText._showTextOnStart = false; - - // Don't want to be able to translate until its in a socket - nomaiWallText.GetComponent().enabled = false; - - nomaiWallText.gameObject.SetActive(true); - - var scrollItem = customScroll.GetComponent(); - - // Idk why this thing is always around - GameObject.Destroy(customScroll.transform.Find("Arc_BH_City_Forum_2").gameObject); - - // This variable is the bane of my existence i dont get it - scrollItem._nomaiWallText = nomaiWallText; - - // Because the scroll was already awake it does weird shit in Awake and makes some of the entries in this array be null - scrollItem._colliders = new OWCollider[] { scrollItem.GetComponent() }; - - // Else when you put them down you can't pick them back up - customScroll.GetComponent()._physicsRemoved = false; - - // Place scroll - customScroll.transform.parent = sector?.transform ?? planetGO.transform; - customScroll.transform.position = planetGO.transform.TransformPoint(info.position ?? Vector3.zero); - - var up = planetGO.transform.InverseTransformPoint(customScroll.transform.position).normalized; - customScroll.transform.rotation = Quaternion.FromToRotation(customScroll.transform.up, up) * customScroll.transform.rotation; - - customScroll.SetActive(true); - - // Enable the collider and renderer - Main.Instance.ModHelper.Events.Unity.RunWhen( - () => Main.IsSystemReady, - () => + nomaiWallTextObj.transform.parent = sector?.transform ?? planetGO.transform; + nomaiWallTextObj.transform.position = planetGO.transform.TransformPoint(info.position); + if (info.normal != null) { - Logger.Log("Fixing scroll!"); - scrollItem._nomaiWallText = nomaiWallText; - scrollItem.SetSector(sector); - customScroll.transform.Find("Props_NOM_Scroll/Props_NOM_Scroll_Geo").GetComponent().enabled = true; - customScroll.transform.Find("Props_NOM_Scroll/Props_NOM_Scroll_Collider").gameObject.SetActive(true); - nomaiWallText.gameObject.GetComponent().enabled = false; - customScroll.GetComponent().enabled = true; + // In global coordinates (normal was in local coordinates) + var up = (nomaiWallTextObj.transform.position - planetGO.transform.position).normalized; + var forward = planetGO.transform.TransformDirection(info.normal).normalized; + + nomaiWallTextObj.transform.up = up; + nomaiWallTextObj.transform.forward = forward; } - ); - conversationInfoToCorrespondingSpawnedGameObject[info] = customScroll; - break; - } + if (info.rotation != null) + { + nomaiWallTextObj.transform.rotation = planetGO.transform.TransformRotation(Quaternion.Euler(info.rotation)); + } + + nomaiWallTextObj.SetActive(true); + conversationInfoToCorrespondingSpawnedGameObject[info] = nomaiWallTextObj; + break; + } + case PropModule.NomaiTextInfo.NomaiTextType.Scroll: + { + var customScroll = _scrollPrefab.InstantiateInactive(); + + var nomaiWallText = MakeWallText(planetGO, sector, info, xmlPath); + nomaiWallText.transform.parent = customScroll.transform; + nomaiWallText.transform.localPosition = Vector3.zero; + nomaiWallText.transform.localRotation = Quaternion.identity; + + nomaiWallText._showTextOnStart = false; + + // Don't want to be able to translate until its in a socket + nomaiWallText.GetComponent().enabled = false; + + nomaiWallText.gameObject.SetActive(true); + + var scrollItem = customScroll.GetComponent(); + + // Idk why this thing is always around + GameObject.Destroy(customScroll.transform.Find("Arc_BH_City_Forum_2").gameObject); + + // This variable is the bane of my existence i dont get it + scrollItem._nomaiWallText = nomaiWallText; + + // Because the scroll was already awake it does weird shit in Awake and makes some of the entries in this array be null + scrollItem._colliders = new OWCollider[] { scrollItem.GetComponent() }; + + // Else when you put them down you can't pick them back up + customScroll.GetComponent()._physicsRemoved = false; + + // Place scroll + customScroll.transform.parent = sector?.transform ?? planetGO.transform; + customScroll.transform.position = planetGO.transform.TransformPoint(info.position ?? Vector3.zero); + + var up = planetGO.transform.InverseTransformPoint(customScroll.transform.position).normalized; + customScroll.transform.rotation = Quaternion.FromToRotation(customScroll.transform.up, up) * customScroll.transform.rotation; + + customScroll.SetActive(true); + + // Enable the collider and renderer + Main.Instance.ModHelper.Events.Unity.RunWhen( + () => Main.IsSystemReady, + () => + { + Logger.Log("Fixing scroll!"); + scrollItem._nomaiWallText = nomaiWallText; + scrollItem.SetSector(sector); + customScroll.transform.Find("Props_NOM_Scroll/Props_NOM_Scroll_Geo").GetComponent().enabled = true; + customScroll.transform.Find("Props_NOM_Scroll/Props_NOM_Scroll_Collider").gameObject.SetActive(true); + nomaiWallText.gameObject.GetComponent().enabled = false; + customScroll.GetComponent().enabled = true; + } + ); + conversationInfoToCorrespondingSpawnedGameObject[info] = customScroll; + break; + } case PropModule.NomaiTextInfo.NomaiTextType.Computer: - { - var computerObject = _computerPrefab.InstantiateInactive(); + { + var computerObject = _computerPrefab.InstantiateInactive(); - computerObject.transform.parent = sector?.transform ?? planetGO.transform; - computerObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero); + computerObject.transform.parent = sector?.transform ?? planetGO.transform; + computerObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero); - var up = computerObject.transform.position - planetGO.transform.position; - if (info.normal != null) up = planetGO.transform.TransformDirection(info.normal); - computerObject.transform.rotation = Quaternion.FromToRotation(Vector3.up, up) * computerObject.transform.rotation; + var up = computerObject.transform.position - planetGO.transform.position; + if (info.normal != null) up = planetGO.transform.TransformDirection(info.normal); + computerObject.transform.rotation = Quaternion.FromToRotation(Vector3.up, up) * computerObject.transform.rotation; - var computer = computerObject.GetComponent(); - computer.SetSector(sector); + var computer = computerObject.GetComponent(); + computer.SetSector(sector); - computer._dictNomaiTextData = MakeNomaiTextDict(xmlPath); - computer._nomaiTextAsset = new TextAsset(xmlPath); - AddTranslation(xmlPath); + computer._dictNomaiTextData = MakeNomaiTextDict(xmlPath); + computer._nomaiTextAsset = new TextAsset(xmlPath); + computer._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile); + AddTranslation(xmlPath); - // Make sure the computer model is loaded - OWAssetHandler.LoadObject(computerObject); - sector.OnOccupantEnterSector.AddListener((x) => OWAssetHandler.LoadObject(computerObject)); + // Make sure the computer model is loaded + OWAssetHandler.LoadObject(computerObject); + sector.OnOccupantEnterSector.AddListener((x) => OWAssetHandler.LoadObject(computerObject)); - computerObject.SetActive(true); - conversationInfoToCorrespondingSpawnedGameObject[info] = computerObject; - break; - } + computerObject.SetActive(true); + conversationInfoToCorrespondingSpawnedGameObject[info] = computerObject; + break; + } case PropModule.NomaiTextInfo.NomaiTextType.Cairn: - { - var cairnObject = _cairnPrefab.InstantiateInactive(); - - cairnObject.transform.parent = sector?.transform ?? planetGO.transform; - cairnObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero); - - if (info.rotation != null) { - cairnObject.transform.rotation = planetGO.transform.TransformRotation(Quaternion.Euler(info.rotation)); + var cairnObject = _cairnPrefab.InstantiateInactive(); + + cairnObject.transform.parent = sector?.transform ?? planetGO.transform; + cairnObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero); + + if (info.rotation != null) + { + cairnObject.transform.rotation = planetGO.transform.TransformRotation(Quaternion.Euler(info.rotation)); + } + else + { + // By default align it to normal + var up = (cairnObject.transform.position - planetGO.transform.position).normalized; + cairnObject.transform.rotation = Quaternion.FromToRotation(Vector3.up, up) * cairnObject.transform.rotation; + } + + // Idk do we have to set it active before finding things? + cairnObject.SetActive(true); + + // Make it do the thing when it finishes being knocked over + foreach (var rock in cairnObject.GetComponent()._rocks) + { + rock._returning = false; + rock._owCollider.SetActivation(true); + rock.enabled = false; + } + + // So we can actually knock it over + cairnObject.GetComponent().enabled = true; + + var nomaiWallText = cairnObject.transform.Find("Props_TH_ClutterSmall/Arc_Short").GetComponent(); + nomaiWallText.SetSector(sector); + + nomaiWallText._dictNomaiTextData = MakeNomaiTextDict(xmlPath); + nomaiWallText._nomaiTextAsset = new TextAsset(xmlPath); + nomaiWallText._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile); + AddTranslation(xmlPath); + + // Make sure the computer model is loaded + OWAssetHandler.LoadObject(cairnObject); + sector.OnOccupantEnterSector.AddListener((x) => OWAssetHandler.LoadObject(cairnObject)); + conversationInfoToCorrespondingSpawnedGameObject[info] = cairnObject; + break; } - else - { - // By default align it to normal - var up = (cairnObject.transform.position - planetGO.transform.position).normalized; - cairnObject.transform.rotation = Quaternion.FromToRotation(Vector3.up, up) * cairnObject.transform.rotation; - } - - // Idk do we have to set it active before finding things? - cairnObject.SetActive(true); - - // Make it do the thing when it finishes being knocked over - foreach (var rock in cairnObject.GetComponent()._rocks) - { - rock._returning = false; - rock._owCollider.SetActivation(true); - rock.enabled = false; - } - - // So we can actually knock it over - cairnObject.GetComponent().enabled = true; - - var nomaiWallText = cairnObject.transform.Find("Props_TH_ClutterSmall/Arc_Short").GetComponent(); - nomaiWallText.SetSector(sector); - - nomaiWallText._dictNomaiTextData = MakeNomaiTextDict(xmlPath); - nomaiWallText._nomaiTextAsset = new TextAsset(xmlPath); - AddTranslation(xmlPath); - - // Make sure the computer model is loaded - OWAssetHandler.LoadObject(cairnObject); - sector.OnOccupantEnterSector.AddListener((x) => OWAssetHandler.LoadObject(cairnObject)); - conversationInfoToCorrespondingSpawnedGameObject[info] = cairnObject; - break; - } case PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder: case PropModule.NomaiTextInfo.NomaiTextType.Recorder: - { - var recorderObject = (info.type == PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder? _preCrashRecorderPrefab : _recorderPrefab).InstantiateInactive(); - - recorderObject.transform.parent = sector?.transform ?? planetGO.transform; - recorderObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero); - - if (info.rotation != null) { - recorderObject.transform.rotation = planetGO.transform.TransformRotation(Quaternion.Euler(info.rotation)); + var recorderObject = (info.type == PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab).InstantiateInactive(); + + recorderObject.transform.parent = sector?.transform ?? planetGO.transform; + recorderObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero); + + if (info.rotation != null) + { + recorderObject.transform.rotation = planetGO.transform.TransformRotation(Quaternion.Euler(info.rotation)); + } + else + { + var up = recorderObject.transform.position - planetGO.transform.position; + recorderObject.transform.rotation = Quaternion.FromToRotation(Vector3.up, up) * recorderObject.transform.rotation; + } + + var nomaiText = recorderObject.GetComponentInChildren(); + nomaiText.SetSector(sector); + + nomaiText._dictNomaiTextData = MakeNomaiTextDict(xmlPath); + nomaiText._nomaiTextAsset = new TextAsset(xmlPath); + nomaiText._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile); + AddTranslation(xmlPath); + + // Make sure the recorder model is loaded + OWAssetHandler.LoadObject(recorderObject); + sector.OnOccupantEnterSector.AddListener((x) => OWAssetHandler.LoadObject(recorderObject)); + + recorderObject.SetActive(true); + + recorderObject.transform.Find("InteractSphere").gameObject.GetComponent().enabled = true; + conversationInfoToCorrespondingSpawnedGameObject[info] = recorderObject; + break; } - else - { - var up = recorderObject.transform.position - planetGO.transform.position; - recorderObject.transform.rotation = Quaternion.FromToRotation(Vector3.up, up) * recorderObject.transform.rotation; - } - - var nomaiText = recorderObject.GetComponentInChildren(); - nomaiText.SetSector(sector); - - nomaiText._dictNomaiTextData = MakeNomaiTextDict(xmlPath); - nomaiText._nomaiTextAsset = new TextAsset(xmlPath); - AddTranslation(xmlPath); - - // Make sure the recorder model is loaded - OWAssetHandler.LoadObject(recorderObject); - sector.OnOccupantEnterSector.AddListener((x) => OWAssetHandler.LoadObject(recorderObject)); - - recorderObject.SetActive(true); - - recorderObject.transform.Find("InteractSphere").gameObject.GetComponent().enabled = true; - conversationInfoToCorrespondingSpawnedGameObject[info] = recorderObject; - break; - } default: Logger.LogError($"Unsupported NomaiText type {info.type}"); break; @@ -306,6 +310,7 @@ namespace NewHorizons.Builder.Props var nomaiWallText = nomaiWallTextObj.AddComponent(); var text = new TextAsset(xmlPath); + text.name = Path.GetFileNameWithoutExtension(info.xmlFile); BuildArcs(xmlPath, nomaiWallText, nomaiWallTextObj, info); AddTranslation(xmlPath); @@ -325,7 +330,7 @@ namespace NewHorizons.Builder.Props RefreshArcs(nomaiWallText, conversationZone, info); } - internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info) + internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info) { var dict = nomaiWallText._dictNomaiTextData; Random.InitState(info.seed); @@ -349,7 +354,7 @@ namespace NewHorizons.Builder.Props GameObject arc = MakeArc(arcInfo, conversationZone, parent, textEntryID); arc.name = $"Arc {i} - Child of {parentID}"; - + arcsByID.Add(textEntryID, arc); i++; @@ -419,7 +424,7 @@ namespace NewHorizons.Builder.Props arc.GetComponent().enabled = false; arc.SetActive(true); - + arcInfoToCorrespondingSpawnedGameObject[arcInfo] = arc; return arc; diff --git a/NewHorizons/INewHorizons.cs b/NewHorizons/INewHorizons.cs new file mode 100644 index 00000000..fd10e7e6 --- /dev/null +++ b/NewHorizons/INewHorizons.cs @@ -0,0 +1,35 @@ +using OWML.Common; +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Events; + +namespace NewHorizons +{ + public interface INewHorizons + { + [Obsolete("Create(Dictionary config) is deprecated, please use LoadConfigs(IModBehaviour mod) instead")] + void Create(Dictionary config); + + [Obsolete("Create(Dictionary config) is deprecated, please use LoadConfigs(IModBehaviour mod) instead")] + void Create(Dictionary config, IModBehaviour mod); + + void LoadConfigs(IModBehaviour mod); + + GameObject GetPlanet(string name); + + string GetCurrentStarSystem(); + + UnityEvent GetChangeStarSystemEvent(); + + UnityEvent GetStarSystemLoadedEvent(); + + bool SetDefaultSystem(string name); + + bool ChangeCurrentStarSystem(string name); + + string[] GetInstalledAddons(); + + GameObject SpawnObject(GameObject planet, Sector sector, string propToCopyPath, Vector3 position, Vector3 eulerAngles, float scale, bool alignWithNormal); + } +} diff --git a/NewHorizons/Main.cs b/NewHorizons/Main.cs index 3b10c960..955b7cd5 100644 --- a/NewHorizons/Main.cs +++ b/NewHorizons/Main.cs @@ -8,6 +8,7 @@ using NewHorizons.Handlers; using NewHorizons.Utility; using NewHorizons.Utility.DebugMenu; using NewHorizons.Utility.DebugUtilities; +using NewHorizons.VoiceActing; using OWML.Common; using OWML.ModHelper; using System; @@ -183,6 +184,7 @@ namespace NewHorizons Instance.ModHelper.Menus.PauseMenu.OnInit += DebugReload.InitializePauseMenu; AchievementHandler.Init(); + VoiceHandler.Init(); } public void OnDestroy() diff --git a/NewHorizons/NewHorizonsApi.cs b/NewHorizons/NewHorizonsApi.cs index 135579ac..191d87dd 100644 --- a/NewHorizons/NewHorizonsApi.cs +++ b/NewHorizons/NewHorizonsApi.cs @@ -9,9 +9,10 @@ using System.Linq; using UnityEngine; using UnityEngine.Events; using Logger = NewHorizons.Utility.Logger; + namespace NewHorizons { - public class NewHorizonsApi + public class NewHorizonsApi : INewHorizons { [Obsolete("Create(Dictionary config) is deprecated, please use LoadConfigs(IModBehaviour mod) instead")] public void Create(Dictionary config) diff --git a/NewHorizons/VoiceActing/IVoiceMod.cs b/NewHorizons/VoiceActing/IVoiceMod.cs new file mode 100644 index 00000000..d9b12384 --- /dev/null +++ b/NewHorizons/VoiceActing/IVoiceMod.cs @@ -0,0 +1,7 @@ +namespace NewHorizons.VoiceActing +{ + public interface IVoiceMod + { + void RegisterAssets(string assetsFolder); + } +} diff --git a/NewHorizons/VoiceActing/VoiceHandler.cs b/NewHorizons/VoiceActing/VoiceHandler.cs new file mode 100644 index 00000000..4718d5a3 --- /dev/null +++ b/NewHorizons/VoiceActing/VoiceHandler.cs @@ -0,0 +1,41 @@ +using NewHorizons.Utility; +using System.IO; +using System.Linq; + +namespace NewHorizons.VoiceActing +{ + public static class VoiceHandler + { + public static bool Enabled { get; private set; } + + private static IVoiceMod API; + + public static void Init() + { + API = Main.Instance.ModHelper.Interaction.TryGetModApi("Krevace.VoiceMod"); + + if (API == null) + { + Logger.Log("VoiceMod isn't installed"); + Enabled = false; + return; + } + + Enabled = true; + + foreach (var mod in Main.Instance.GetDependants().Append(Main.Instance)) + { + var folder = $"{mod.ModHelper.Manifest.ModFolderPath}VoiceMod"; + if (Directory.Exists(folder)) + { + Logger.Log($"Registering VoiceMod audio for {mod.ModHelper.Manifest.Name} from {folder}"); + API.RegisterAssets(folder); + } + else + { + Logger.Log($"Didn't find VoiceMod audio for {mod.ModHelper.Manifest.Name} at {folder}"); + } + } + } + } +}