mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-02 20:24:26 -07:00
Update READMEs, code cleanup
This commit is contained in:
+3
-3
@@ -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.**
|
||||
**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.**
|
||||
@@ -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<FVRSceneSettings>().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);
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -47,12 +47,5 @@ namespace TNHQoLImprovements
|
||||
var playerCountComponent = gObjLeaderboard.AddComponent<LeaderboardPlayerCount>();
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user