4 Commits

Author SHA1 Message Date
Alex 00f6cf8d0f remove joke func. that kills the long-deprecated "Leaderboard Player Count" mod; clean up logging 2026-07-14 00:28:36 -07:00
Alex 4d855203f6 chore: update settings.json 2026-07-14 00:23:12 -07:00
Alex e02e25f98a fix unity crashing on start 2026-07-13 22:51:02 -07:00
msk 2f7fe60cd6 add discord contact in the Thunderstore readme 2023-11-13 16:15:45 -08:00
4 changed files with 8 additions and 42 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
{ {
"omnisharp.useModernNet": false "omnisharp.useModernNet": false,
"dotnet.preferCSharpExtension": true
} }
+2 -38
View File
@@ -70,11 +70,6 @@ public static AssetBundle bundle;
// Take and Hold modifications // Take and Hold modifications
private static InPlay playInstance; private static InPlay playInstance;
// Searching for old leaderboards player count mod to disable
private float lpcSearchTime;
private bool lpcStopSearching = false;
private float lpcModSearchTimeEnd;
public static FVRHealthBar hpDisplay; public static FVRHealthBar hpDisplay;
// toggle HP visibility from wrist menu // toggle HP visibility from wrist menu
@@ -91,7 +86,7 @@ public static AssetBundle bundle;
private IEnumerator SceneChangedCoroutine() private IEnumerator SceneChangedCoroutine()
{ {
Destroy(playInstance); Destroy(playInstance);
for (int i = 0; i < 11; ++i) for (int i = 1; i <= 10; ++i)
{ {
// TNH patches // TNH patches
if (GameObject.Find("_GameManager") != null || FindObjectOfType<TNH_Manager>() != null) if (GameObject.Find("_GameManager") != null || FindObjectOfType<TNH_Manager>() != null)
@@ -101,12 +96,9 @@ public static AssetBundle bundle;
playerCamera = GameObject.FindGameObjectWithTag("MainCamera"); playerCamera = GameObject.FindGameObjectWithTag("MainCamera");
break; break;
} }
else // Logger.LogInfo(String.Format("Couldn't find a TNH game. Checking again...({0}/10)", i));
{
Logger.LogInfo(String.Format("Couldn't find a TNH game. Trying again...({0}/10)", i+1));
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
} }
}
if (playInstance == null) if (playInstance == null)
{ {
@@ -162,7 +154,6 @@ public static AssetBundle bundle;
public MeatKitPlugin(): base() public MeatKitPlugin(): base()
{ {
harmony = new Harmony("muskit.TNHQualityOfLifeImprovements"); harmony = new Harmony("muskit.TNHQualityOfLifeImprovements");
lpcSearchTime = 30f + 30f * Mathf.Sin(System.DateTime.Today.DayOfYear / 365f); // lolz
} }
// You are free to edit this method, however please ensure LoadAssets is still called somewhere inside it. // You are free to edit this method, however please ensure LoadAssets is still called somewhere inside it.
@@ -245,9 +236,6 @@ public static AssetBundle bundle;
HealthExpireIndicationType.Flashing, HealthExpireIndicationType.Flashing,
"Add a visual indication on the Health Crystal's despawn timer."); "Add a visual indication on the Health Crystal's despawn timer.");
// calculate end time to search for my deprecated Leaderboard
lpcModSearchTimeEnd = Time.time + lpcSearchTime;
wmbHPToggle = new WristMenuButton("Toggle HP Display", ToggleHPVisibility); wmbHPToggle = new WristMenuButton("Toggle HP Display", ToggleHPVisibility);
RunPatches(); RunPatches();
@@ -296,30 +284,6 @@ public static AssetBundle bundle;
hpDisplay.gameObject.SetActive(hpDisplayEnabled); hpDisplay.gameObject.SetActive(hpDisplayEnabled);
} }
/// <summary>
/// Its only purpose: to kill the deprecated TNH Leaderboard Player Count mod.
/// </summary>
private void Update()
{
if (lpcStopSearching)
return;
foreach (var plugin in Chainloader.PluginInfos)
{
if (plugin.Key == "me.muskit.tnhLeaderboardPlayerCount")
{
Logger.LogWarning("TNH Leaderboard Player Count mod detected. Destroying it to avoid interference.");
Destroy(plugin.Value.Instance);
lpcStopSearching = true;
}
}
if (Time.realtimeSinceStartup >= lpcModSearchTimeEnd)
{
Logger.LogInfo(string.Format("Stopping search for TNH Leaderboard Player Count mod after {0} seconds.", lpcSearchTime));
lpcStopSearching = true;
}
}
// DO NOT CHANGE OR REMOVE THIS METHOD. It's contents will be overwritten when building your package. // DO NOT CHANGE OR REMOVE THIS METHOD. It's contents will be overwritten when building your package.
private void LoadAssets() private void LoadAssets()
+2 -1
View File
@@ -2,7 +2,7 @@
Ever got frustrated checking your HP against a bright ceiling in TNH? Ever got frustrated checking your HP against a bright ceiling in TNH?
Have you forgotten how many Holds you're playing for, so you don't know if you should spend all your tokens? Have you forgotten how many Holds you're playing for, so you don't know if you should spend all your tokens?
And... wait, which hold are you on again? And... wait, which hold are you on again?
**This mod adds quality of life improvements to the *Take and Hold* experience that help with these questions, and then some.** **This mod adds quality of life improvements to the *Take and Hold* experience that seek to address various littles issues like those aforementioned.**
## Features ## Features
* Health counter toggle * Health counter toggle
@@ -20,6 +20,7 @@ Toggle and customize these features in your mod manager's *Config editor*.
**This mod will not disqualify you from Steam or TNHTweaker leaderboards.** **This mod will not disqualify you from Steam or TNHTweaker leaderboards.**
For any issues/ideas, please create an issue at the GitHub repository (linked on Thunderstore page). For any issues/ideas, please create an issue at the GitHub repository (linked on Thunderstore page).
You can also contact me on Discord either by messaging or pinging me `@muskit` in one of the modding servers.
## Changelog ## Changelog
1.2.5 1.2.5
+1 -1
View File
@@ -238,7 +238,7 @@ PlayerSettings:
m_BuildTargetGraphicsAPIs: [] m_BuildTargetGraphicsAPIs: []
m_BuildTargetVRSettings: m_BuildTargetVRSettings:
- m_BuildTarget: Standalone - m_BuildTarget: Standalone
m_Enabled: 1 m_Enabled: 0
m_Devices: m_Devices:
- Oculus - Oculus
- OpenVR - OpenVR