mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-02 20:24:26 -07:00
win/lose hold stats, hp crystal expiration
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#if H3VR_IMPORTED
|
||||
using HarmonyLib;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using BepInEx;
|
||||
@@ -42,10 +43,11 @@ public class MeatKitPlugin : BaseUnityPlugin
|
||||
|
||||
private static InPlay instance;
|
||||
|
||||
private LeaderboardPlayerCountPatch lpc;
|
||||
private bool lpcModGone = false;
|
||||
private float lpcModSearchTimeEnd;
|
||||
|
||||
private Harmony harmony;
|
||||
|
||||
private void SceneChanged(Scene from, Scene to)
|
||||
{
|
||||
//Logger.LogInfo(string.Format("scene chg: {0} --> {1}", from.name, to.name));
|
||||
@@ -63,6 +65,11 @@ public class MeatKitPlugin : BaseUnityPlugin
|
||||
}
|
||||
}
|
||||
|
||||
public MeatKitPlugin(): base()
|
||||
{
|
||||
harmony = new Harmony("muskit.TNHQualityOfLifeImprovements");
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// load asset bundle
|
||||
@@ -96,11 +103,17 @@ public class MeatKitPlugin : BaseUnityPlugin
|
||||
true,
|
||||
"Shows how many holds the player has completed by their radar hand.");
|
||||
|
||||
// patch KillAll code (only acts w/ health crystals)
|
||||
TimedHealthCrystalPatch.Patch(harmony);
|
||||
|
||||
// patch leaderboard code
|
||||
if (cfgShowLPC.Value)
|
||||
lpc = new LeaderboardPlayerCountPatch();
|
||||
LeaderboardPlayerCountPatch.Patch(harmony);
|
||||
|
||||
if(cfgShowHolds.Value)
|
||||
HoldCounter.Patch(harmony);
|
||||
|
||||
// give 120 seconds to search for old mod
|
||||
// give 120 seconds to search for old mod, which we want to kill
|
||||
lpcModSearchTimeEnd = Time.realtimeSinceStartup + 120;
|
||||
}
|
||||
// DO NOT EDIT.
|
||||
|
||||
Reference in New Issue
Block a user