From 9f02302d7f2fa4927e7a0c6886c588061e8046ab Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 25 Aug 2022 23:35:42 -0400 Subject: [PATCH] RichPresence enable guard --- NewHorizons/OtherMods/OWRichPresence/RichPresenceHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NewHorizons/OtherMods/OWRichPresence/RichPresenceHandler.cs b/NewHorizons/OtherMods/OWRichPresence/RichPresenceHandler.cs index eab39d4c..a1e4da27 100644 --- a/NewHorizons/OtherMods/OWRichPresence/RichPresenceHandler.cs +++ b/NewHorizons/OtherMods/OWRichPresence/RichPresenceHandler.cs @@ -52,6 +52,8 @@ namespace NewHorizons.OtherMods.OWRichPresence public static void OnStarSystemLoaded(string name) { + if (!Enabled) return; + if (name == "SolarSystem") return; var localizedName = ShipLogStarChartMode.UniqueIDToName(name); @@ -62,6 +64,8 @@ namespace NewHorizons.OtherMods.OWRichPresence public static void OnChangeStarSystem(string destination) { + if (!Enabled) return; + var localizedName = ShipLogStarChartMode.UniqueIDToName(destination); var message = TranslationHandler.GetTranslation("RICH_PRESENCE_WARPING", TranslationHandler.TextType.UI).Replace("{0}", localizedName);