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
|
## Features
|
||||||
* More visible HP counter
|
* More visible HP counter
|
||||||
* Token and hold counter on wrist
|
* Token and hold counter on wrist
|
||||||
* Player count for online leaderboards
|
* Player count for online leaderboards; see how you stack up!
|
||||||
* Incompatiible with TNHTweaker
|
* 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*.
|
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
|
public class HoldCounter : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
private void OnDeath(bool _)
|
||||||
|
{
|
||||||
|
Debug.Log("I died!");
|
||||||
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
transform.parent = GameObject.Find("_NewTAHReticle/TAHReticle_HealthBar").transform;
|
transform.parent = GameObject.Find("_NewTAHReticle/TAHReticle_HealthBar").transform;
|
||||||
transform.localPosition = new Vector3(-1f, 0, -.5f);
|
transform.localPosition = new Vector3(-1f, 0, -.5f);
|
||||||
transform.localRotation = Quaternion.Euler(90, 0, 0);
|
transform.localRotation = Quaternion.Euler(90, 0, 0);
|
||||||
transform.localScale = new Vector3(0.002f, 0.002f, 0.002f);
|
transform.localScale = new Vector3(0.002f, 0.002f, 0.002f);
|
||||||
|
|
||||||
|
GameObject.Find("[SceneSettings]").GetComponent<FVRSceneSettings>().PlayerDeathEvent += OnDeath;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
string display = "";
|
string display = "";
|
||||||
if (InPlay.tnhManager.ProgressionMode == TNHSetting_ProgressionType.Marathon)
|
if (InPlay.tnhManager.ProgressionMode == TNHSetting_ProgressionType.Marathon)
|
||||||
display = string.Format("{0} / ∞", InPlay.tnhManager.m_level);
|
display = InPlay.tnhManager.m_level.ToString() + " / ∞";
|
||||||
else
|
else
|
||||||
display = string.Format("{0} / {1}", InPlay.tnhManager.m_level, InPlay.tnhManager.m_maxLevels);
|
display = string.Format("{0} / {1}", InPlay.tnhManager.m_level, InPlay.tnhManager.m_maxLevels);
|
||||||
|
|
||||||
|
|||||||
@@ -20,15 +20,16 @@ namespace TNHQoLImprovements
|
|||||||
private Text lblGlobalScores;
|
private Text lblGlobalScores;
|
||||||
private GameObject gObjLoading;
|
private GameObject gObjLoading;
|
||||||
|
|
||||||
public void Start()
|
#region INITIALIZATION
|
||||||
{
|
// public void Start()
|
||||||
Debug.Log("--- Installed BepInEx Plugins ---");
|
// {
|
||||||
foreach (var plugin in Chainloader.PluginInfos)
|
// Debug.Log("--- Installed BepInEx Plugins ---");
|
||||||
{
|
// foreach (var plugin in Chainloader.PluginInfos)
|
||||||
Debug.Log(plugin.Key);
|
// {
|
||||||
}
|
// Debug.Log(plugin.Key);
|
||||||
Debug.Log("--- End Plugins ---");
|
// }
|
||||||
}
|
// Debug.Log("--- End Plugins ---");
|
||||||
|
//}
|
||||||
|
|
||||||
public void Init(TNH_ScoreDisplay tnhScore, Text scoreLabel, GameObject gObjLoading)
|
public void Init(TNH_ScoreDisplay tnhScore, Text scoreLabel, GameObject gObjLoading)
|
||||||
{
|
{
|
||||||
@@ -51,8 +52,10 @@ namespace TNHQoLImprovements
|
|||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
private void Update()
|
#region UPDATE
|
||||||
|
private void Update()
|
||||||
{
|
{
|
||||||
if (!initialized || tnhTweakerInstalled)
|
if (!initialized || tnhTweakerInstalled)
|
||||||
return;
|
return;
|
||||||
@@ -81,4 +84,5 @@ namespace TNHQoLImprovements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -47,12 +47,5 @@ namespace TNHQoLImprovements
|
|||||||
var playerCountComponent = gObjLeaderboard.AddComponent<LeaderboardPlayerCount>();
|
var playerCountComponent = gObjLeaderboard.AddComponent<LeaderboardPlayerCount>();
|
||||||
playerCountComponent.Init(__instance, uiGlobalText, gObjLoading);
|
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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,8 @@ A *Hot Dogs, Horseshoes, and Hand Grenades* mod that adds quality of life improv
|
|||||||
* More visible HP counter
|
* More visible HP counter
|
||||||
* Token and hold counter on wrist
|
* Token and hold counter on wrist
|
||||||
* Player count for online leaderboards
|
* 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*.
|
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.**
|
||||||
Reference in New Issue
Block a user