diff --git a/BetterPolus/BetterPolusPlugin.cs b/BetterPolus/BetterPolusPlugin.cs index 13b780a..1a54e9e 100644 --- a/BetterPolus/BetterPolusPlugin.cs +++ b/BetterPolus/BetterPolusPlugin.cs @@ -3,6 +3,7 @@ using BepInEx.IL2CPP; using BepInEx.Logging; using HarmonyLib; using Reactor; +using Reactor.Patches; namespace BetterPolus { @@ -22,6 +23,13 @@ namespace BetterPolus log = Log; log.LogMessage("BetterPolus Mod loaded"); + + ReactorVersionShower.TextUpdated += (text) => + { + int index = text.Text.LastIndexOf('\n'); + text.Text = text.Text.Insert(index == -1 ? text.Text.Length - 1 : index, + "\nLoaded [5E4CA6FF]BetterPolus v1.1.2-R []by Brybry"); + }; Harmony.PatchAll(); } diff --git a/BetterPolus/VersionShowerPatch.cs b/BetterPolus/VersionShowerPatch.cs deleted file mode 100644 index 6d7a0ea..0000000 --- a/BetterPolus/VersionShowerPatch.cs +++ /dev/null @@ -1,22 +0,0 @@ -using BepInEx.IL2CPP; -using HarmonyLib; -using UnityEngine; - -namespace BetterPolus -{ - [HarmonyPatch(typeof(VersionShower), nameof(VersionShower.Start))] - public class VersionShowerPatch - { - [HarmonyPostfix] - [HarmonyPatch] - [HarmonyPriority(Priority.First)] - public static void Postfix(VersionShower __instance) - { - var reactorVS = GameObject.Find("ReactorVersion"); - GameObject.Destroy(reactorVS); - - TextRenderer text = __instance.text; - text.Text += "\nLoaded [5E4CA6FF]BetterPolus v1.1.2-R []by Brybry"; - } - } -} \ No newline at end of file