Update READMEs, code cleanup

This commit is contained in:
msk
2022-01-22 23:41:31 -08:00
parent ba206f54ec
commit 2f4ef7c87c
5 changed files with 29 additions and 23 deletions
+3 -3
View File
@@ -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 -1
View File
@@ -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);
+13 -9
View File
@@ -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,7 +52,9 @@ namespace TNHQoLImprovements
initialized = true;
}
#endregion
#region UPDATE
private void Update()
{
if (!initialized || tnhTweakerInstalled)
@@ -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));
}
}
}
+4 -2
View File
@@ -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*.
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.**