win/lose hold stats, hp crystal expiration

This commit is contained in:
msk
2022-01-26 01:23:39 -08:00
parent 6f938e95c8
commit fcea383739
22 changed files with 657 additions and 60 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
PackageName: TNH_Quality_of_Life_Improvements
Author: muskit
Version: 1.0.1
Version: 1.1.0
Icon: {fileID: 2800000, guid: 785b7946398f5314b95bf593d2d77d67, type: 3}
ReadMe: {fileID: 102900000, guid: ab1d6dea017447a48ac348db588a6f35, type: 3}
WebsiteURL: https://github.com/muskit/TNH-Quality-of-Life-Improvements
+16 -3
View File
@@ -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.