Decompiled source of LCLegDayMod v2.3.0

LCLegDayMod.dll

Decompiled 4 months ago
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Xml.Serialization;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using HarmonyLib.Tools;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("LCLegDayMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Take a lot of steps and get a stamina boost, but stagnate or die and lose the gains!")]
[assembly: AssemblyFileVersion("2.3.0.0")]
[assembly: AssemblyInformationalVersion("2.3.0")]
[assembly: AssemblyProduct("LCLegDayMod")]
[assembly: AssemblyTitle("LCLegDayMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.3.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LCLegDayMod
{
	public class Categories
	{
		public static void RelayCategoryToQuote(Category category, int RandomNr, int StepsTaken)
		{
			if ((Object)(object)HUDManager.Instance == (Object)null)
			{
				return;
			}
			Plugin.Logger.LogDebug((object)$"{category}{RandomNr}");
			switch (category)
			{
			case Category.Death:
				switch (RandomNr)
				{
				case 0:
					Quotes.Death0();
					break;
				case 1:
					Quotes.Death1();
					break;
				case 2:
					Quotes.Death2();
					break;
				case 3:
					Quotes.Death3();
					break;
				case 4:
					Quotes.Death4();
					break;
				case 5:
					Quotes.Death5();
					break;
				case 6:
					Quotes.Death6();
					break;
				case 7:
					Quotes.Death7();
					break;
				case 8:
					Quotes.Death8();
					break;
				case 9:
					Quotes.Death9();
					break;
				}
				break;
			case Category.ConsecutiveDeaths:
				switch (RandomNr)
				{
				case 0:
					Quotes.ConsecutiveDeaths0();
					break;
				case 1:
					Quotes.ConsecutiveDeaths1();
					break;
				case 2:
					Quotes.ConsecutiveDeaths2();
					break;
				case 3:
					Quotes.ConsecutiveDeaths3();
					break;
				case 4:
					Quotes.ConsecutiveDeaths4();
					break;
				case 5:
					Quotes.ConsecutiveDeaths5();
					break;
				case 6:
					Quotes.ConsecutiveDeaths6();
					break;
				case 7:
					Quotes.ConsecutiveDeaths7();
					break;
				case 8:
					Quotes.ConsecutiveDeaths8();
					break;
				case 9:
					Quotes.ConsecutiveDeaths9();
					break;
				}
				break;
			case Category.AllOrNothing:
				switch (RandomNr)
				{
				case 0:
					Quotes.AllOrNothing0();
					break;
				case 1:
					Quotes.AllOrNothing1();
					break;
				case 2:
					Quotes.AllOrNothing2();
					break;
				case 3:
					Quotes.AllOrNothing3();
					break;
				case 4:
					Quotes.AllOrNothing4();
					break;
				case 5:
					Quotes.AllOrNothing5();
					break;
				case 6:
					Quotes.AllOrNothing6();
					break;
				case 7:
					Quotes.AllOrNothing7();
					break;
				case 8:
					Quotes.AllOrNothing8();
					break;
				case 9:
					Quotes.AllOrNothing9();
					break;
				}
				break;
			case Category.Doping:
				switch (RandomNr)
				{
				case 0:
					Quotes.Doping0();
					break;
				case 1:
					Quotes.Doping1();
					break;
				case 2:
					Quotes.Doping2();
					break;
				case 3:
					Quotes.Doping3();
					break;
				case 4:
					Quotes.Doping4();
					break;
				case 5:
					Quotes.Doping5();
					break;
				case 6:
					Quotes.Doping6();
					break;
				case 7:
					Quotes.Doping7();
					break;
				case 8:
					Quotes.Doping8();
					break;
				case 9:
					Quotes.Doping9();
					break;
				}
				break;
			case Category.ShipInterior:
				switch (RandomNr)
				{
				case 0:
					Quotes.ShipInterior0();
					break;
				case 1:
					Quotes.ShipInterior1();
					break;
				case 2:
					Quotes.ShipInterior2();
					break;
				case 3:
					Quotes.ShipInterior3();
					break;
				case 4:
					Quotes.ShipInterior4();
					break;
				case 5:
					Quotes.ShipInterior5();
					break;
				case 6:
					Quotes.ShipInterior6();
					break;
				case 7:
					Quotes.ShipInterior7();
					break;
				case 8:
					Quotes.ShipInterior8();
					break;
				case 9:
					Quotes.ShipInterior9();
					break;
				}
				break;
			case Category.Minimum:
				switch (RandomNr)
				{
				case 0:
					Quotes.Minimum0();
					break;
				case 1:
					Quotes.Minimum1();
					break;
				case 2:
					Quotes.Minimum2();
					break;
				case 3:
					Quotes.Minimum3();
					break;
				case 4:
					Quotes.Minimum4();
					break;
				case 5:
					Quotes.Minimum5();
					break;
				case 6:
					Quotes.Minimum6();
					break;
				case 7:
					Quotes.Minimum7();
					break;
				case 8:
					Quotes.Minimum8();
					break;
				case 9:
					Quotes.Minimum9();
					break;
				}
				break;
			case Category.Maximum:
				switch (RandomNr)
				{
				case 0:
					Quotes.Maximum0();
					break;
				case 1:
					Quotes.Maximum1();
					break;
				case 2:
					Quotes.Maximum2();
					break;
				case 3:
					Quotes.Maximum3();
					break;
				case 4:
					Quotes.Maximum4();
					break;
				case 5:
					Quotes.Maximum5();
					break;
				case 6:
					Quotes.Maximum6();
					break;
				case 7:
					Quotes.Maximum7();
					break;
				case 8:
					Quotes.Maximum8();
					break;
				case 9:
					Quotes.Maximum9();
					break;
				}
				break;
			case Category.MinusThree:
				switch (RandomNr)
				{
				case 0:
					Quotes.MinusThree0(StepsTaken);
					break;
				case 1:
					Quotes.MinusThree1(StepsTaken);
					break;
				case 2:
					Quotes.MinusThree2(StepsTaken);
					break;
				case 3:
					Quotes.MinusThree3(StepsTaken);
					break;
				case 4:
					Quotes.MinusThree4(StepsTaken);
					break;
				case 5:
					Quotes.MinusThree5(StepsTaken);
					break;
				case 6:
					Quotes.MinusThree6(StepsTaken);
					break;
				case 7:
					Quotes.MinusThree7(StepsTaken);
					break;
				case 8:
					Quotes.MinusThree8(StepsTaken);
					break;
				case 9:
					Quotes.MinusThree9(StepsTaken);
					break;
				}
				break;
			case Category.MinusTwo:
				switch (RandomNr)
				{
				case 0:
					Quotes.MinusTwo0(StepsTaken);
					break;
				case 1:
					Quotes.MinusTwo1(StepsTaken);
					break;
				case 2:
					Quotes.MinusTwo2(StepsTaken);
					break;
				case 3:
					Quotes.MinusTwo3(StepsTaken);
					break;
				case 4:
					Quotes.MinusTwo4(StepsTaken);
					break;
				case 5:
					Quotes.MinusTwo5(StepsTaken);
					break;
				case 6:
					Quotes.MinusTwo6(StepsTaken);
					break;
				case 7:
					Quotes.MinusTwo7(StepsTaken);
					break;
				case 8:
					Quotes.MinusTwo8(StepsTaken);
					break;
				case 9:
					Quotes.MinusTwo9(StepsTaken);
					break;
				}
				break;
			case Category.MinusOne:
				switch (RandomNr)
				{
				case 0:
					Quotes.MinusOne0(StepsTaken);
					break;
				case 1:
					Quotes.MinusOne1(StepsTaken);
					break;
				case 2:
					Quotes.MinusOne2(StepsTaken);
					break;
				case 3:
					Quotes.MinusOne3(StepsTaken);
					break;
				case 4:
					Quotes.MinusOne4(StepsTaken);
					break;
				case 5:
					Quotes.MinusOne5(StepsTaken);
					break;
				case 6:
					Quotes.MinusOne6(StepsTaken);
					break;
				case 7:
					Quotes.MinusOne7(StepsTaken);
					break;
				case 8:
					Quotes.MinusOne8(StepsTaken);
					break;
				case 9:
					Quotes.MinusOne9(StepsTaken);
					break;
				}
				break;
			case Category.NoChange:
				switch (RandomNr)
				{
				case 0:
					Quotes.NoChange0(StepsTaken);
					break;
				case 1:
					Quotes.NoChange1(StepsTaken);
					break;
				case 2:
					Quotes.NoChange2(StepsTaken);
					break;
				case 3:
					Quotes.NoChange3(StepsTaken);
					break;
				case 4:
					Quotes.NoChange4(StepsTaken);
					break;
				case 5:
					Quotes.NoChange5(StepsTaken);
					break;
				case 6:
					Quotes.NoChange6(StepsTaken);
					break;
				case 7:
					Quotes.NoChange7(StepsTaken);
					break;
				case 8:
					Quotes.NoChange8(StepsTaken);
					break;
				case 9:
					Quotes.NoChange9(StepsTaken);
					break;
				}
				break;
			case Category.PlusOne:
				switch (RandomNr)
				{
				case 0:
					Quotes.PlusOne0(StepsTaken);
					break;
				case 1:
					Quotes.PlusOne1(StepsTaken);
					break;
				case 2:
					Quotes.PlusOne2(StepsTaken);
					break;
				case 3:
					Quotes.PlusOne3(StepsTaken);
					break;
				case 4:
					Quotes.PlusOne4(StepsTaken);
					break;
				case 5:
					Quotes.PlusOne5(StepsTaken);
					break;
				case 6:
					Quotes.PlusOne6(StepsTaken);
					break;
				case 7:
					Quotes.PlusOne7(StepsTaken);
					break;
				case 8:
					Quotes.PlusOne8(StepsTaken);
					break;
				case 9:
					Quotes.PlusOne9(StepsTaken);
					break;
				}
				break;
			case Category.PlusTwo:
				switch (RandomNr)
				{
				case 0:
					Quotes.PlusTwo0(StepsTaken);
					break;
				case 1:
					Quotes.PlusTwo1(StepsTaken);
					break;
				case 2:
					Quotes.PlusTwo2(StepsTaken);
					break;
				case 3:
					Quotes.PlusTwo3(StepsTaken);
					break;
				case 4:
					Quotes.PlusTwo4(StepsTaken);
					break;
				case 5:
					Quotes.PlusTwo5(StepsTaken);
					break;
				case 6:
					Quotes.PlusTwo6(StepsTaken);
					break;
				case 7:
					Quotes.PlusTwo7(StepsTaken);
					break;
				case 8:
					Quotes.PlusTwo8(StepsTaken);
					break;
				case 9:
					Quotes.PlusTwo9(StepsTaken);
					break;
				}
				break;
			}
		}

		public static void RelayChangeToSimpleTip(Category Change)
		{
			if (!((Object)(object)HUDManager.Instance == (Object)null))
			{
				switch (Change)
				{
				case Category.Down:
					Quotes.SimpleDown();
					break;
				case Category.Unchanged:
					Quotes.SimpleUnchanged();
					break;
				case Category.Up:
					Quotes.SimpleUp();
					break;
				}
			}
		}
	}
	public enum Category
	{
		Death,
		ConsecutiveDeaths,
		AllOrNothing,
		Doping,
		ShipInterior,
		Minimum,
		Maximum,
		MinusThree,
		MinusTwo,
		MinusOne,
		NoChange,
		PlusOne,
		PlusTwo,
		Down,
		Unchanged,
		Up
	}
	public class FitnessWitness
	{
		public static void UpdateLocalPlayerSprintTime(PlayerControllerB player)
		{
			Plugin.Logger.LogDebug((object)$"outside: {Plugin.StepsTakenOutside} | in ship: {Plugin.StepsTakenInShip} | on ladder: {Plugin.StepsTakenOnLadder} | while drunk: {Plugin.StepsTakenWhileDrunk} | while carrying: {Plugin.StepsTakenWhilePassingCarryWeight} | with jetpack: {Plugin.StepsTakenWhileUsingJetpack} | while sinking: {Plugin.StepsTakenWhileSinking} | died: {Plugin.PlayerDiedThisRound} | tzp: {Plugin.PlayerInhaledTZPThisRound}");
			int num = Plugin.StepsTakenOutside + Plugin.StepsTakenOnLadder / 3 + Plugin.StepsTakenWhilePassingCarryWeight / 2 + Plugin.StepsTakenWhileUsingJetpack / 2 + Plugin.StepsTakenWhileSinking;
			if (!Plugin.PlayerInhaledTZPThisRound)
			{
				num -= Plugin.StepsTakenWhileDrunk / 2;
			}
			Plugin.Logger.LogDebug((object)$"{num}");
			float sprintTime = player.sprintTime;
			Plugin.Logger.LogDebug((object)$"{sprintTime}");
			int num2 = 68 - 2 * StartOfRound.Instance.connectedPlayersAmount;
			if (num2 < 45)
			{
				num2 = 45;
			}
			if (Plugin.Config.configAllOrNothing.Value)
			{
				num2 = (int)((float)num2 * 0.8f);
			}
			num2 = (int)((float)num2 * Plugin.Config.configStepsMultiplier.Value);
			Plugin.Logger.LogDebug((object)$"players: {StartOfRound.Instance.connectedPlayersAmount} | config: {Plugin.Config.configStepsMultiplier.Value} | {Plugin.Config.configAllOrNothing.Value} | {num2}");
			int num3 = (int)player.sprintTime * num2;
			int num4 = (int)player.sprintTime * num2 * 2;
			int num5 = (int)player.sprintTime * num2 * 3;
			int num6 = (int)player.sprintTime * num2 * 4;
			int num7 = (int)player.sprintTime * num2 * 5;
			Plugin.Logger.LogDebug((object)$"{num3} -> {num4} -> {num5} -> {num6} -> {num7}");
			int randomNr = Random.Range(0, 10);
			float num8 = 0f;
			if (Plugin.PlayerDiedThisRound)
			{
				Plugin.ConsecutiveDeaths++;
			}
			else
			{
				Plugin.ConsecutiveDeaths = 0;
			}
			Plugin.Logger.LogDebug((object)$"{Plugin.ConsecutiveDeaths} times | {Plugin.Config.configConsecutiveDeaths.Value}");
			if (Plugin.PlayerDiedThisRound && !Plugin.Config.configAllOrNothing.Value)
			{
				if (Plugin.Config.configConsecutiveDeaths.Value)
				{
					if (Plugin.ConsecutiveDeaths == 1 || Plugin.ConsecutiveDeaths == 2)
					{
						if (Plugin.ConsecutiveDeaths == 1)
						{
							num8 = -2f;
						}
						else if (Plugin.ConsecutiveDeaths == 2)
						{
							num8 = -1f;
						}
						if (Plugin.Config.configFitnessWitness.Value && sprintTime > Plugin.MinimumStamina)
						{
							Categories.RelayCategoryToQuote(Category.Death, randomNr, 0);
						}
						else if (!Plugin.Config.configFitnessWitness.Value)
						{
							Categories.RelayChangeToSimpleTip(Category.Down);
						}
					}
					else if (Plugin.ConsecutiveDeaths > 2)
					{
						if (Plugin.Config.configFitnessWitness.Value)
						{
							Categories.RelayCategoryToQuote(Category.ConsecutiveDeaths, randomNr, 0);
						}
						else if (!Plugin.Config.configFitnessWitness.Value)
						{
							Categories.RelayChangeToSimpleTip(Category.Unchanged);
						}
					}
				}
				else
				{
					num8 = -2f;
					if (Plugin.Config.configFitnessWitness.Value && sprintTime > Plugin.MinimumStamina)
					{
						Categories.RelayCategoryToQuote(Category.Death, randomNr, 0);
					}
					else if (!Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayChangeToSimpleTip(Category.Down);
					}
				}
			}
			if (Plugin.PlayerDiedThisRound && Plugin.Config.configAllOrNothing.Value)
			{
				num8 = Plugin.MaximumStamina * -1f;
				if (Plugin.Config.configFitnessWitness.Value)
				{
					Categories.RelayCategoryToQuote(Category.AllOrNothing, randomNr, 0);
				}
				else if (!Plugin.Config.configFitnessWitness.Value)
				{
					Categories.RelayChangeToSimpleTip(Category.Down);
				}
			}
			else if (!Plugin.PlayerDiedThisRound && Plugin.PlayerInhaledTZPThisRound && Plugin.StepsTakenWhileDrunk > 0)
			{
				num8 = -3f;
				if (Plugin.Config.configFitnessWitness.Value && sprintTime > Plugin.MinimumStamina)
				{
					Categories.RelayCategoryToQuote(Category.Doping, randomNr, 0);
				}
				else if (!Plugin.Config.configFitnessWitness.Value)
				{
					Categories.RelayChangeToSimpleTip(Category.Down);
				}
			}
			else if (!Plugin.PlayerDiedThisRound && (!Plugin.PlayerInhaledTZPThisRound || (Plugin.PlayerInhaledTZPThisRound && Plugin.StepsTakenWhileDrunk == 0)) && num <= Plugin.StepsTakenInShip)
			{
				num8 = -1f;
				if (Plugin.Config.configFitnessWitness.Value && sprintTime > Plugin.MinimumStamina)
				{
					Categories.RelayCategoryToQuote(Category.ShipInterior, randomNr, 0);
				}
				else if (!Plugin.Config.configFitnessWitness.Value)
				{
					Categories.RelayChangeToSimpleTip(Category.Down);
				}
			}
			else if (!Plugin.PlayerDiedThisRound && (!Plugin.PlayerInhaledTZPThisRound || (Plugin.PlayerInhaledTZPThisRound && Plugin.StepsTakenWhileDrunk == 0)) && num > Plugin.StepsTakenInShip)
			{
				if (num < num3)
				{
					num8 = -3f;
					if (Plugin.Config.configFitnessWitness.Value && sprintTime > Plugin.MinimumStamina)
					{
						Categories.RelayCategoryToQuote(Category.MinusThree, randomNr, num);
					}
					else if (!Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayChangeToSimpleTip(Category.Down);
					}
				}
				else if (num >= num3 && num < num4)
				{
					num8 = -2f;
					if (Plugin.Config.configFitnessWitness.Value && sprintTime > Plugin.MinimumStamina)
					{
						Categories.RelayCategoryToQuote(Category.MinusTwo, randomNr, num);
					}
					else if (!Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayChangeToSimpleTip(Category.Down);
					}
				}
				else if (num >= num4 && num < num5)
				{
					num8 = -1f;
					if (Plugin.Config.configFitnessWitness.Value && sprintTime > Plugin.MinimumStamina)
					{
						Categories.RelayCategoryToQuote(Category.MinusOne, randomNr, num);
					}
					else if (!Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayChangeToSimpleTip(Category.Down);
					}
				}
				else if (num >= num5 && num < num6)
				{
					if (Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayCategoryToQuote(Category.NoChange, randomNr, num);
					}
					else if (!Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayChangeToSimpleTip(Category.Unchanged);
					}
				}
				else if (num >= num6 && num < num7)
				{
					num8 = 1f;
					if (Plugin.Config.configFitnessWitness.Value && sprintTime < Plugin.MaximumStamina)
					{
						Categories.RelayCategoryToQuote(Category.PlusOne, randomNr, num);
					}
					else if (!Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayChangeToSimpleTip(Category.Up);
					}
				}
				else if (num > num7)
				{
					num8 = 2f;
					if (Plugin.Config.configFitnessWitness.Value && sprintTime < Plugin.MaximumStamina)
					{
						Categories.RelayCategoryToQuote(Category.PlusTwo, randomNr, num);
					}
					else if (!Plugin.Config.configFitnessWitness.Value)
					{
						Categories.RelayChangeToSimpleTip(Category.Up);
					}
				}
			}
			Plugin.Logger.LogDebug((object)$"{num8}");
			player.sprintTime += num8;
			if (player.sprintTime < Plugin.MinimumStamina)
			{
				player.sprintTime = Plugin.MinimumStamina;
				Plugin.Logger.LogDebug((object)$"stamina went below minimum {Plugin.MinimumStamina}, reset to {player.sprintTime}");
				if (sprintTime == Plugin.MinimumStamina && num8 < 0f && Plugin.Config.configFitnessWitness.Value)
				{
					Categories.RelayCategoryToQuote(Category.Minimum, randomNr, 0);
				}
			}
			else if (player.sprintTime > Plugin.MaximumStamina)
			{
				player.sprintTime = Plugin.MaximumStamina;
				Plugin.Logger.LogDebug((object)$"stamina went above maximum {Plugin.MaximumStamina}, reset to {player.sprintTime}");
				if (sprintTime == Plugin.MaximumStamina && num8 > 0f && Plugin.Config.configFitnessWitness.Value)
				{
					Categories.RelayCategoryToQuote(Category.Maximum, randomNr, 0);
				}
			}
			Plugin.Logger.LogDebug((object)$"new stamina: {player.sprintTime}");
			if (Plugin.Config.configRegenerateStamina.Value)
			{
				Plugin.CalculateRegenerationRate();
			}
		}
	}
	public class HarmonyPatches
	{
		[HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")]
		public class NewPlayerConnectClient
		{
			[HarmonyPostfix]
			public static void GetPlayer()
			{
				Plugin.LocalPlayer = GameNetworkManager.Instance.localPlayerController;
				Plugin.DefaultStamina = GameNetworkManager.Instance.localPlayerController.sprintTime;
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "Start")]
		public class NewStartOfRoundStart
		{
			[HarmonyPostfix]
			public static void LoadIntoLobby()
			{
				Plugin.SetUpLegDayBehaviour();
				Plugin.DebugTestMode = false;
				Plugin.InLobby = true;
				Plugin.Logger.LogDebug((object)$"{Plugin.InLobby}");
				Plugin.ResetStepsTakenAndDeath();
				if (Plugin.Config.configFitnessWitness.Value || !((Object)(object)Plugin.TipText == (Object)null))
				{
					return;
				}
				GameObject[] array = Object.FindObjectsOfType<GameObject>();
				GameObject[] array2 = array;
				foreach (GameObject val in array2)
				{
					if ((Object)(object)Plugin.TipText == (Object)null && ((Object)val).name == "TipText")
					{
						Plugin.TipText = val;
						break;
					}
				}
				GameObject val2 = Object.Instantiate<GameObject>(Plugin.TipText, Plugin.SearchForLegDayModUI().transform, false);
				Plugin.StaminaTipTextDisplay = val2.GetComponent<TextMeshProUGUI>();
				((Behaviour)Plugin.StaminaTipTextDisplay).enabled = false;
			}
		}

		[HarmonyPatch(typeof(GameNetworkManager), "SaveGame")]
		public class NewGameNetworkManagerSaveGame
		{
			[HarmonyPostfix]
			public static void StartMessageTimer()
			{
				if (StartOfRound.Instance.inShipPhase && Plugin.StartedUpThisMatch)
				{
					LegDayBehaviour.Instance.PrepareDisplayTip();
				}
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "OnShipLandedMiscEvents")]
		public class NewStartOfRoundShipLanded
		{
			[HarmonyPostfix]
			public static void DisplayExplanationAndCheckDeath()
			{
				if ((Object)(object)Plugin.LocalPlayer == (Object)null)
				{
					Plugin.Logger.LogWarning((object)"LocalPlayer is somehow null, this should not be the case anymore. Not executing MiscEvents patch.");
					return;
				}
				if (!Plugin.LocalPlayer.isPlayerDead)
				{
					Plugin.PlayerDiedThisRound = false;
					Plugin.Logger.LogDebug((object)$"dead: {Plugin.PlayerDiedThisRound}");
				}
				else
				{
					Plugin.PlayerDiedThisRound = true;
					Plugin.Logger.LogDebug((object)$"dead: {Plugin.PlayerDiedThisRound}");
				}
				if (Plugin.LocalPlayer.drunkness == 0f)
				{
					Plugin.PlayerInhaledTZPThisRound = false;
					Plugin.Logger.LogDebug((object)$"tzp: {Plugin.PlayerInhaledTZPThisRound}");
				}
				if (!Plugin.ShownExplanationThisSession && !Plugin.LoadSavedStamina && StartOfRound.Instance.currentLevel.planetHasTime && Plugin.Config.configFitnessWitness.Value && !Plugin.LocalPlayer.isPlayerDead)
				{
					HUDManager.Instance.DisplayTip("LCLegDayMod", "Steps are only counted while on a planet where time is ticking...\nMake it count!", false, false, "LC_Tip1");
					Plugin.ShownExplanationThisSession = true;
				}
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "ResetStats")]
		public class NewStartOfRoundResetStats
		{
			[HarmonyPostfix]
			public static void ResetUponRoundStart()
			{
				Plugin.ResetStepsTakenAndDeath();
				if (!Plugin.StartedUpThisMatch)
				{
					Plugin.StartUponGameStart();
					Plugin.StartedUpThisMatch = true;
				}
				Plugin.Logger.LogDebug((object)$"{LegDayBehaviour.LastRegisteredStepsTaken}");
				LegDayBehaviour.LastRegisteredStepsTaken = 0;
				Plugin.Logger.LogDebug((object)$"{LegDayBehaviour.LastRegisteredStepsTaken}");
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")]
		public class NewPlayerControllerKillPlayer
		{
			[HarmonyPostfix]
			public static void SetPlayerDiedThisRound()
			{
				if ((Object)(object)Plugin.LocalPlayer == (Object)null)
				{
					Plugin.Logger.LogWarning((object)"LocalPlayer is somehow null. Not executing KillPlayer code");
					return;
				}
				if (!Plugin.LocalPlayer.isPlayerDead)
				{
					Plugin.Logger.LogDebug((object)$"isPlayerDead returned {Plugin.LocalPlayer.isPlayerDead}, not executing KillPlayer code");
					return;
				}
				Plugin.PlayerDiedThisRound = true;
				Plugin.Logger.LogDebug((object)$"player died - {Plugin.PlayerDiedThisRound}");
				if (!Plugin.DebugTestMode && Plugin.Config.configAllOrNothing.Value && Plugin.Config.configLoadAndSave.Value && StartOfRound.Instance.currentLevel.planetHasTime)
				{
					Plugin.StaminaToSave = Plugin.MinimumStamina;
					Plugin.Logger.LogInfo((object)"Config [Load and Save] is set to TRUE. Stamina will be saved.");
					Plugin.Logger.LogInfo((object)"Saving LCLegDayMod SaveData...");
					LegDaySaveData legDaySaveData = new LegDaySaveData();
					legDaySaveData.Save();
					Plugin.Logger.LogDebug((object)$"{Plugin.StaminaToSave}");
				}
			}
		}

		[HarmonyPatch(typeof(VehicleController), "PushTruckWithArms")]
		public class NewVehicleControllerPushTruck
		{
			[HarmonyPostfix]
			public static void AddStepsWhenPushing(VehicleController __instance)
			{
				if (!__instance.magnetedToShip && !Plugin.LocalPlayer.isInHangarShipRoom && !Plugin.LocalPlayer.isClimbingLadder && !Plugin.LocalPlayer.jetpackControls)
				{
					Plugin.StepsTakenOutside += 5;
				}
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "FirePlayersAfterDeadlineClientRpc")]
		public class NewStartOfRoundFirePlayers
		{
			[HarmonyPostfix]
			public static void ResetUponGettingFired()
			{
				if ((Object)(object)Plugin.LocalPlayer == (Object)null)
				{
					Plugin.Logger.LogWarning((object)"LocalPlayer somehow null. Not resetting stats upon getting fired since initial value-checks must have failed too.");
					return;
				}
				if (!Plugin.Config.configResetWhenFired.Value)
				{
					Plugin.Logger.LogInfo((object)"Config [Reset When Fired] is set to FALSE. Stamina will not be reset.");
					return;
				}
				Plugin.Logger.LogInfo((object)"Config [Reset When Fired] is set to TRUE. Stamina will be reset to its default value.");
				Plugin.Logger.LogDebug((object)$"{GameNetworkManager.Instance.localPlayerController.sprintTime} | {Plugin.ConsecutiveDeaths}");
				GameNetworkManager.Instance.localPlayerController.sprintTime = Plugin.DefaultStamina;
				Plugin.ConsecutiveDeaths = 0;
				Plugin.Logger.LogDebug((object)$"{GameNetworkManager.Instance.localPlayerController.sprintTime} | {Plugin.ConsecutiveDeaths}");
			}
		}

		[HarmonyPatch(typeof(GameNetworkManager), "Disconnect")]
		public class NewGameNetworkManagerDisconnect
		{
			[HarmonyPrefix]
			public static void ExitLobby()
			{
				if (!Plugin.DebugTestMode && Plugin.Config.configLoadAndSave.Value && (Object)(object)Plugin.LocalPlayer != (Object)null && Plugin.StartedUpThisMatch)
				{
					Plugin.StaminaToSave = Plugin.LocalPlayer.sprintTime;
					Plugin.Logger.LogInfo((object)"Config [Load and Save] is set to TRUE. Stamina will be saved.");
					Plugin.Logger.LogInfo((object)"Saving LCLegDayMod SaveData...");
					LegDaySaveData legDaySaveData = new LegDaySaveData();
					legDaySaveData.Save();
					Plugin.Logger.LogDebug((object)$"{Plugin.StaminaToSave}");
				}
				else if (!Plugin.StartedUpThisMatch && Plugin.Config.configLoadAndSave.Value)
				{
					Plugin.Logger.LogInfo((object)"Game has not yet started. Not saving LCLegDayMod SaveData.");
				}
				else if (!Plugin.Config.configLoadAndSave.Value)
				{
					Plugin.Logger.LogInfo((object)"Config [Load and Save] is set to FALSE. Stamina will not be saved.");
				}
				else if ((Object)(object)Plugin.LocalPlayer == (Object)null)
				{
					Plugin.Logger.LogDebug((object)"no local player found, not saving");
				}
				Plugin.ResetStepsTakenAndDeath();
				Plugin.InLobby = false;
				Plugin.StartedUpThisMatch = false;
				Plugin.LocalPlayer = null;
				Plugin.Logger.LogDebug((object)$"{Plugin.InLobby}");
			}
		}

		[HarmonyPatch(typeof(Terminal), "TextPostProcess")]
		public class NewTerminalTextPostProcess
		{
			[HarmonyPostfix]
			public static void DEBUGPrintCommands(ref string __result)
			{
				if (Plugin.DebugTestMode)
				{
					if (__result.Contains("Other commands:"))
					{
						Plugin.Logger.LogDebug((object)$"!!DEBUG DebugTestPrint: {Plugin.DebugTestPrint}");
						Plugin.DebugTestPrint = !Plugin.DebugTestPrint;
					}
					else if (__result.Contains("To access a creature file"))
					{
						Plugin.Logger.LogDebug((object)"!!DEBUG received call for DebugPrepareFeedback");
						LegDayBehaviour.Instance.DebugPrepareFeedback();
					}
				}
			}
		}

		[HarmonyPatch(typeof(Terminal), "OnSubmit")]
		public class NewTerminalOnSubmit
		{
			[HarmonyPrefix]
			public static bool CatchTextSubmitted(Terminal __instance)
			{
				string text = __instance.currentText.Substring(__instance.currentText.Length - __instance.textAdded);
				if (text == "LegDayModDebugTestModeTogglestinky")
				{
					Plugin.DebugTestMode = !Plugin.DebugTestMode;
					Plugin.Logger.LogWarning((object)$"!!DEBUG: {Plugin.DebugTestMode}");
					return false;
				}
				return true;
			}
		}
	}
	public class LegDayBehaviour : MonoBehaviour
	{
		public static LegDayBehaviour Instance;

		public static int CurrentStepsTaken;

		public static int LastRegisteredStepsTaken;

		private void Awake()
		{
			Plugin.Logger.LogDebug((object)"LCLegDayMod LegDayBehaviour Awake()");
			Instance = this;
		}

		private void Update()
		{
			if ((Object)(object)StartOfRound.Instance == (Object)null || (Object)(object)Plugin.LocalPlayer == (Object)null || !Plugin.InLobby)
			{
				return;
			}
			if (Plugin.Config.configRegenerateStamina.Value && Plugin.LocalPlayer.sprintTime > 11f && Plugin.LocalPlayer.sprintMeter != 1f && !Plugin.LocalPlayer.isSprinting && Plugin.LocalPlayer.drunkness < 0.02f && Plugin.LocalPlayer.isMovementHindered == 0 && !Plugin.LocalPlayer.isExhausted)
			{
				PlayerControllerB localPlayer = Plugin.LocalPlayer;
				localPlayer.sprintMeter += Plugin.RegenerationRate * Time.deltaTime;
			}
			if (Plugin.LocalPlayer.activatingItem && Plugin.LocalPlayer.drunkness > 0.02f && (Object)(object)Plugin.LocalPlayer.ItemSlots[Plugin.LocalPlayer.currentItemSlot] != (Object)null && ((Object)Plugin.LocalPlayer.ItemSlots[Plugin.LocalPlayer.currentItemSlot]).name == "TZPChemical(Clone)")
			{
				Plugin.PlayerInhaledTZPThisRound = true;
				if (Plugin.DebugTestMode)
				{
					HUDManager.Instance.DisplayTip("TZP", $"{Plugin.PlayerInhaledTZPThisRound}", true, false, "LC_Tip1");
				}
			}
			CurrentStepsTaken = StartOfRound.Instance.gameStats.allPlayerStats[(uint)Plugin.LocalPlayer.playerClientId].stepsTaken;
			if (CurrentStepsTaken == LastRegisteredStepsTaken || !StartOfRound.Instance.currentLevel.planetHasTime || StartOfRound.Instance.inShipPhase || StartOfRound.Instance.shipIsLeaving)
			{
				return;
			}
			LastRegisteredStepsTaken = CurrentStepsTaken;
			if (Plugin.LocalPlayer.drunkness > 0.02f)
			{
				Plugin.StepsTakenWhileDrunk++;
				if (Plugin.DebugTestPrint)
				{
					HUDManager.Instance.DisplayTip($"{Plugin.StepsTakenWhileDrunk}", "DRUNK", true, false, "LC_Tip1");
				}
			}
			if (Plugin.LocalPlayer.isInHangarShipRoom)
			{
				Plugin.StepsTakenInShip++;
				if (Plugin.DebugTestPrint)
				{
					HUDManager.Instance.DisplayTip($"{Plugin.StepsTakenInShip}", "INSIDE", true, false, "LC_Tip1");
				}
			}
			if (!Plugin.LocalPlayer.isInHangarShipRoom && Plugin.LocalPlayer.jetpackControls)
			{
				Plugin.StepsTakenWhileUsingJetpack++;
				if (Plugin.DebugTestPrint)
				{
					HUDManager.Instance.DisplayTip($"{Plugin.StepsTakenWhileUsingJetpack}", "JETPACK", true, false, "LC_Tip1");
				}
			}
			else if (!Plugin.LocalPlayer.isInHangarShipRoom && Plugin.LocalPlayer.isClimbingLadder)
			{
				Plugin.StepsTakenOnLadder++;
				if (Plugin.DebugTestPrint)
				{
					HUDManager.Instance.DisplayTip($"{Plugin.StepsTakenOnLadder}", "LADDER", true, false, "LC_Tip1");
				}
			}
			else if (!Plugin.LocalPlayer.isInHangarShipRoom && !Plugin.LocalPlayer.isClimbingLadder && !Plugin.LocalPlayer.jetpackControls)
			{
				Plugin.StepsTakenOutside++;
				if (Plugin.DebugTestPrint)
				{
					HUDManager.Instance.DisplayTip($"{Plugin.StepsTakenOutside}", "OUTSIDE", false, false, "LC_Tip1");
				}
			}
			if (!Plugin.LocalPlayer.isInHangarShipRoom && !Plugin.LocalPlayer.isClimbingLadder && !Plugin.LocalPlayer.jetpackControls && Plugin.LocalPlayer.carryWeight > Plugin.CarryWeightToPass)
			{
				string text = "CARRYING";
				Plugin.StepsTakenWhilePassingCarryWeight++;
				if (Plugin.LocalPlayer.carryWeight > Plugin.CarryWeightExtremeToPass)
				{
					Plugin.StepsTakenWhilePassingCarryWeight += 2;
					text = "CARRYING++";
				}
				if (Plugin.DebugTestPrint)
				{
					HUDManager.Instance.DisplayTip($"{Plugin.StepsTakenWhilePassingCarryWeight}", text, false, false, "LC_Tip1");
				}
			}
			if (!Plugin.LocalPlayer.isInHangarShipRoom && !Plugin.LocalPlayer.isClimbingLadder && !Plugin.LocalPlayer.jetpackControls && Plugin.LocalPlayer.isSinking)
			{
				Plugin.StepsTakenWhileSinking++;
				if (Plugin.DebugTestPrint)
				{
					HUDManager.Instance.DisplayTip($"{Plugin.StepsTakenWhileSinking}", "SINKING", false, false, "LC_Tip1");
				}
			}
		}

		public void PrepareDisplayTip()
		{
			if (!StartOfRound.Instance.currentLevel.planetHasTime)
			{
				Plugin.Logger.LogInfo((object)("currently on level without time " + ((Object)StartOfRound.Instance.currentLevel).name + ", not applying stamina change"));
			}
			else if (TimeOfDay.Instance.daysUntilDeadline >= 3 || TimeOfDay.Instance.daysUntilDeadline < 0)
			{
				Plugin.Logger.LogInfo((object)$"invalid days until deadline {TimeOfDay.Instance.daysUntilDeadline}, not applying stamina change");
			}
			else
			{
				((MonoBehaviour)this).StartCoroutine(DisplayTipOnDelay());
			}
		}

		private IEnumerator DisplayTipOnDelay()
		{
			Plugin.Logger.LogDebug((object)"starting DisplayTipOnDelay() coroutine");
			yield return (object)new WaitForSeconds(2f);
			FitnessWitness.UpdateLocalPlayerSprintTime(StartOfRound.Instance.localPlayerController);
		}

		public void PrepareTurnOffSimpleTip()
		{
			((MonoBehaviour)this).StartCoroutine(TurnOffSimpleTip());
		}

		private IEnumerator TurnOffSimpleTip()
		{
			Plugin.Logger.LogDebug((object)"starting TurnOffSimpleTip() coroutine");
			yield return (object)new WaitForSeconds(7f);
			((Behaviour)Plugin.StaminaTipTextDisplay).enabled = false;
		}

		public void DebugPrepareFeedback()
		{
			((MonoBehaviour)this).StartCoroutine(ShowAllFeedback());
		}

		private IEnumerator ShowAllFeedback()
		{
			Category[] AllCategories = new Category[13]
			{
				Category.Death,
				Category.ConsecutiveDeaths,
				Category.AllOrNothing,
				Category.Doping,
				Category.ShipInterior,
				Category.Minimum,
				Category.Maximum,
				Category.MinusThree,
				Category.MinusTwo,
				Category.MinusOne,
				Category.NoChange,
				Category.PlusOne,
				Category.PlusTwo
			};
			int[] AllRandomNrs = new int[10] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
			float timePerMessage = 3f;
			HUDManager.Instance.DisplayTip("!!DEBUG", $"all feedback will be displayed, {timePerMessage} seconds each", false, false, "LC_Tip1");
			yield return (object)new WaitForSeconds(timePerMessage);
			Category[] array = AllCategories;
			foreach (Category category in array)
			{
				if ((Object)(object)HUDManager.Instance == (Object)null)
				{
					break;
				}
				int stepsTaken = category switch
				{
					Category.MinusThree => -3, 
					Category.MinusTwo => -2, 
					Category.MinusOne => -1, 
					Category.PlusOne => 1, 
					Category.PlusTwo => 2, 
					_ => 0, 
				};
				int[] array2 = AllRandomNrs;
				foreach (int i in array2)
				{
					if ((Object)(object)HUDManager.Instance == (Object)null)
					{
						break;
					}
					Categories.RelayCategoryToQuote(category, i, stepsTaken);
					yield return (object)new WaitForSeconds(timePerMessage);
				}
			}
		}
	}
	[Serializable]
	public class DataToSave
	{
		public float SavedStamina;

		public int SavedConsecutiveDeaths;
	}
	public class LegDaySaveData : MonoBehaviour
	{
		private DataToSave data = new DataToSave
		{
			SavedStamina = Plugin.StaminaToSave,
			SavedConsecutiveDeaths = Plugin.ConsecutiveDeaths
		};

		public void Save()
		{
			string path = new string(Path.Combine(Plugin.sAssemblyLocation, "SaveData.xml"));
			XmlSerializer xmlSerializer = new XmlSerializer(typeof(DataToSave));
			using FileStream stream = new FileStream(path, FileMode.Create);
			xmlSerializer.Serialize(stream, data);
		}

		public void Load()
		{
			string path = new string(Path.Combine(Plugin.sAssemblyLocation, "SaveData.xml"));
			XmlSerializer xmlSerializer = new XmlSerializer(typeof(DataToSave));
			using FileStream stream = new FileStream(path, FileMode.Open);
			DataToSave dataToSave = (DataToSave)xmlSerializer.Deserialize(stream);
			Plugin.StaminaToLoad = dataToSave.SavedStamina;
			Plugin.ConsecutiveDeaths = dataToSave.SavedConsecutiveDeaths;
		}
	}
	[BepInPlugin("LCLegDayMod", "LCLegDayMod", "2.3.0")]
	public class Plugin : BaseUnityPlugin
	{
		public class Config
		{
			public static ConfigEntry<bool> configLoadAndSave;

			public static ConfigEntry<int> configMinimumStamina;

			public static ConfigEntry<int> configMaximumStamina;

			public static ConfigEntry<bool> configRegenerateStamina;

			public static ConfigEntry<bool> configConsecutiveDeaths;

			public static ConfigEntry<bool> configAllOrNothing;

			public static ConfigEntry<bool> configFitnessWitness;

			public static ConfigEntry<bool> configResetWhenFired;

			public static ConfigEntry<float> configStepsMultiplier;

			public Config(ConfigFile cfg)
			{
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Expected O, but got Unknown
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Expected O, but got Unknown
				configLoadAndSave = cfg.Bind<bool>("Load and Save", "Save Stamina", true, "Select whether or not your new stamina will be saved (true), or if it will reset to the vanilla Lethal Company value every time you join a lobby (false).");
				configMinimumStamina = cfg.Bind<int>("Customization", "Minimum Stamina", 10, new ConfigDescription("Select the minimum amount of stamina that cannot be dropped below. Must be a value from 1 to 10. Default Lethal Company stamina value is 11.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), Array.Empty<object>()));
				configMaximumStamina = cfg.Bind<int>("Customization", "Maximum Stamina", 30, new ConfigDescription("Select the maximum amount of stamina that cannot be surpassed. Must be a value from 12 to 50. Default Lethal Company stamina value is 11.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(12, 50), Array.Empty<object>()));
				configStepsMultiplier = cfg.Bind<float>("Customization", "Required Steps Multiplier", 1f, "Select how many more steps you relatively need to take to increase stamina. Cannot be 0 or negative.\nI personally recommend only changing this if you play with mods that alter the length of in-game days.");
				configRegenerateStamina = cfg.Bind<bool>("Customization", "Enhanced Regeneration", true, "Select whether or not your stamina will not regenerate as slowly if your total stamina is above the default value.");
				configConsecutiveDeaths = cfg.Bind<bool>("Customization", "Consecutive Deaths", true, "Select whether or not the stamina-penalty for dying will decrease per day if you die multiple days in a row.");
				configResetWhenFired = cfg.Bind<bool>("Customization", "Reset When Fired", true, "Select whether or not your stamina gets reset to the default value upon not meeting the profit quota, or if you get to keep your stamina.");
				configFitnessWitness = cfg.Bind<bool>("Customization", "The Fitness Witness", true, "Select whether the feedback for stamina changes is communicated through the Fitness Witness (true), or is a simple 'Stamina Up/Down' pop-up (false).");
				configAllOrNothing = cfg.Bind<bool>("Secret", "All Or Nothing", false, "An enhanced challenge. If true, it's easier to build up stamina every day, but upon death you will immediately lose ALL stamina and revert to the Minimum Stamina value.");
			}
		}

		public static ManualLogSource Logger;

		public static LegDaySaveData SaveData;

		public static int StepsTakenOutside;

		public static int StepsTakenInShip;

		public static int StepsTakenOnLadder;

		public static int StepsTakenWhileDrunk;

		public static int StepsTakenWhilePassingCarryWeight;

		public static int StepsTakenWhileUsingJetpack;

		public static int StepsTakenWhileSinking;

		public static int ConsecutiveDeaths;

		public static float DefaultStamina;

		public static float MinimumStamina;

		public static float MaximumStamina;

		public static float RegenerationRate;

		public static float StaminaToSave;

		public static float StaminaToLoad;

		public static float CarryWeightToPass = 1.6f;

		public static float CarryWeightExtremeToPass = 1.94f;

		public static bool PlayerDiedThisRound = false;

		public static bool PlayerInhaledTZPThisRound = false;

		public static bool StartedUpThisMatch = false;

		public static bool ShownExplanationThisSession = false;

		public static bool InLobby = false;

		public static bool LoadSavedStamina = false;

		public static bool DebugTestMode = false;

		public static bool DebugTestPrint = false;

		public static string sAssemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

		public static GameObject UI;

		public static GameObject TipText;

		public static TextMeshProUGUI StaminaTipTextDisplay;

		public static PlayerControllerB LocalPlayer;

		public static Config MyConfig { get; internal set; }

		public void Awake()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			Logger = ((BaseUnityPlugin)this).Logger;
			Logger.LogInfo((object)"Plugin LCLegDayMod is loaded!");
			Harmony val = new Harmony("LCLegDayMod");
			val.PatchAll();
			HarmonyFileLog.Enabled = false;
			MyConfig = new Config(((BaseUnityPlugin)this).Config);
			LoadAndDisplayConfigs();
			if (DebugTestMode)
			{
				Logger.LogError((object)$"!!DEBUG DebugTestMode: {DebugTestMode}");
			}
		}

		public static void LoadAndDisplayConfigs()
		{
			SetMinimumAndMaximumStamina();
			if (Config.configStepsMultiplier.Value <= 0f)
			{
				Logger.LogWarning((object)$"Config [Required Steps Multiplier] is set to an invalid value of {Config.configStepsMultiplier.Value}. Cannot be 0 or negative. Resetting to default value of 1.");
				Config.configStepsMultiplier.Value = 1f;
			}
			else
			{
				Logger.LogInfo((object)$"Config [Required Steps Multiplier] is set to a value of {Config.configStepsMultiplier.Value}");
			}
			if (Config.configRegenerateStamina.Value)
			{
				Logger.LogInfo((object)"Config [Enhanced Regeneration] is set to TRUE. Stamina will regenerate slightly faster at higher values.");
			}
			else
			{
				Logger.LogInfo((object)"Config [Enhanced Regeneration] is set to FALSE. Lethal Company's default stamina regeneration will be used.");
			}
			if (Config.configConsecutiveDeaths.Value && !Config.configAllOrNothing.Value)
			{
				Logger.LogInfo((object)"Config [Consecutive Deaths] is set to TRUE. The stamina-penalty for dying will decrease per day if you die multiple days in a row.");
			}
			else if (!Config.configConsecutiveDeaths.Value && !Config.configAllOrNothing.Value)
			{
				Logger.LogInfo((object)"Config [Consecutive Deaths] is set to FALSE. Every death will have the same stamina-penalty.");
			}
			if (Config.configResetWhenFired.Value)
			{
				Logger.LogInfo((object)"Config [Reset When Fired] is set to TRUE. Stamina will be reset to its default value upon getting fired.");
			}
			else
			{
				Logger.LogInfo((object)"Config [Reset When Fired] is set to FALSE. Stamina changes will be kept regardless of meeting quota or not.");
			}
			if (Config.configFitnessWitness.Value)
			{
				Logger.LogInfo((object)"Config [The Fitness Witness] is set to TRUE. Stamina changes and steps taken will be communicated through the Fitness Witness.");
			}
			else
			{
				Logger.LogInfo((object)"Config [The Fitness Witness] is set to FALSE. Stamina changes will be communicated through a simple message.");
			}
			if (Config.configLoadAndSave.Value)
			{
				Logger.LogInfo((object)"Config [Save Stamina] is set to TRUE. Saved stamina will try to be loaded upon starting a game, and saved at the end of every day.");
			}
			else
			{
				Logger.LogInfo((object)"Config [Save Stamina] is set to FALSE. Lethal Company's default stamina values will be loaded.");
			}
			if (Config.configAllOrNothing.Value)
			{
				Logger.LogInfo((object)"CONFIG [ALL OR NOTHING] IS SET TO TRUE! GET READY!!!");
			}
		}

		public static void StartUponGameStart()
		{
			if ((Object)(object)LocalPlayer == (Object)null)
			{
				Logger.LogWarning((object)"LocalPlayer detected null. Trying to get value again through StartOfRound...");
				LocalPlayer = StartOfRound.Instance.localPlayerController;
				if ((Object)(object)LocalPlayer == (Object)null)
				{
					Logger.LogError((object)"LocalPlayer somehow still null. Steps cannot be tracked!");
					HUDManager.Instance.DisplayTip("LCLegDayMod", "ERROR!!\nNo reference to the local player was found, mod will not work!", true, false, "LC_Tip1");
					return;
				}
				DefaultStamina = StartOfRound.Instance.localPlayerController.sprintTime;
			}
			Logger.LogDebug((object)$"{((Object)LocalPlayer).name} | {DefaultStamina} | {MinimumStamina} - {MaximumStamina}");
			if (Config.configLoadAndSave.Value)
			{
				LoadSavedData();
			}
			string text = "Starting LCLegDayMod...";
			if (!LoadSavedStamina)
			{
				if (Config.configFitnessWitness.Value)
				{
					HUDManager.Instance.DisplayTip(text, "The Fitness Witness will say the amount of steps you have taken, and if it changes your stamina.", false, false, "LC_Tip1");
				}
				else
				{
					Quotes.SimpleStart();
				}
			}
			else
			{
				GameNetworkManager.Instance.localPlayerController.sprintTime = StaminaToLoad;
				Logger.LogDebug((object)$"loaded: {StaminaToLoad} & {ConsecutiveDeaths} times");
				if (Config.configFitnessWitness.Value)
				{
					HUDManager.Instance.DisplayTip(text, "Successfully loaded previously saved stamina. Good luck!", false, false, "LC_Tip1");
				}
				else
				{
					Quotes.SimpleLoad();
				}
			}
			if (Config.configRegenerateStamina.Value)
			{
				CalculateRegenerationRate();
			}
		}

		public static void SetMinimumAndMaximumStamina()
		{
			Logger.LogInfo((object)$"Config [Minimum Stamina] is set to a value of {Config.configMinimumStamina.Value}");
			MinimumStamina = Config.configMinimumStamina.Value;
			Logger.LogInfo((object)$"Config [Maximum Stamina] is set to a value of {Config.configMaximumStamina.Value}");
			MaximumStamina = Config.configMaximumStamina.Value;
		}

		public static void CalculateRegenerationRate()
		{
			RegenerationRate = (GameNetworkManager.Instance.localPlayerController.sprintTime - DefaultStamina) / 20000f;
			if (RegenerationRate < 0f)
			{
				RegenerationRate = 0f;
			}
			Logger.LogDebug((object)$"calculated: {RegenerationRate}");
		}

		public static void LoadSavedData()
		{
			string path = new string(Path.Combine(sAssemblyLocation, "SaveData.xml"));
			if (File.Exists(path))
			{
				Logger.LogInfo((object)"Loading LCLegDayMod SaveData...");
				SaveData = new LegDaySaveData();
				SaveData.Load();
				if (StaminaToLoad < MinimumStamina || StaminaToLoad > MaximumStamina)
				{
					Logger.LogWarning((object)"Loaded SaveData stamina was outside the values of configs [Minimum Stamina] and [Maximum Stamina]. Stamina will not be loaded.");
					LoadSavedStamina = false;
				}
				else
				{
					LoadSavedStamina = true;
				}
			}
			else
			{
				Logger.LogInfo((object)"No LCLegDayMod SaveData exists yet.");
				LoadSavedStamina = false;
			}
		}

		public static void ResetStepsTakenAndDeath()
		{
			Logger.LogDebug((object)$"{StepsTakenOutside} | {StepsTakenInShip} | {StepsTakenOnLadder} | {StepsTakenWhileDrunk} | {StepsTakenWhilePassingCarryWeight} | {StepsTakenWhileUsingJetpack} | {StepsTakenWhileSinking} | {PlayerDiedThisRound} | {PlayerInhaledTZPThisRound}");
			StepsTakenOutside = 0;
			StepsTakenInShip = 0;
			StepsTakenOnLadder = 0;
			StepsTakenWhileDrunk = 0;
			StepsTakenWhilePassingCarryWeight = 0;
			StepsTakenWhileUsingJetpack = 0;
			StepsTakenWhileSinking = 0;
			PlayerDiedThisRound = false;
			PlayerInhaledTZPThisRound = false;
			Logger.LogDebug((object)$"{StepsTakenOutside} | {StepsTakenInShip} | {StepsTakenOnLadder} | {StepsTakenWhileDrunk} | {StepsTakenWhilePassingCarryWeight} | {StepsTakenWhileUsingJetpack} | {StepsTakenWhileSinking} | {PlayerDiedThisRound} | {PlayerInhaledTZPThisRound}");
		}

		public static GameObject SearchForLegDayModUI()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			GameObject val = SearchForSimonTendoUI();
			Transform val2 = val.transform.Find("LCLegDayMod");
			if ((Object)(object)val2 == (Object)null)
			{
				GameObject val3 = new GameObject("LCLegDayMod");
				val3.transform.SetParent(val.transform, false);
				return val3;
			}
			return ((Component)val2).gameObject;
		}

		public static GameObject SearchForSimonTendoUI()
		{
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Expected O, but got Unknown
			Logger.LogDebug((object)"Starting search for SimonTendoUI...");
			GameObject[] array = Object.FindObjectsOfType<GameObject>();
			GameObject[] array2 = array;
			GameObject result;
			foreach (GameObject val in array2)
			{
				if (((Object)val).name == "SimonTendoUI")
				{
					result = val;
					Logger.LogDebug((object)("Found existing " + ((Object)val).name + ", using as parent."));
					return result;
				}
			}
			GameObject[] array3 = array;
			foreach (GameObject val2 in array3)
			{
				if ((Object)(object)UI == (Object)null && ((Object)val2).name == "IngamePlayerHUD")
				{
					UI = val2;
					break;
				}
			}
			result = new GameObject("SimonTendoUI");
			result.transform.SetParent(UI.transform, false);
			Logger.LogDebug((object)("Did not find existing UI, instantiating new " + ((Object)result).name));
			return result;
		}

		public static void SetUpLegDayBehaviour()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GameObject val = new GameObject("LCLegDayMod");
			val.transform.SetParent(SearchForSimonTendoManagers().transform, false);
			val.AddComponent<LegDayBehaviour>();
		}

		private static GameObject SearchForSimonTendoManagers()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			Logger.LogDebug((object)"Starting search for SimonTendoManagers...");
			GameObject[] array = Object.FindObjectsOfType<GameObject>();
			GameObject[] array2 = array;
			GameObject result;
			foreach (GameObject val in array2)
			{
				if (((Object)val).name == "SimonTendoManagers")
				{
					result = val;
					Logger.LogDebug((object)("Found existing " + ((Object)val).name + ", using as parent."));
					return result;
				}
			}
			result = new GameObject("SimonTendoManagers");
			result.transform.SetParent(((Component)StartOfRound.Instance).gameObject.transform.parent, false);
			Logger.LogDebug((object)("Did not find existing SimonTendoManagers, instantiating new " + ((Object)result).name));
			return result;
		}
	}
	public class Quotes
	{
		public static void Death0()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nyou big doofus, dying won't do your muscles any good!", true, false, "LC_Tip1");
		}

		public static void Death1()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\npffffffff- hahahahahahahahaha!", true, false, "LC_Tip1");
		}

		public static void Death2()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nouch. that one looked like it hurt", true, false, "LC_Tip1");
		}

		public static void Death3()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nthat's not the kind of pain fitness should give you...", true, false, "LC_Tip1");
		}

		public static void Death4()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nman, this company sure is lethal", true, false, "LC_Tip1");
		}

		public static void Death5()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nMmm- you know, they say dying is not so bad the third time in a row", true, false, "LC_Tip1");
		}

		public static void Death6()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nyo could I get a recording of that one? because WOW", true, false, "LC_Tip1");
		}

		public static void Death7()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nDo it again I wasn't looking!", true, false, "LC_Tip1");
		}

		public static void Death8()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nI'll try to cry at your funeral. Try.", true, false, "LC_Tip1");
		}

		public static void Death9()
		{
			HUDManager.Instance.DisplayTip("Detected: Death", "The Fitness Witness says:\nohhhhh it's funny every time", true, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths0()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nat least your muscles are getting used to dying...", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths1()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nokay, seriously, do you have, like, enemies, or something?", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths2()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nmy condolences to... yourself", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths3()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nhey, you died so much it doesn't even hurt anymore!", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths4()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nthe good news is... your stamina didn't go down *again*", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths5()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nwell lets just hope your team is pulling their weight...", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths6()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nUhmm... I hope you're not being too hard on yourself...", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths7()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\ndid you die the ENTIRE quota?!", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths8()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nstop dying you big stinkin' loser >:(", false, false, "LC_Tip1");
		}

		public static void ConsecutiveDeaths9()
		{
			HUDManager.Instance.DisplayTip("Detected: Deaths", "The Fitness Witness says:\nthat's not muscle, that's rigor mortis", false, false, "LC_Tip1");
		}

		public static void AllOrNothing0()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nNO MERCY, ONLY PAIN!!!", true, false, "LC_Tip1");
		}

		public static void AllOrNothing1()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nBack to square one with you!", true, false, "LC_Tip1");
		}

		public static void AllOrNothing2()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nthe bigger they are...", true, false, "LC_Tip1");
		}

		public static void AllOrNothing3()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nthis is what it means to go\n'All Or Nothing'!!", true, false, "LC_Tip1");
		}

		public static void AllOrNothing4()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nyou know the rules, and so do I, say goodbye (to your stamina)!", true, false, "LC_Tip1");
		}

		public static void AllOrNothing5()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nMhm. Yep. Weak.", true, false, "LC_Tip1");
		}

		public static void AllOrNothing6()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nyou know what, i do LOVE your commitment", true, false, "LC_Tip1");
		}

		public static void AllOrNothing7()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nmust not laugh... must not laugh... must not laugh...", true, false, "LC_Tip1");
		}

		public static void AllOrNothing8()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nFitness is all about losing everything you've ever worked for.", true, false, "LC_Tip1");
		}

		public static void AllOrNothing9()
		{
			HUDManager.Instance.DisplayTip("Detected: All Or Nothing", "The Fitness Witness says:\nwhat? hey, you chose this!", true, false, "LC_Tip1");
		}

		public static void Doping0()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\ndrugs are not the solution", true, false, "LC_Tip1");
		}

		public static void Doping1()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\nperformance enhancers? seriously?! grow some backbone!", true, false, "LC_Tip1");
		}

		public static void Doping2()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\nmore like tzp-inLAMEnt", true, false, "LC_Tip1");
		}

		public static void Doping3()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\nheyheyhey it doesn't count if you just start cheating!", true, false, "LC_Tip1");
		}

		public static void Doping4()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\nStop it. Get some help.", true, false, "LC_Tip1");
		}

		public static void Doping5()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\ndo *any* TZP and you have lost my respect.", true, false, "LC_Tip1");
		}

		public static void Doping6()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\ni didnt know the company dealt in substances", true, false, "LC_Tip1");
		}

		public static void Doping7()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\nis it true that stuff tastes like beans? i hate beans", true, false, "LC_Tip1");
		}

		public static void Doping8()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\n*(sniff)* ew, what-? *(snifffff)* ewww what's that smell on you?!", true, false, "LC_Tip1");
		}

		public static void Doping9()
		{
			HUDManager.Instance.DisplayTip("Detected: Doping", "The Fitness Witness says:\nLook, I know TZP is useful stuff, but it's just bad for you okay", true, false, "LC_Tip1");
		}

		public static void ShipInterior0()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nyou should go outside more often", true, false, "LC_Tip1");
		}

		public static void ShipInterior1()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\ni wonder if you forgot what fresh air smells like...", true, false, "LC_Tip1");
		}

		public static void ShipInterior2()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nnice weather we're having huh? ohhh wait, not like you'd know!", true, false, "LC_Tip1");
		}

		public static void ShipInterior3()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nit starts with 't', and ends with 'ouch grass'", true, false, "LC_Tip1");
		}

		public static void ShipInterior4()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nSteps taken inside the ship do not count towards your daily total.", true, false, "LC_Tip1");
		}

		public static void ShipInterior5()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\non camera duty? ehh that's alright", true, false, "LC_Tip1");
		}

		public static void ShipInterior6()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nwhat are you, scared of dying,\nor something?", true, false, "LC_Tip1");
		}

		public static void ShipInterior7()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nyou shouldnt sit inside staring\nat screens all day!!", true, false, "LC_Tip1");
		}

		public static void ShipInterior8()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nyou are not safe in the ship you know :)", true, false, "LC_Tip1");
		}

		public static void ShipInterior9()
		{
			HUDManager.Instance.DisplayTip("Detected: Ship Interior", "The Fitness Witness says:\nOhhhhh you missed such a beautiful sunset outside smh", true, false, "LC_Tip1");
		}

		public static void Minimum0()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\nit looks like you literally can't get any worse.", true, false, "LC_Tip1");
		}

		public static void Minimum1()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\nI'm sorry to say this, but...\nyou suck.", true, false, "LC_Tip1");
		}

		public static void Minimum2()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\nat least your stamina can't go *further* down", true, false, "LC_Tip1");
		}

		public static void Minimum3()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "(the Fitness Witness isn't even paying attention anymore)", true, false, "LC_Tip1");
		}

		public static void Minimum4()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\ncalling it 'Rock Bottom' would be a compliment...", true, false, "LC_Tip1");
		}

		public static void Minimum5()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\noof, well at least it will be easier to get stronger again...", true, false, "LC_Tip1");
		}

		public static void Minimum6()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\nI get the feeling you're not such a great asset...", true, false, "LC_Tip1");
		}

		public static void Minimum7()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\nhm? my apologies, I had something better to do with my time", true, false, "LC_Tip1");
		}

		public static void Minimum8()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\nwha- like- are- are you even- like- trying???", true, false, "LC_Tip1");
		}

		public static void Minimum9()
		{
			HUDManager.Instance.DisplayTip("Detected: Minimum", "The Fitness Witness says:\nDon't feel down. Your stamina can't go anymore down either.", true, false, "LC_Tip1");
		}

		public static void Maximum0()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nlooks like there is nothing left for me to teach you", false, false, "LC_Tip1");
		}

		public static void Maximum1()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nwwwwWOW!!! Incredible!", false, false, "LC_Tip1");
		}

		public static void Maximum2()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nwow! you're so strong you can't even get ANY stronger!!", false, false, "LC_Tip1");
		}

		public static void Maximum3()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\n*(sniffle)* it makes me proud seeing you so strong...", false, false, "LC_Tip1");
		}

		public static void Maximum4()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nheh, your stamina is already as fit as it can be, well done!", false, false, "LC_Tip1");
		}

		public static void Maximum5()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nCONGRATULATIONS!!!", false, false, "LC_Tip1");
		}

		public static void Maximum6()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nyou did WHATgHBxP3giW1&#5YJR*p", false, false, "LC_Tip1");
		}

		public static void Maximum7()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nI, for one, find that quite poggers.", false, false, "LC_Tip1");
		}

		public static void Maximum8()
		{
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\nyou... *(sob)* you really ARE a great asset...", false, false, "LC_Tip1");
		}

		public static void Maximum9()
		{
			float maximumStamina = Plugin.MaximumStamina;
			float num = maximumStamina;
			string text;
			if (num <= 15f)
			{
				text = "yeah okay with such a low max amount it's easy to cap out ]:|";
			}
			else
			{
				float num2 = num;
				if (num2 >= 16f && num2 <= 20f)
				{
					text = "nice work reaching your goal! now try setting even higher goals";
				}
				else
				{
					float num3 = num;
					text = ((!(num3 >= 21f) || !(num3 <= 30f)) ? "*(spits coffee)* WHOAA!! THAT'S AMAZING!!!" : "Holy moly! You haven't been slacking off! Really well done!!");
				}
			}
			HUDManager.Instance.DisplayTip("Detected: Maximum", "The Fitness Witness says:\n" + text, false, false, "LC_Tip1");
		}

		public static void MinusThree0(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nyou disgust me.", true, false, "LC_Tip1");
		}

		public static void MinusThree1(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nUGH, why did you even install me?!", true, false, "LC_Tip1");
		}

		public static void MinusThree2(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nseriously, moving so little is bad for your health", true, false, "LC_Tip1");
		}

		public static void MinusThree3(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nI hope you have a good reason for taking so few steps...", true, false, "LC_Tip1");
		}

		public static void MinusThree4(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nbingbong hey whats up youre doing a bad job", true, false, "LC_Tip1");
		}

		public static void MinusThree5(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nidk if yor really good ,or really realy bad", true, false, "LC_Tip1");
		}

		public static void MinusThree6(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nFleeing is a viable defense strategy, but this is pathetic.", true, false, "LC_Tip1");
		}

		public static void MinusThree7(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nhellooooo? anybody in there?\nyou still here???", true, false, "LC_Tip1");
		}

		public static void MinusThree8(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nmy grandma gets more exercise than you do dangit!", true, false, "LC_Tip1");
		}

		public static void MinusThree9(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nthis just makes me sad", true, false, "LC_Tip1");
		}

		public static void MinusTwo0(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nwhat, im supposed to be impressed?", true, false, "LC_Tip1");
		}

		public static void MinusTwo1(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\noh look at you very cool...\nNOT!!!", true, false, "LC_Tip1");
		}

		public static void MinusTwo2(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nat least you seem to be trying...", true, false, "LC_Tip1");
		}

		public static void MinusTwo3(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nalright, there was *AN* attempt", true, false, "LC_Tip1");
		}

		public static void MinusTwo4(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nI'll admit... you walked...\na little...", true, false, "LC_Tip1");
		}

		public static void MinusTwo5(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nthe more stamina, the more steps.\nkeep it in mind!", true, false, "LC_Tip1");
		}

		public static void MinusTwo6(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nnow, now... don't overexert yourself......", true, false, "LC_Tip1");
		}

		public static void MinusTwo7(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\noh my go- wait, I thought there was one more digit, my bad", true, false, "LC_Tip1");
		}

		public static void MinusTwo8(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nis there a way to uninstall myself...?", true, false, "LC_Tip1");
		}

		public static void MinusTwo9(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nCome on, you've got this, I kinda believe in you.", true, false, "LC_Tip1");
		}

		public static void MinusOne0(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\ntry to do better every day!", true, false, "LC_Tip1");
		}

		public static void MinusOne1(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nyou're close! but just not good enough", true, false, "LC_Tip1");
		}

		public static void MinusOne2(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\ncome on, prove me wrong, you can do better!", true, false, "LC_Tip1");
		}

		public static void MinusOne3(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nohhhhh almost. should have put in a little more work", true, false, "LC_Tip1");
		}

		public static void MinusOne4(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\npfeh, did you take it easy today? don't slack off!", true, false, "LC_Tip1");
		}

		public static void MinusOne5(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nI wouldn't call it lacking, just... insufficient.", true, false, "LC_Tip1");
		}

		public static void MinusOne6(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nmaybe you're getting too strong for your own good", true, false, "LC_Tip1");
		}

		public static void MinusOne7(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\naw man. just barely too little. shame", true, false, "LC_Tip1");
		}

		public static void MinusOne8(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nI guess you didn't *lose* a lot of stamina from that...", true, false, "LC_Tip1");
		}

		public static void MinusOne9(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nehhh. could be better, could be worse. mostly better tho", true, false, "LC_Tip1");
		}

		public static void NoChange0(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nlooks like you didn't really break a sweat...", false, false, "LC_Tip1");
		}

		public static void NoChange1(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nthey call it a 'plateau' when you don't keep pushing yourself harder", false, false, "LC_Tip1");
		}

		public static void NoChange2(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nhmmmmm... nothing changed.", false, false, "LC_Tip1");
		}

		public static void NoChange3(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\ntoday wasnt bad, but, im afraid you didnt get stronger either", false, false, "LC_Tip1");
		}

		public static void NoChange4(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nthe stronger you get, the more you need to work to get stronger again", false, false, "LC_Tip1");
		}

		public static void NoChange5(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nLifting weights and swimming are good forms of exercise.", false, false, "LC_Tip1");
		}

		public static void NoChange6(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nBlegh. Bo-ring.", false, false, "LC_Tip1");
		}

		public static void NoChange7(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\ntry one more trip to the main entrance tomorrow", false, false, "LC_Tip1");
		}

		public static void NoChange8(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nI guess it's fine to take it a little easy every now and again...", false, false, "LC_Tip1");
		}

		public static void NoChange9(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nstamina unchanged. I can't bring that news any more excitingly", false, false, "LC_Tip1");
		}

		public static void PlusOne0(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\ngood job.", false, false, "LC_Tip1");
		}

		public static void PlusOne1(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nhuh, you're actually putting on muscle", false, false, "LC_Tip1");
		}

		public static void PlusOne2(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nthat's more like it!", false, false, "LC_Tip1");
		}

		public static void PlusOne3(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nnice", false, false, "LC_Tip1");
		}

		public static void PlusOne4(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nwell done, now try to do even better tomorrow!", false, false, "LC_Tip1");
		}

		public static void PlusOne5(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nYour muscles look so happy!", false, false, "LC_Tip1");
		}

		public static void PlusOne6(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nthat was actually noteworthy", false, false, "LC_Tip1");
		}

		public static void PlusOne7(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nwaheyy, nicely done!", false, false, "LC_Tip1");
		}

		public static void PlusOne8(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\n*(slightly sarcastic applause)*", false, false, "LC_Tip1");
		}

		public static void PlusOne9(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nyeahhhhh feel that power-trip!", false, false, "LC_Tip1");
		}

		public static void PlusTwo0(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nwhoa okay", false, false, "LC_Tip1");
		}

		public static void PlusTwo1(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nholy sweat- that's actually kind of impressive", false, false, "LC_Tip1");
		}

		public static void PlusTwo2(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nYES! MORE POWER!!!", false, false, "LC_Tip1");
		}

		public static void PlusTwo3(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nnow *you* look strong! try to keep this up every day", false, false, "LC_Tip1");
		}

		public static void PlusTwo4(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nnow this is fitness worth witnessing!", false, false, "LC_Tip1");
		}

		public static void PlusTwo5(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nFAN-TAS-TIC!!", false, false, "LC_Tip1");
		}

		public static void PlusTwo6(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nyou're so fit maybe YOU should be the Fitness Witness", false, false, "LC_Tip1");
		}

		public static void PlusTwo7(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\npff, are you trying to embarrass me or something?", false, false, "LC_Tip1");
		}

		public static void PlusTwo8(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nYou really are worthy of the title of " + HUDManager.Instance.playerLevels[HUDManager.Instance.localPlayerLevel].levelName, false, false, "LC_Tip1");
		}

		public static void PlusTwo9(int TotalOutsideStepsTakenThisRound)
		{
			HUDManager.Instance.DisplayTip($"Steps Taken: {TotalOutsideStepsTakenThisRound}", "The Fitness Witness says:\nSoon you'll be 'Fitness Legend\n" + StartOfRound.Instance.localPlayerController.playerUsername + "'!", false, false, "LC_Tip1");
		}

		public static void SimpleDown()
		{
			((TMP_Text)Plugin.StaminaTipTextDisplay).text = "Stamina down!";
			((Behaviour)Plugin.StaminaTipTextDisplay).enabled = true;
			HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.warningSFX[1], 1f);
			LegDayBehaviour.Instance.PrepareTurnOffSimpleTip();
		}

		public static void SimpleUnchanged()
		{
			((TMP_Text)Plugin.StaminaTipTextDisplay).text = "Stamina unchanged";
			((Behaviour)Plugin.StaminaTipTextDisplay).enabled = true;
			HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.tipsSFX[0], 1f);
			LegDayBehaviour.Instance.PrepareTurnOffSimpleTip();
		}

		public static void SimpleUp()
		{
			((TMP_Text)Plugin.StaminaTipTextDisplay).text = "Stamina up!";
			((Behaviour)Plugin.StaminaTipTextDisplay).enabled = true;
			HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.tipsSFX[1], 1f);
			LegDayBehaviour.Instance.PrepareTurnOffSimpleTip();
		}

		public static void SimpleLoad()
		{
			((TMP_Text)Plugin.StaminaTipTextDisplay).text = "Stamina loaded!";
			((Behaviour)Plugin.StaminaTipTextDisplay).enabled = true;
			HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.tipsSFX[1], 1f);
			LegDayBehaviour.Instance.PrepareTurnOffSimpleTip();
		}

		public static void SimpleStart()
		{
			((TMP_Text)Plugin.StaminaTipTextDisplay).text = "LCLegDayMod started";
			((Behaviour)Plugin.StaminaTipTextDisplay).enabled = true;
			HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.tipsSFX[0], 1f);
			LegDayBehaviour.Instance.PrepareTurnOffSimpleTip();
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "LCLegDayMod";

		public const string PLUGIN_NAME = "LCLegDayMod";

		public const string PLUGIN_VERSION = "2.3.0";
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}