diff --git a/Assets/README.md b/Assets/README.md index 4cf3b5f..e5230d2 100644 --- a/Assets/README.md +++ b/Assets/README.md @@ -4,9 +4,9 @@ This mod adds quality of life improvements to the *Take and Hold* experience. ## Features * More visible HP counter * Token and hold counter on wrist -* Player count for online leaderboards - * Incompatiible with TNHTweaker +* Player count for online leaderboards; see how you stack up! + * Incompatible with [*TakeAndHoldTweaker*](https://h3vr.thunderstore.io/package/devyndamonster/TakeAndHoldTweaker/); feature will be disabled! Enable/disable these features in your mod manager's *Config editor*. -**The [TNH Leaderboard Player Count](https://h3vr.thunderstore.io/package/muskit/TNH_Leaderboard_Player_Count/) has been merged with this mod. Please remove that mod as it lacks features and is no longer supported.** \ No newline at end of file +**NOTE: [*TNH Leaderboard Player Count*](https://h3vr.thunderstore.io/package/muskit/TNH_Leaderboard_Player_Count/) has been merged with this mod. If installed, please remove that mod as it lacks features and is no longer supported.** \ No newline at end of file diff --git a/Assets/_Scripts/HoldCounter.cs b/Assets/_Scripts/HoldCounter.cs index 840f361..2059b0c 100644 --- a/Assets/_Scripts/HoldCounter.cs +++ b/Assets/_Scripts/HoldCounter.cs @@ -8,19 +8,26 @@ namespace TNHQoLImprovements { public class HoldCounter : MonoBehaviour { + private void OnDeath(bool _) + { + Debug.Log("I died!"); + } + void Start() { transform.parent = GameObject.Find("_NewTAHReticle/TAHReticle_HealthBar").transform; transform.localPosition = new Vector3(-1f, 0, -.5f); transform.localRotation = Quaternion.Euler(90, 0, 0); transform.localScale = new Vector3(0.002f, 0.002f, 0.002f); + + GameObject.Find("[SceneSettings]").GetComponent().PlayerDeathEvent += OnDeath; } void Update() { string display = ""; if (InPlay.tnhManager.ProgressionMode == TNHSetting_ProgressionType.Marathon) - display = string.Format("{0} / ∞", InPlay.tnhManager.m_level); + display = InPlay.tnhManager.m_level.ToString() + " / ∞"; else display = string.Format("{0} / {1}", InPlay.tnhManager.m_level, InPlay.tnhManager.m_maxLevels); diff --git a/Assets/_Scripts/LeaderboardPlayerCount.cs b/Assets/_Scripts/LeaderboardPlayerCount.cs index 893a189..75915aa 100644 --- a/Assets/_Scripts/LeaderboardPlayerCount.cs +++ b/Assets/_Scripts/LeaderboardPlayerCount.cs @@ -20,15 +20,16 @@ namespace TNHQoLImprovements private Text lblGlobalScores; private GameObject gObjLoading; - public void Start() - { - Debug.Log("--- Installed BepInEx Plugins ---"); - foreach (var plugin in Chainloader.PluginInfos) - { - Debug.Log(plugin.Key); - } - Debug.Log("--- End Plugins ---"); - } + #region INITIALIZATION + // public void Start() + // { + // Debug.Log("--- Installed BepInEx Plugins ---"); + // foreach (var plugin in Chainloader.PluginInfos) + // { + // Debug.Log(plugin.Key); + // } + // Debug.Log("--- End Plugins ---"); + //} public void Init(TNH_ScoreDisplay tnhScore, Text scoreLabel, GameObject gObjLoading) { @@ -51,8 +52,10 @@ namespace TNHQoLImprovements initialized = true; } + #endregion - private void Update() + #region UPDATE + private void Update() { if (!initialized || tnhTweakerInstalled) return; @@ -81,4 +84,5 @@ namespace TNHQoLImprovements } } } + #endregion } \ No newline at end of file diff --git a/Assets/_Scripts/LeaderboardPlayerCountPatch.cs b/Assets/_Scripts/LeaderboardPlayerCountPatch.cs index b7cc673..e8d5dc7 100644 --- a/Assets/_Scripts/LeaderboardPlayerCountPatch.cs +++ b/Assets/_Scripts/LeaderboardPlayerCountPatch.cs @@ -47,12 +47,5 @@ namespace TNHQoLImprovements var playerCountComponent = gObjLeaderboard.AddComponent(); playerCountComponent.Init(__instance, uiGlobalText, gObjLoading); } - - [HarmonyPostfix] - [HarmonyPatch(typeof(TNH_ScoreDisplay), "SwitchToModeID")] - public static void OnModeIDSwitch_Post(string id, TNH_ScoreDisplay __instance) - { - Debug.Log(string.Format("Changing scoreboard mode to {0}!", id)); - } } } \ No newline at end of file diff --git a/README.md b/README.md index 9c5932f..149f233 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ A *Hot Dogs, Horseshoes, and Hand Grenades* mod that adds quality of life improv * More visible HP counter * Token and hold counter on wrist * Player count for online leaderboards - * Incompatiible with TNHTweaker + * Incompatible with [*TakeAndHoldTweaker*](https://github.com/devyndamonster/TakeAndHoldTweaker/) -Enable/disable these features in your mod manager's *Config editor*. \ No newline at end of file +Features are modifiable via the mod manager's *Config editor*. + +**NOTE: [*TNH Leaderboard Player Count*](https://github.com/muskit/TNH-Leaderboard-Player-Count/) has been merged with this mod.** \ No newline at end of file