using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using FistVR;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Casual TNH")]
[assembly: AssemblyDescription("A customizable mod for H3VR. Allows changing certain aspects of TNH game mode.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("NextNepper")]
[assembly: AssemblyProduct("Casual TNH")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f7d0ee09-5ba4-4ca5-a094-f4c84ed78e39")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: AssemblyVersion("1.0.1.0")]
namespace Casual_TNH;
[BepInPlugin("Nepper.CasualTNH", "Casual TNH", "1.0.1")]
public class Casual_TNH : BaseUnityPlugin
{
[HarmonyPatch(typeof(TNH_Manager), "AddTokens")]
private class TokenModifierPatch
{
private static bool Prefix(ref TNH_Manager __instance, int i, bool Scorethis)
{
LoggerInstance.LogInfo((object)"Patching AddTokens method!");
int value = TokenMultiplier.Value;
FieldInfo field = typeof(TNH_Manager).GetField("m_numTokens", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field != null)
{
int? num = (int?)field.GetValue(__instance);
if (num.HasValue)
{
int value2 = num.Value;
LoggerInstance.LogInfo((object)("Tokens you would get without this mod: " + i));
value2 += i * value;
LoggerInstance.LogInfo((object)("Tokens you are going to get with this mod: " + i * value));
field.SetValue(__instance, value2);
if (Scorethis)
{
}
__instance.OnTokenCountChange(value2);
}
}
else
{
LoggerInstance.LogInfo((object)"m_numTokensField is null, something is wrong.");
}
LoggerInstance.LogInfo((object)"Patched AddTokens method!");
return false;
}
}
[HarmonyPatch(typeof(TNH_HoldPoint), "BeginAnalyzing")]
private class ModifyBeginAnalyzingPatch
{
private static void Postfix(ref TNH_HoldPoint __instance)
{
//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Expected O, but got Unknown
//IL_0189: Unknown result type (might be due to invalid IL or missing references)
//IL_018f: Invalid comparison between Unknown and I4
//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
//IL_02eb: Expected O, but got Unknown
float value = TimeModifier.Value;
if (ShorterAnalyzePhases.Value)
{
LoggerInstance.LogInfo((object)"Beginning Postfix of BeginAnalyzing method.");
__instance.M.EnqueueLine((TNH_VoiceLineID)2);
FieldInfo field = typeof(TNH_HoldPoint).GetField("m_state", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field == null)
{
LoggerInstance.LogInfo((object)"m_stateField is null, something is wrong.");
}
field.SetValue(__instance, (object)(HoldState)1);
FieldInfo field2 = typeof(TNH_HoldPoint).GetField("m_tickDownToIdentification", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field2 == null)
{
LoggerInstance.LogInfo((object)"m_tickDownToIdentificationField is null, something is wrong.");
}
FieldInfo field3 = typeof(TNH_HoldPoint).GetField("m_curPhase", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field3 == null)
{
LoggerInstance.LogInfo((object)"m_curPhaseField is null, something is wrong.");
}
Phase val = (Phase)field3.GetValue(__instance);
float scanTime = val.ScanTime;
bool flag = false;
LoggerInstance.LogInfo((object)("Scan time before mod: " + scanTime));
float num = scanTime * value;
LoggerInstance.LogInfo((object)("Scan time after mod: " + num));
field2.SetValue(__instance, num);
if (__instance.M.Seed >= 0)
{
field2.SetValue(__instance, num);
}
if ((int)__instance.M.TargetMode == 2)
{
field2.SetValue(__instance, num);
if (__instance.M.Seed >= 0)
{
field2.SetValue(__instance, num);
}
}
else if (__instance.M.IsBigLevel)
{
field2.SetValue(__instance, num);
}
IListExtensions.Shuffle<Transform>((IList<Transform>)__instance.SpawnPoints_Targets);
FieldInfo field4 = typeof(TNH_HoldPoint).GetField("m_validSpawnPoints", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field4 == null)
{
LoggerInstance.LogInfo((object)"m_validSpawnPointsField is null, something is wrong.");
}
List<Transform> list = (List<Transform>)field4.GetValue(__instance);
IListExtensions.Shuffle<Transform>((IList<Transform>)list);
field4.SetValue(__instance, list);
MethodInfo method = typeof(TNH_HoldPoint).GetMethod("SpawnWarpInMarkers", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)method != null)
{
method.Invoke(__instance, null);
}
else
{
LoggerInstance.LogInfo((object)"SpawnWarpInMarkersMethod is null, something is wrong.");
}
FieldInfo field5 = typeof(TNH_HoldPoint).GetField("m_systemNode", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field5 == null)
{
LoggerInstance.LogInfo((object)"m_systemNodeField is null, something is wrong.");
}
TNH_HoldPointSystemNode val2 = (TNH_HoldPointSystemNode)field5.GetValue(__instance);
val2.SetNodeMode((SystemNodeMode)2);
field5.SetValue(__instance, val2);
LoggerInstance.LogInfo((object)"Ending Postfix of BeginAnalyzing method.");
}
else
{
LoggerInstance.LogInfo((object)"Skipped Postfix of BeginAnalyzing method.");
}
}
}
[HarmonyPatch(typeof(TNH_ObjectConstructor), "ButtonClicked_Reroll")]
private class ModifyRerollCost
{
private static bool Prefix(ref TNH_ObjectConstructor __instance, int which)
{
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
if (IsRerollFree.Value)
{
LoggerInstance.LogInfo((object)"Beginning to patch ButtonClicked_Reroll method.");
int num = 0;
int numTokens = __instance.M.GetNumTokens();
if (numTokens >= num)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Select, ((Component)__instance).transform.position);
__instance.M.RegenerateConstructor(__instance, which);
__instance.M.SubtractTokens(num);
FieldInfo field = typeof(TNH_ObjectConstructor).GetField("m_poolAddedCost", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field != null)
{
List<int> list = (List<int>)field.GetValue(__instance);
list[which] = 0;
field.SetValue(__instance, list);
}
else
{
LoggerInstance.LogInfo((object)"m_poolAddedCostField is null, something is wrong.");
}
MethodInfo method = typeof(TNH_ObjectConstructor).GetMethod("UpdateTokenDisplay", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)method != null)
{
method.Invoke(__instance, new object[1] { __instance.M.GetNumTokens() });
}
else
{
LoggerInstance.LogInfo((object)"updateTokenDisplayMethod is null, something is wrong.");
}
LoggerInstance.LogInfo((object)"ButtonClicked_Reroll method is patched.");
return false;
}
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
LoggerInstance.LogInfo((object)"ButtonClicked_Reroll method is patched.");
return false;
}
LoggerInstance.LogInfo((object)"Skipped patching ButtonClicked_Reroll method.");
return true;
}
}
[HarmonyPatch(typeof(TNH_ObjectConstructor), "ButtonClicked_Unlock")]
private class ModifyUnlockCost
{
private static bool Prefix(ref TNH_ObjectConstructor __instance, int which)
{
//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
if (IsRerollFree.Value)
{
LoggerInstance.LogInfo((object)"Beginning to patch ButtonClicked_Unlock method.");
int num = 0;
int numTokens = __instance.M.GetNumTokens();
if (numTokens >= num)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Select, ((Component)__instance).transform.position);
MethodInfo method = typeof(TNH_ObjectConstructor).GetMethod("UnlockPoolCategory", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)method != null)
{
method.Invoke(__instance, new object[1] { which });
}
else
{
LoggerInstance.LogInfo((object)"UnlockPoolCategoryMethod is null, something is wrong.");
}
MethodInfo method2 = typeof(TNH_ObjectConstructor).GetMethod("SetState", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)method2 != null)
{
method2.Invoke(__instance, new object[2]
{
(object)(ConstructorState)1,
0
});
}
else
{
LoggerInstance.LogInfo((object)"SetStateMethod is null, something is wrong.");
}
__instance.M.SubtractTokens(num);
MethodInfo method3 = typeof(TNH_ObjectConstructor).GetMethod("UpdateTokenDisplay", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)method3 != null)
{
method3.Invoke(__instance, new object[1] { __instance.M.GetNumTokens() });
}
else
{
LoggerInstance.LogInfo((object)"updateTokenDisplayMethod is null, something is wrong.");
}
LoggerInstance.LogInfo((object)"ButtonClicked_Unlock method is patched.");
return false;
}
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
MethodInfo method4 = typeof(TNH_ObjectConstructor).GetMethod("UpdateLockUnlockButtonState", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)method4 != null)
{
method4.Invoke(__instance, new object[1] { false });
}
else
{
LoggerInstance.LogInfo((object)"UpdateLockUnlockButtonStateMethod is null, something is wrong.");
}
LoggerInstance.LogInfo((object)"ButtonClicked_Unlock method is patched.");
return false;
}
LoggerInstance.LogInfo((object)"Skipped patching ButtonClicked_Unlock method.");
return true;
}
}
[HarmonyPatch(typeof(TNH_MagDuplicator), "Button_Upgrade")]
private class ModifyMagazineUpgradeCost
{
private static bool Prefix(ref TNH_MagDuplicator __instance)
{
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ee: Expected O, but got Unknown
//IL_0127: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: Unknown result type (might be due to invalid IL or missing references)
//IL_014b: Unknown result type (might be due to invalid IL or missing references)
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_028b: Unknown result type (might be due to invalid IL or missing references)
//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
if (ModifiedMagCostsEnabled.Value)
{
LoggerInstance.LogInfo((object)"Beginning to patch Button_Upgrade method.");
int num = 0;
string value = MagUpgradeType.Value;
if (value == "Flat")
{
num = MagUpgradeValue.Value;
}
if (value == "Multiplier")
{
num = MagUpgradeValue.Value * 3;
}
if (__instance.M.GetNumTokens() < num)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
return false;
}
FieldInfo field = typeof(TNH_MagDuplicator).GetField("m_detectedMag", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field == null)
{
LoggerInstance.LogInfo((object)"m_detectedMagField is null, something is wrong.");
}
FVRFireArmMagazine val = (FVRFireArmMagazine)field.GetValue(__instance);
if ((Object)(object)val == (Object)null)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
return false;
}
if (!IM.CompatMags.ContainsKey(val.MagazineType))
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
return false;
}
List<FVRObject> list = IM.CompatMags[val.MagazineType];
FVRObject val2 = null;
int num2 = 10000;
for (int i = 0; i < list.Count; i++)
{
if (!(list[i].ItemID == ((FVRPhysicalObject)val).ObjectWrapper.ItemID) && list[i].MagazineCapacity > val.m_capacity && list[i].MagazineCapacity < num2)
{
val2 = list[i];
num2 = list[i].MagazineCapacity;
}
}
if ((Object)(object)val2 != (Object)null)
{
LoggerInstance.LogInfo((object)"Tokens you would pay for upgrading magazine without this mod: 3");
LoggerInstance.LogInfo((object)("Tokens you are going to pay for upgrading magazine with this mod: " + num));
__instance.M.SubtractTokens(num);
Object.Destroy((Object)(object)((FVRInteractiveObject)val).GameObject);
GameObject val3 = Object.Instantiate<GameObject>(((AnvilAsset)val2).GetGameObject(), __instance.Spawnpoint_Mag.position, __instance.Spawnpoint_Mag.rotation);
__instance.M.AddObjectToTrackedList(val3);
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Spawn, ((Component)__instance).transform.position);
}
LoggerInstance.LogInfo((object)"Button_Upgrade method is patched.");
return false;
}
LoggerInstance.LogInfo((object)"Skipped patching Button_Upgrade method.");
return true;
}
}
[HarmonyPatch(typeof(TNH_MagDuplicator), "Button_Duplicate")]
private class ModifyMagazineCloneCost
{
private static bool Prefix(ref TNH_MagDuplicator __instance)
{
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Expected O, but got Unknown
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0199: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
//IL_0292: Unknown result type (might be due to invalid IL or missing references)
//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
//IL_02df: Unknown result type (might be due to invalid IL or missing references)
//IL_0418: Unknown result type (might be due to invalid IL or missing references)
//IL_0424: Unknown result type (might be due to invalid IL or missing references)
//IL_04a2: Unknown result type (might be due to invalid IL or missing references)
//IL_0484: Unknown result type (might be due to invalid IL or missing references)
//IL_0348: Unknown result type (might be due to invalid IL or missing references)
//IL_034d: Unknown result type (might be due to invalid IL or missing references)
if (ModifiedMagCostsEnabled.Value)
{
LoggerInstance.LogInfo((object)"Beginning to patch Button_Duplicate method.");
FieldInfo field = typeof(TNH_MagDuplicator).GetField("m_detectedMag", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field == null)
{
LoggerInstance.LogInfo((object)"m_detectedMagField is null, something is wrong.");
}
FVRFireArmMagazine val = (FVRFireArmMagazine)field.GetValue(__instance);
if ((Object)(object)val == (Object)null)
{
LoggerInstance.LogInfo((object)"m_detectedmag is null, something is wrong.");
}
FieldInfo field2 = typeof(TNH_MagDuplicator).GetField("m_detectedSL", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field == null)
{
LoggerInstance.LogInfo((object)"m_detectedSLField is null, something is wrong.");
}
Speedloader val2 = (Speedloader)field2.GetValue(__instance);
if ((Object)(object)val2 == (Object)null)
{
LoggerInstance.LogInfo((object)"m_detectedsl is null, something is wrong.");
}
FieldInfo field3 = typeof(TNH_MagDuplicator).GetField("m_storedDupeCost", BindingFlags.Instance | BindingFlags.NonPublic);
if ((object)field == null)
{
LoggerInstance.LogInfo((object)"m_storedDupeCostField is null, something is wrong.");
}
int num = (int)field3.GetValue(__instance);
bool flag = false;
if ((Object)(object)val == (Object)null && (Object)(object)val2 == (Object)null)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
return false;
}
if ((Object)(object)val != (Object)null && val.IsEnBloc)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
return false;
}
if (num < 1)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
return false;
}
LoggerInstance.LogInfo((object)("Tokens you would pay for cloning magazine without this mod:" + num));
int num2 = 0;
string value = MagCloneType.Value;
if (value == "Flat")
{
num2 = MagCloneValue.Value;
}
if (value == "Multiplier")
{
num2 = MagCloneValue.Value * num;
}
LoggerInstance.LogInfo((object)("Tokens you are going to pay for cloning magazine with this mod:" + num2));
if (__instance.M.GetNumTokens() >= num2)
{
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Spawn, ((Component)__instance).transform.position);
__instance.M.SubtractTokens(num2);
if ((Object)(object)val != (Object)null)
{
FVRObject objectWrapper = ((FVRPhysicalObject)val).ObjectWrapper;
GameObject val3 = Object.Instantiate<GameObject>(((AnvilAsset)objectWrapper).GetGameObject(), __instance.Spawnpoint_Mag.position, __instance.Spawnpoint_Mag.rotation);
__instance.M.AddObjectToTrackedList(val3);
FVRFireArmMagazine component = val3.GetComponent<FVRFireArmMagazine>();
for (int i = 0; i < Mathf.Min(val.LoadedRounds.Length, component.LoadedRounds.Length); i++)
{
if (val.LoadedRounds[i] != null && (Object)(object)val.LoadedRounds[i].LR_Mesh != (Object)null)
{
component.LoadedRounds[i].LR_Class = val.LoadedRounds[i].LR_Class;
component.LoadedRounds[i].LR_Mesh = val.LoadedRounds[i].LR_Mesh;
component.LoadedRounds[i].LR_Material = val.LoadedRounds[i].LR_Material;
component.LoadedRounds[i].LR_ObjectWrapper = val.LoadedRounds[i].LR_ObjectWrapper;
}
}
component.m_numRounds = val.m_numRounds;
component.UpdateBulletDisplay();
}
else if ((Object)(object)val2 != (Object)null)
{
FVRObject objectWrapper2 = ((FVRPhysicalObject)val2).ObjectWrapper;
GameObject val4 = Object.Instantiate<GameObject>(((AnvilAsset)objectWrapper2).GetGameObject(), __instance.Spawnpoint_Mag.position, __instance.Spawnpoint_Mag.rotation);
__instance.M.AddObjectToTrackedList(val4);
Speedloader component2 = val4.GetComponent<Speedloader>();
for (int j = 0; j < val2.Chambers.Count; j++)
{
if (val2.Chambers[j].IsLoaded)
{
component2.Chambers[j].Load(val2.Chambers[j].LoadedClass, false);
}
else
{
component2.Chambers[j].Unload();
}
}
}
LoggerInstance.LogInfo((object)"Button_Duplicate method is patched.");
return false;
}
SM.PlayCoreSound((FVRPooledAudioType)20, __instance.AudEvent_Fail, ((Component)__instance).transform.position);
return false;
}
LoggerInstance.LogInfo((object)"Skipped patching Button_Duplicate method.");
return true;
}
}
private static Casual_TNH casual_tnh;
private static ManualLogSource LoggerInstance;
private static ConfigEntry<int> MagCloneValue;
private static ConfigEntry<string> MagCloneType;
private static ConfigEntry<int> MagUpgradeValue;
private static ConfigEntry<string> MagUpgradeType;
private static ConfigEntry<bool> ModifiedMagCostsEnabled;
private static ConfigEntry<bool> ShorterAnalyzePhases;
private static ConfigEntry<float> TimeModifier;
private static ConfigEntry<bool> IsRerollFree;
private static ConfigEntry<int> TokenMultiplier;
private Harmony harmony;
private void Awake()
{
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_014e: Expected O, but got Unknown
casual_tnh = this;
LoggerInstance = ((BaseUnityPlugin)this).Logger;
MagCloneValue = ((BaseUnityPlugin)this).Config.Bind<int>("Modify Magazine Costs", "Magazine_clone_cost", 0, "Value to used for calculating magazine clone costs.");
MagCloneType = ((BaseUnityPlugin)this).Config.Bind<string>("Modify Magazine Costs", "Magazine_clone_cost_type", "Flat", "How you want to use \"Magazine_clone_cost\" value to calculate magazine clone costs. \nSet it to either \"Flat\" or \"Multiplier\". \nSet it to \"Multiplier\" and set \"Magazine_clone_cost\" to 1 if you don't want to use it.");
MagUpgradeValue = ((BaseUnityPlugin)this).Config.Bind<int>("Modify Magazine Costs", "Magazine_upgrade_cost", 0, "Value to used for calculating magazine upgrade costs.");
MagUpgradeType = ((BaseUnityPlugin)this).Config.Bind<string>("Modify Magazine Costs", "Magazine_upgrade_cost_type", "Flat", "How you want to use \"Magazine_upgrade_cost\" value to calculate magazine upgrade costs. \nSet it to either \"Flat\" or \"Multiplier\". \nSet it to \"Multiplier\" and set \"Magazine_upgrade_cost\" to 1 if you don't want to use it.");
ModifiedMagCostsEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Modify Magazine Costs", "Modify_magazine_costs", true, "If mod is allowed to change magazine upgrade and clone costs. Set it to false if you don't want to use it.");
ShorterAnalyzePhases = ((BaseUnityPlugin)this).Config.Bind<bool>("Shorter Analyze Phases", "Modify_analyze_time", true, "If analyze phases should be shortened or not. Set it to false if you don't want to use it.");
TimeModifier = ((BaseUnityPlugin)this).Config.Bind<float>("Shorter Analyze Phases", "Time_modifier", 0.5f, "Multiplier value used for calculating how long it takes for encryptions to appear.\n Lesser values means shorter analyze phases. \nRecommend values are between 0.25 to 0.75 for short analyze phases.");
IsRerollFree = ((BaseUnityPlugin)this).Config.Bind<bool>("Reroll Costs", "Rerolls_cost_nothing", true, "If rerolls should be free or not. Set it to false if you don't want to use it.");
TokenMultiplier = ((BaseUnityPlugin)this).Config.Bind<int>("Token Multiplier", "Token_gains_multiplied_by", 2, "Multiplier for token modification. Set it to 1 if you don't want to use it.");
harmony = new Harmony("Nepper.CasualTNH");
harmony.PatchAll();
}
}