mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
18 lines
494 B
C#
18 lines
494 B
C#
using HarmonyLib;
|
|
using MiraAPI.GameModes;
|
|
|
|
namespace MiraAPI.Patches.GameModes;
|
|
[HarmonyPatch(typeof(ProgressTracker), nameof(ProgressTracker.Start))]
|
|
internal static class ProgressTrackerPatch
|
|
{
|
|
public static bool Prefix(ProgressTracker __instance)
|
|
{
|
|
if (CustomGameModeManager.ActiveMode != null && !CustomGameModeManager.ActiveMode.ShowTaskBar)
|
|
{
|
|
__instance.gameObject.SetActive(false);
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|