mirror of
https://github.com/Brybry16/BetterPolus.git
synced 2026-10-19 15:51:40 +00:00
Merge branch 'Pandraghon-fix/version_shower' into main
This commit is contained in:
commit
2af248eeed
2 files changed
+8
-22
No files matched your search
@@ -3,6 +3,7 @@ using BepInEx.IL2CPP;
|
|||||||
using BepInEx.Logging;
|
using BepInEx.Logging;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using Reactor;
|
using Reactor;
|
||||||
|
using Reactor.Patches;
|
||||||
|
|
||||||
namespace BetterPolus
|
namespace BetterPolus
|
||||||
{
|
{
|
||||||
@@ -22,6 +23,13 @@ namespace BetterPolus
|
|||||||
log = Log;
|
log = Log;
|
||||||
|
|
||||||
log.LogMessage("BetterPolus Mod loaded");
|
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();
|
Harmony.PatchAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user