using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Casual_Climber.Patches;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("com.TheTool.Casual_Climber")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+a6082abff63aee1141827226b9ccbf27c13a6d1e")]
[assembly: AssemblyProduct("com.TheTool.Casual_Climber")]
[assembly: AssemblyTitle("Casual_Climber")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[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 BepInEx
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class BepInAutoPluginAttribute : Attribute
{
public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace BepInEx.Preloader.Core.Patching
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class PatcherAutoPluginAttribute : Attribute
{
public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace Casual_Climber
{
[BepInPlugin("com.TheTool.Casual_Climber", "Casual_Climber", "1.0.1")]
public class Casual_ClimberPlugin : BaseUnityPlugin
{
private const string MyGUID = "com.TheTool.Casual_Climber";
private const string PluginName = "Casual_Climber";
private const string VersionString = "1.0.1";
private static readonly Harmony Harmony = new Harmony("com.TheTool.Casual_Climber");
public static ManualLogSource Log = new ManualLogSource("Casual_Climber");
public static bool casual_climberMasterKeyToggle = false;
public static bool displayUIFlag = false;
public static bool displayUIConfigFlag = false;
public static string casualClimber_ActivatedString = "Config Values Applied";
public static string casualClimber_DeactivatedString = "Default Values Applied";
public static string jumpString = "Jump Height Set to: ";
public static float jumpString_Value = jumpGravity;
public static float jumpString_DefaultValue = JumpGravityPatches.jumpGravity_Default;
public static string moveSpeedString = "Movement Speed Set to: ";
public static float moveSpeedString_Value = movementForce;
public static float moveSpeedString_DefaultValue = MovementForcePatches.movementForce_Default;
public static string climbSpeedString = "Climb Speed Set to: ";
public static float climbSpeedString_Value = climbSpeedMod;
public static float climbSpeedString_DefaultValue = ClimbSpeedModPatches.climbSpeedMod_Default;
public static string staminaModifierString = "Stamina Modifier Enabled: ";
public static bool staminaModifierString_Value = staminaModifier;
public static bool staminaModifierString_DefaultValue = CurrentStaminaPatches.staminaModifier_Default;
public static string hungerModifierString = "Hunger Disabled: ";
public static bool hungerModifierString_Value = hungerModifier;
public static bool hungerModifierString_DefaultValue = CharacterAfflictionsPatches.hungerModifier_Default;
public static string poisonModifierString = "Poison Disabled: ";
public static bool poisonModifierString_Value = poisonModifier;
public static bool poisonModifierString_DefaultValue = CharacterAfflictionsPatches.poisonModifier_Default;
public static string heatModifierString = "Hot Disabled: ";
public static bool heatModifierString_Value = heatModifier;
public static bool heatModifierString_DefaultValue = CharacterAfflictionsPatches.heatModifier_Default;
public static string coldModifierString = "Cold Disabled: ";
public static bool coldModifierString_Value = coldModifier;
public static bool coldModifierString_DefaultValue = CharacterAfflictionsPatches.coldModifier_Default;
public static string drowsyModifierString = "Drowsiness Disabled: ";
public static bool drowsyModifierString_Value = drowsyModifier;
public static bool drowsyModifierString_DefaultValue = CharacterAfflictionsPatches.drowsyModifier_Default;
public static string curseModifierString = "Curse Disabled: ";
public static bool curseModifierString_Value = curseModifier;
public static bool curseModifierString_DefaultValue = CharacterAfflictionsPatches.curseModifier_Default;
public static string sporesModifierString = "Spores Disabled: ";
public static bool sporesModifierString_Value = sporesModifier;
public static bool sporesModifierString_DefaultValue = CharacterAfflictionsPatches.sporesModifier_Default;
public static string thornsModifierString = "Thorns Disabled: ";
public static bool thornsModifierString_Value = thornsModifier;
public static bool thornsModifierString_DefaultValue = CharacterAfflictionsPatches.thornsModifier_Default;
public static string crabModifierString = "Crab Disabled: ";
public static bool crabModifierString_Value = crabModifier;
public static bool crabModifierString_DefaultValue = CharacterAfflictionsPatches.crabModifier_Default;
public static string webModifierString = "Web Disabled: ";
public static bool webModifierString_Value = webModifier;
public static bool webModifierString_DefaultValue = CharacterAfflictionsPatches.webModifier_Default;
public static string weightModifierString = "Weight Disabled: ";
public static bool weightModifierString_Value = weightModifier;
public static bool weightModifierString_DefaultValue = CharacterAfflictionsPatches.weightModifier_Default;
public static string injuryModifierString = "Injury Disabled: ";
public static bool injuryModifierString_Value = injuryModifier;
public static bool injuryModifierString_DefaultValue = CharacterAfflictionsPatches.injuryModifier_Default;
public static string JumpHeightKey = "01. Jump Height";
public static string MovementSpeedKey = "02. Movement Speed";
public static string ClimbSpeedModKey = "03. Climb Speed";
public static string StaminaModifierKey = "04. Enable Stamina Modifier";
public static string HungerModifierKey = "05. Disable Hunger";
public static string PoisonModifierKey = "06. Disable Poison";
public static string HeatModifierKey = "07. Disable Heat";
public static string ColdModifierKey = "08. Disable Cold";
public static string DrowsyModifierKey = "09. Disable Drowsiness";
public static string CurseModifierKey = "10. Disable Curse";
public static string SporesModifierKey = "11. Disable Spores";
public static string ThornsModifierKey = "12. Disable Thorns";
public static string CrabModifierKey = "13. Disable Crab";
public static string WebModifierKey = "14. Disable Web";
public static string WeightModifierKey = "15. Disable Weight";
public static string InjuryModifierKey = "16. Disable Injury";
public static string KeyboardKey_1Key = "17. Enable/Disable PEAK-ToolsTools Key";
public static string KeyboardKey_1_AltKey = "18. Enable/Disable PEAK-ToolsTools Alt Key";
public static string KeyboardKey_2Key = "19. PEAK-ToolsTools Configuration Key";
public static string KeyboardKey_2_AltKey = "20. PEAK-ToolsTools Configuration Alt Key";
public static ConfigEntry<float>? JumpHeight;
public static ConfigEntry<float>? MovementSpeed;
public static ConfigEntry<float>? ClimbSpeedMod;
public static ConfigEntry<bool>? StaminaModifier;
public static ConfigEntry<bool>? HungerModifier;
public static ConfigEntry<bool>? PoisonModifier;
public static ConfigEntry<bool>? HeatModifier;
public static ConfigEntry<bool>? ColdModifier;
public static ConfigEntry<bool>? DrowsyModifier;
public static ConfigEntry<bool>? CurseModifier;
public static ConfigEntry<bool>? SporesModifier;
public static ConfigEntry<bool>? ThornsModifier;
public static ConfigEntry<bool>? CrabModifier;
public static ConfigEntry<bool>? WebModifier;
public static ConfigEntry<bool>? WeightModifier;
public static ConfigEntry<bool>? InjuryModifier;
public static ConfigEntry<KeyboardShortcut>? KeyboardKey_1;
public static ConfigEntry<KeyboardShortcut>? KeyboardKey_1_Alt;
public static ConfigEntry<KeyboardShortcut>? KeyboardKey_2;
public static ConfigEntry<KeyboardShortcut>? KeyboardKey_2_Alt;
public static float jumpGravity;
public static bool jumpGravityToggle;
public static float movementForce;
public static bool movementForceToggle;
public static float climbSpeedMod;
public static bool climbSpeedModToggle;
public static bool staminaModifier;
public static bool staminaModifierToggle;
public static bool hungerModifier;
public static bool hungerModifierToggle;
public static bool poisonModifier;
public static bool poisonModifierToggle;
public static bool heatModifier;
public static bool heatModifierToggle;
public static bool coldModifier;
public static bool coldModifierToggle;
public static bool drowsyModifier;
public static bool drowsyModifierToggle;
public static bool curseModifier;
public static bool curseModifierToggle;
public static bool sporesModifier;
public static bool sporesModifierToggle;
public static bool thornsModifier;
public static bool thornsModifierToggle;
public static bool crabModifier;
public static bool crabModifierToggle;
public static bool webModifier;
public static bool webModifierToggle;
public static bool weightModifier;
public static bool weightModifierToggle;
public static bool injuryModifier;
public static bool injuryModifierToggle;
public void Awake()
{
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Expected O, but got Unknown
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Expected O, but got Unknown
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Expected O, but got Unknown
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Expected O, but got Unknown
//IL_0168: Unknown result type (might be due to invalid IL or missing references)
//IL_0172: Expected O, but got Unknown
//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Expected O, but got Unknown
//IL_01da: Unknown result type (might be due to invalid IL or missing references)
//IL_01e4: Expected O, but got Unknown
//IL_0213: Unknown result type (might be due to invalid IL or missing references)
//IL_021d: Expected O, but got Unknown
//IL_024c: Unknown result type (might be due to invalid IL or missing references)
//IL_0256: Expected O, but got Unknown
//IL_0285: Unknown result type (might be due to invalid IL or missing references)
//IL_028f: Expected O, but got Unknown
//IL_02be: Unknown result type (might be due to invalid IL or missing references)
//IL_02c8: Expected O, but got Unknown
//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0301: Expected O, but got Unknown
//IL_0330: Unknown result type (might be due to invalid IL or missing references)
//IL_033a: Expected O, but got Unknown
//IL_0369: Unknown result type (might be due to invalid IL or missing references)
//IL_0373: Expected O, but got Unknown
//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
//IL_03ac: Expected O, but got Unknown
//IL_03db: Unknown result type (might be due to invalid IL or missing references)
//IL_03e5: Expected O, but got Unknown
//IL_0414: Unknown result type (might be due to invalid IL or missing references)
//IL_041e: Expected O, but got Unknown
//IL_043d: Unknown result type (might be due to invalid IL or missing references)
//IL_044d: Unknown result type (might be due to invalid IL or missing references)
//IL_0457: Expected O, but got Unknown
//IL_0473: Unknown result type (might be due to invalid IL or missing references)
//IL_0483: Unknown result type (might be due to invalid IL or missing references)
//IL_048d: Expected O, but got Unknown
//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
//IL_04c6: Expected O, but got Unknown
//IL_04e2: Unknown result type (might be due to invalid IL or missing references)
//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
//IL_04fc: Expected O, but got Unknown
Log = ((BaseUnityPlugin)this).Logger;
jumpGravityToggle = false;
movementForceToggle = false;
climbSpeedModToggle = false;
staminaModifierToggle = false;
hungerModifierToggle = false;
poisonModifierToggle = false;
heatModifierToggle = false;
coldModifierToggle = false;
drowsyModifierToggle = false;
curseModifierToggle = false;
sporesModifierToggle = false;
thornsModifierToggle = false;
crabModifierToggle = false;
webModifierToggle = false;
weightModifierToggle = false;
injuryModifierToggle = false;
GameObject val = new GameObject("GUI_UI");
Object.DontDestroyOnLoad((Object)(object)val);
GUI_UI.Instance = val.AddComponent<GUI_UI>();
JumpHeight = ((BaseUnityPlugin)this).Config.Bind<float>("General", JumpHeightKey, 60f, new ConfigDescription("Jump Height Value. min:15 - max:60", (AcceptableValueBase)(object)new AcceptableValueRange<float>(15f, 60f), Array.Empty<object>()));
MovementSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("General", MovementSpeedKey, 50f, new ConfigDescription("Move Speed Value. min:10 - max:50", (AcceptableValueBase)(object)new AcceptableValueRange<float>(25f, 50f), Array.Empty<object>()));
ClimbSpeedMod = ((BaseUnityPlugin)this).Config.Bind<float>("General", ClimbSpeedModKey, 2f, new ConfigDescription("Climb Speed Value. min:1 - max:2", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 2f), Array.Empty<object>()));
StaminaModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", StaminaModifierKey, true, new ConfigDescription("Enable Stamina Modifier.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
HungerModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", HungerModifierKey, true, new ConfigDescription("Disable Hunger.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
PoisonModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", PoisonModifierKey, true, new ConfigDescription("Disable Poison.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
HeatModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", HeatModifierKey, true, new ConfigDescription("Disable Hot.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
ColdModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", ColdModifierKey, true, new ConfigDescription("Disable Cold.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
DrowsyModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", DrowsyModifierKey, true, new ConfigDescription("Disable Drowsy.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
CurseModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", CurseModifierKey, true, new ConfigDescription("Disable Curse.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
SporesModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", SporesModifierKey, true, new ConfigDescription("Disable Spores.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
ThornsModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", ThornsModifierKey, true, new ConfigDescription("Disable Thorns.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
CrabModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", CrabModifierKey, true, new ConfigDescription("Disable Crab.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
WebModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", WebModifierKey, true, new ConfigDescription("Disable Web.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
WeightModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", WeightModifierKey, true, new ConfigDescription("Disable Weight.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
InjuryModifier = ((BaseUnityPlugin)this).Config.Bind<bool>("General", InjuryModifierKey, true, new ConfigDescription("Disable Injury.", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
KeyboardKey_1 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", KeyboardKey_1Key, new KeyboardShortcut((KeyCode)270, Array.Empty<KeyCode>()), new ConfigDescription("Activate Mod Key.", (AcceptableValueBase)null, Array.Empty<object>()));
KeyboardKey_1_Alt = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", KeyboardKey_1_AltKey, new KeyboardShortcut((KeyCode)61, Array.Empty<KeyCode>()), new ConfigDescription("Activate Mod Key.", (AcceptableValueBase)null, Array.Empty<object>()));
KeyboardKey_2 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", KeyboardKey_2Key, new KeyboardShortcut((KeyCode)269, Array.Empty<KeyCode>()), new ConfigDescription("Show Mod Config Key.", (AcceptableValueBase)null, Array.Empty<object>()));
KeyboardKey_2_Alt = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", KeyboardKey_2_AltKey, new KeyboardShortcut((KeyCode)45, Array.Empty<KeyCode>()), new ConfigDescription("Show Mod Config Key.", (AcceptableValueBase)null, Array.Empty<object>()));
JumpHeight.SettingChanged += ConfigSettingChanged;
MovementSpeed.SettingChanged += ConfigSettingChanged;
ClimbSpeedMod.SettingChanged += ConfigSettingChanged;
StaminaModifier.SettingChanged += ConfigSettingChanged;
HungerModifier.SettingChanged += ConfigSettingChanged;
PoisonModifier.SettingChanged += ConfigSettingChanged;
HeatModifier.SettingChanged += ConfigSettingChanged;
ColdModifier.SettingChanged += ConfigSettingChanged;
DrowsyModifier.SettingChanged += ConfigSettingChanged;
CurseModifier.SettingChanged += ConfigSettingChanged;
SporesModifier.SettingChanged += ConfigSettingChanged;
ThornsModifier.SettingChanged += ConfigSettingChanged;
CrabModifier.SettingChanged += ConfigSettingChanged;
WebModifier.SettingChanged += ConfigSettingChanged;
WeightModifier.SettingChanged += ConfigSettingChanged;
InjuryModifier.SettingChanged += ConfigSettingChanged;
KeyboardKey_1.SettingChanged += ConfigSettingChanged;
KeyboardKey_2.SettingChanged += ConfigSettingChanged;
jumpGravity = JumpHeight.Value;
movementForce = MovementSpeed.Value;
climbSpeedMod = ClimbSpeedMod.Value;
staminaModifier = StaminaModifier.Value;
hungerModifier = HungerModifier.Value;
poisonModifier = PoisonModifier.Value;
heatModifier = HeatModifier.Value;
coldModifier = ColdModifier.Value;
drowsyModifier = DrowsyModifier.Value;
curseModifier = CurseModifier.Value;
sporesModifier = SporesModifier.Value;
thornsModifier = ThornsModifier.Value;
crabModifier = CrabModifier.Value;
webModifier = WebModifier.Value;
weightModifier = WeightModifier.Value;
injuryModifier = InjuryModifier.Value;
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: Casual_Climber, VersionString: 1.0.1 is loading...");
Harmony.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: Casual_Climber, VersionString: 1.0.1 is loaded.");
}
public void Update()
{
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: 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_0128: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
displayUIFlag = false;
displayUIConfigFlag = false;
jumpString_Value = jumpGravity;
moveSpeedString_Value = movementForce;
climbSpeedString_Value = climbSpeedMod;
staminaModifierString_Value = staminaModifier;
hungerModifierString_Value = hungerModifier;
poisonModifierString_Value = poisonModifier;
heatModifierString_Value = heatModifier;
coldModifierString_Value = coldModifier;
drowsyModifierString_Value = drowsyModifier;
curseModifierString_Value = curseModifier;
sporesModifierString_Value = sporesModifier;
thornsModifierString_Value = thornsModifier;
crabModifierString_Value = crabModifier;
webModifierString_Value = webModifier;
weightModifierString_Value = weightModifier;
injuryModifierString_Value = injuryModifier;
KeyboardShortcut value;
if (KeyboardKey_2 != null)
{
value = KeyboardKey_2.Value;
if (((KeyboardShortcut)(ref value)).IsDown() && !displayUIConfigFlag)
{
displayUIConfigFlag = true;
}
}
if (KeyboardKey_2_Alt != null)
{
value = KeyboardKey_2_Alt.Value;
if (((KeyboardShortcut)(ref value)).IsDown() && !displayUIConfigFlag)
{
displayUIConfigFlag = true;
}
}
if (KeyboardKey_1 != null)
{
value = KeyboardKey_1.Value;
if (((KeyboardShortcut)(ref value)).IsDown())
{
MasterSwitchesToggle();
}
}
if (KeyboardKey_1_Alt != null)
{
value = KeyboardKey_1_Alt.Value;
if (((KeyboardShortcut)(ref value)).IsDown())
{
MasterSwitchesToggle();
}
}
}
public static void MasterSwitchesToggle()
{
if (!casual_climberMasterKeyToggle)
{
casual_climberMasterKeyToggle = true;
}
else
{
casual_climberMasterKeyToggle = false;
}
if (!displayUIFlag)
{
displayUIFlag = true;
}
if (!jumpGravityToggle)
{
jumpGravityToggle = true;
Log.LogInfo((object)$"jumpGravity Value: {JumpGravityPatches.jumpGravity}");
}
else
{
jumpGravityToggle = false;
Log.LogInfo((object)$"jumpGravity Value: {JumpGravityPatches.jumpGravity_Default}: Default");
}
if (!movementForceToggle)
{
movementForceToggle = true;
Log.LogInfo((object)$"movementForce Value: {MovementForcePatches.movementForce}");
}
else
{
movementForceToggle = false;
Log.LogInfo((object)$"movementForce Value: {MovementForcePatches.movementForce_Default}: Default");
}
if (!climbSpeedModToggle)
{
climbSpeedModToggle = true;
Log.LogInfo((object)$"climbSpeedMod Value: {ClimbSpeedModPatches.climbSpeedMod}");
}
else
{
climbSpeedModToggle = false;
Log.LogInfo((object)$"climbSpeedMod Value: {ClimbSpeedModPatches.climbSpeedMod_Default}: Default");
}
if (!staminaModifierToggle)
{
staminaModifierToggle = true;
Log.LogInfo((object)$"staminaModifier Value: {CurrentStaminaPatches.staminaModifier}");
}
else
{
staminaModifierToggle = false;
Log.LogInfo((object)$"staminaModifier Value: {CurrentStaminaPatches.staminaModifier_Default}: Default");
}
if (!hungerModifierToggle)
{
hungerModifierToggle = true;
Log.LogInfo((object)$"hungerModifier Value: {CharacterAfflictionsPatches.hungerModifier}");
}
else
{
hungerModifierToggle = false;
Log.LogInfo((object)$"hungerModifier Value: {CharacterAfflictionsPatches.hungerModifier_Default}: Default");
}
if (!poisonModifierToggle)
{
poisonModifierToggle = true;
Log.LogInfo((object)$"poisonModifier Value: {CharacterAfflictionsPatches.poisonModifier}");
}
else
{
poisonModifierToggle = false;
Log.LogInfo((object)$"poisonModifier Value: {CharacterAfflictionsPatches.poisonModifier_Default}: Default");
}
if (!heatModifierToggle)
{
heatModifierToggle = true;
Log.LogInfo((object)$"heatModifier Value: {CharacterAfflictionsPatches.heatModifier}");
}
else
{
heatModifierToggle = false;
Log.LogInfo((object)$"heatModifier Value: {CharacterAfflictionsPatches.heatModifier_Default}: Default");
}
if (!coldModifierToggle)
{
coldModifierToggle = true;
Log.LogInfo((object)$"coldModifier Value: {CharacterAfflictionsPatches.coldModifier}");
}
else
{
coldModifierToggle = false;
Log.LogInfo((object)$"coldModifier Value: {CharacterAfflictionsPatches.coldModifier_Default}: Default");
}
if (!drowsyModifierToggle)
{
drowsyModifierToggle = true;
Log.LogInfo((object)$"drowsyModifier Value: {CharacterAfflictionsPatches.drowsyModifier}");
}
else
{
drowsyModifierToggle = false;
Log.LogInfo((object)$"drowsyModifier Value: {CharacterAfflictionsPatches.drowsyModifier_Default}: Default");
}
if (!curseModifierToggle)
{
curseModifierToggle = true;
Log.LogInfo((object)$"curseModifier Value: {CharacterAfflictionsPatches.curseModifier}");
}
else
{
curseModifierToggle = false;
Log.LogInfo((object)$"curseModifier Value: {CharacterAfflictionsPatches.curseModifier_Default}: Default");
}
if (!sporesModifierToggle)
{
sporesModifierToggle = true;
Log.LogInfo((object)$"sporesModifier Value: {CharacterAfflictionsPatches.sporesModifier}");
}
else
{
sporesModifierToggle = false;
Log.LogInfo((object)$"sporesModifier Value: {CharacterAfflictionsPatches.sporesModifier_Default}: Default");
}
if (!thornsModifierToggle)
{
thornsModifierToggle = true;
Log.LogInfo((object)$"thornsModifier Value: {CharacterAfflictionsPatches.thornsModifier}");
}
else
{
thornsModifierToggle = false;
Log.LogInfo((object)$"thornsModifier Value: {CharacterAfflictionsPatches.thornsModifier_Default}: Default");
}
if (!crabModifierToggle)
{
crabModifierToggle = true;
Log.LogInfo((object)$"crabModifier Value: {CharacterAfflictionsPatches.crabModifier}");
}
else
{
crabModifierToggle = false;
Log.LogInfo((object)$"crabModifier Value: {CharacterAfflictionsPatches.crabModifier_Default}: Default");
}
if (!webModifierToggle)
{
webModifierToggle = true;
Log.LogInfo((object)$"webModifier Value: {CharacterAfflictionsPatches.webModifier}");
}
else
{
webModifierToggle = false;
Log.LogInfo((object)$"webModifier Value: {CharacterAfflictionsPatches.webModifier_Default}: Default");
}
if (!weightModifierToggle)
{
weightModifierToggle = true;
Log.LogInfo((object)$"weightModifier Value: {CharacterAfflictionsPatches.weightModifier}");
}
else
{
weightModifierToggle = false;
Log.LogInfo((object)$"weightModifier Value: {CharacterAfflictionsPatches.weightModifier_Default}: Default");
}
if (!injuryModifierToggle)
{
injuryModifierToggle = true;
Log.LogInfo((object)$"injuryModifier Value: {CharacterAfflictionsPatches.injuryModifier}");
}
else
{
injuryModifierToggle = false;
Log.LogInfo((object)$"injuryModifier Value: {CharacterAfflictionsPatches.injuryModifier_Default}: Default");
}
Log.LogInfo((object)$"jumpGravityToggle Status: {jumpGravityToggle}");
Log.LogInfo((object)$"movementForceToggle Status: {movementForceToggle}");
Log.LogInfo((object)$"climbSpeedModToggle Status: {climbSpeedModToggle}");
Log.LogInfo((object)$"staminaModifierToggle Status: {staminaModifierToggle}");
Log.LogInfo((object)$"hungerModifierToggle Status: {hungerModifierToggle}");
Log.LogInfo((object)$"poisonModifierToggle Status: {poisonModifierToggle}");
Log.LogInfo((object)$"heatModifierToggle Status: {heatModifierToggle}");
Log.LogInfo((object)$"coldModifierToggle Status: {coldModifierToggle}");
Log.LogInfo((object)$"drowsyModifierToggle Status: {drowsyModifierToggle}");
Log.LogInfo((object)$"curseModifierToggle Status: {curseModifierToggle}");
Log.LogInfo((object)$"sporesModifierToggle Status: {sporesModifierToggle}");
Log.LogInfo((object)$"thornsModifierToggle Status: {thornsModifierToggle}");
Log.LogInfo((object)$"crabModifierToggle Status: {crabModifierToggle}");
Log.LogInfo((object)$"webModifierToggle Status: {webModifierToggle}");
Log.LogInfo((object)$"weightModifierToggle Status: {weightModifierToggle}");
Log.LogInfo((object)$"injuryModifierToggle Status: {injuryModifierToggle}");
}
public static void ConfigSettingChanged(object sender, EventArgs e)
{
//IL_0532: Unknown result type (might be due to invalid IL or missing references)
//IL_0537: Unknown result type (might be due to invalid IL or missing references)
//IL_055f: Unknown result type (might be due to invalid IL or missing references)
//IL_0564: Unknown result type (might be due to invalid IL or missing references)
//IL_058c: Unknown result type (might be due to invalid IL or missing references)
//IL_0591: Unknown result type (might be due to invalid IL or missing references)
//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
//IL_05be: Unknown result type (might be due to invalid IL or missing references)
SettingChangedEventArgs val = (SettingChangedEventArgs)(object)((e is SettingChangedEventArgs) ? e : null);
if (val != null)
{
if (val.ChangedSetting.Definition.Key == JumpHeightKey && JumpHeight != null)
{
jumpGravity = JumpHeight.Value;
Log.LogInfo((object)$"jumpGravity Value: {jumpGravity}");
}
if (val.ChangedSetting.Definition.Key == MovementSpeedKey && MovementSpeed != null)
{
movementForce = MovementSpeed.Value;
Log.LogInfo((object)$"movementForce Value: {movementForce}");
}
if (val.ChangedSetting.Definition.Key == ClimbSpeedModKey && ClimbSpeedMod != null)
{
climbSpeedMod = ClimbSpeedMod.Value;
Log.LogInfo((object)$"climbSpeed Value: {climbSpeedMod}");
}
if (val.ChangedSetting.Definition.Key == StaminaModifierKey && StaminaModifier != null)
{
staminaModifier = StaminaModifier.Value;
Log.LogInfo((object)$"staminaModifier Value: {staminaModifier}");
}
if (val.ChangedSetting.Definition.Key == HungerModifierKey && HungerModifier != null)
{
hungerModifier = HungerModifier.Value;
Log.LogInfo((object)$"hungerModifier Value: {hungerModifier}");
}
if (val.ChangedSetting.Definition.Key == PoisonModifierKey && PoisonModifier != null)
{
poisonModifier = PoisonModifier.Value;
Log.LogInfo((object)$"poisonModifier Value: {poisonModifier}");
}
if (val.ChangedSetting.Definition.Key == HeatModifierKey && HeatModifier != null)
{
heatModifier = HeatModifier.Value;
Log.LogInfo((object)$"heatModifier Value: {heatModifier}");
}
if (val.ChangedSetting.Definition.Key == ColdModifierKey && ColdModifier != null)
{
coldModifier = ColdModifier.Value;
Log.LogInfo((object)$"coldModifier Value: {coldModifier}");
}
if (val.ChangedSetting.Definition.Key == DrowsyModifierKey && DrowsyModifier != null)
{
drowsyModifier = DrowsyModifier.Value;
Log.LogInfo((object)$"drowsyModifier Value: {drowsyModifier}");
}
if (val.ChangedSetting.Definition.Key == CurseModifierKey && CurseModifier != null)
{
curseModifier = CurseModifier.Value;
Log.LogInfo((object)$"curseModifier Value: {curseModifier}");
}
if (val.ChangedSetting.Definition.Key == SporesModifierKey && SporesModifier != null)
{
sporesModifier = SporesModifier.Value;
Log.LogInfo((object)$"sporesModifier Value: {sporesModifier}");
}
if (val.ChangedSetting.Definition.Key == ThornsModifierKey && ThornsModifier != null)
{
thornsModifier = ThornsModifier.Value;
Log.LogInfo((object)$"thornsModifier Value: {thornsModifier}");
}
if (val.ChangedSetting.Definition.Key == CrabModifierKey && CrabModifier != null)
{
crabModifier = CrabModifier.Value;
Log.LogInfo((object)$"crabModifier Value: {crabModifier}");
}
if (val.ChangedSetting.Definition.Key == WebModifierKey && WebModifier != null)
{
webModifier = WebModifier.Value;
Log.LogInfo((object)$"webModifier Value: {webModifier}");
}
if (val.ChangedSetting.Definition.Key == WeightModifierKey && WeightModifier != null)
{
weightModifier = WeightModifier.Value;
Log.LogInfo((object)$"weightModifier Value: {weightModifier}");
}
if (val.ChangedSetting.Definition.Key == InjuryModifierKey && InjuryModifier != null)
{
injuryModifier = InjuryModifier.Value;
Log.LogInfo((object)$"injuryModifier Value: {injuryModifier}");
}
if (val.ChangedSetting.Definition.Key == KeyboardKey_1Key)
{
KeyboardShortcut val2 = (KeyboardShortcut)val.ChangedSetting.BoxedValue;
}
if (val.ChangedSetting.Definition.Key == KeyboardKey_1_AltKey)
{
KeyboardShortcut val3 = (KeyboardShortcut)val.ChangedSetting.BoxedValue;
}
if (val.ChangedSetting.Definition.Key == KeyboardKey_2Key)
{
KeyboardShortcut val4 = (KeyboardShortcut)val.ChangedSetting.BoxedValue;
}
if (val.ChangedSetting.Definition.Key == KeyboardKey_2_AltKey)
{
KeyboardShortcut val5 = (KeyboardShortcut)val.ChangedSetting.BoxedValue;
}
}
}
}
}
namespace Casual_Climber.Patches
{
[HarmonyPatch]
public class CharacterAfflictionsPatches
{
public static bool hungerModifier_Default;
public static bool hungerModifier;
public static bool hungerModifierToggle;
public static bool poisonModifier_Default;
public static bool poisonModifier;
public static bool poisonModifierToggle;
public static bool heatModifier_Default;
public static bool heatModifier;
public static bool heatModifierToggle;
public static bool coldModifier_Default;
public static bool coldModifier;
public static bool coldModifierToggle;
public static bool drowsyModifier_Default;
public static bool drowsyModifier;
public static bool drowsyModifierToggle;
public static bool curseModifier_Default;
public static bool curseModifier;
public static bool curseModifierToggle;
public static bool sporesModifier_Default;
public static bool sporesModifier;
public static bool sporesModifierToggle;
public static bool thornsModifier_Default;
public static bool thornsModifier;
public static bool thornsModifierToggle;
public static bool crabModifier_Default;
public static bool crabModifier;
public static bool crabModifierToggle;
public static bool webModifier_Default;
public static bool webModifier;
public static bool webModifierToggle;
public static bool weightModifier_Default;
public static bool weightModifier;
public static bool weightModifierToggle;
public static bool injuryModifier_Default;
public static bool injuryModifier;
public static bool injuryModifierToggle;
public static bool modifierDown;
public static bool keyFlag0;
public static bool keyFlag1;
public static bool keyFlag2;
public static bool keyFlag3;
public static bool keyFlag4;
public static bool keyFlag5;
public static bool keyFlag6;
public static bool keyFlag7;
public static bool keyFlag8;
public static bool keyFlag9;
public static bool keyFlag10;
public static bool keyFlag11;
public static bool keyFlag12;
[HarmonyPatch(typeof(CharacterAfflictions), "UpdateNormalStatuses")]
[HarmonyPostfix]
public static void Awake_Postfix()
{
if (Input.GetKeyDown((KeyCode)308))
{
modifierDown = true;
}
else if (Input.GetKeyUp((KeyCode)308))
{
modifierDown = false;
}
if (modifierDown)
{
keyFlag0 = Input.GetKeyDown((KeyCode)256);
keyFlag1 = Input.GetKeyDown((KeyCode)257);
keyFlag2 = Input.GetKeyDown((KeyCode)258);
keyFlag3 = Input.GetKeyDown((KeyCode)259);
keyFlag4 = Input.GetKeyDown((KeyCode)260);
keyFlag5 = Input.GetKeyDown((KeyCode)261);
keyFlag6 = Input.GetKeyDown((KeyCode)262);
keyFlag7 = Input.GetKeyDown((KeyCode)263);
keyFlag8 = Input.GetKeyDown((KeyCode)264);
keyFlag9 = Input.GetKeyDown((KeyCode)265);
keyFlag10 = Input.GetKeyDown((KeyCode)267);
keyFlag11 = Input.GetKeyDown((KeyCode)268);
keyFlag12 = Input.GetKeyDown((KeyCode)266);
}
if (keyFlag0)
{
float currentStatus = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)1);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)1, currentStatus + 0.1f, false);
currentStatus += 0.1f;
keyFlag0 = false;
Debug.Log((object)$"[Casual_Climber] Hunger Status Value = {currentStatus}");
}
if (keyFlag1)
{
float currentStatus2 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)3);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)3, currentStatus2 + 0.1f, false);
currentStatus2 += 0.1f;
keyFlag1 = false;
Debug.Log((object)$"[Casual_Climber] Poison Status Value = {currentStatus2}");
}
if (keyFlag2)
{
float currentStatus3 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)8);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)8, currentStatus3 + 0.1f, false);
currentStatus3 += 0.1f;
keyFlag2 = false;
Debug.Log((object)$"[Casual_Climber] Hot Status Value = {currentStatus3}");
}
if (keyFlag3)
{
float currentStatus4 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)2);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)2, currentStatus4 + 0.1f, false);
currentStatus4 += 0.1f;
keyFlag3 = false;
Debug.Log((object)$"[Casual_Climber] Cold Status Value = {currentStatus4}");
}
if (keyFlag4)
{
float currentStatus5 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)6);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)6, currentStatus5 + 0.1f, false);
currentStatus5 += 0.1f;
keyFlag4 = false;
Debug.Log((object)$"[Casual_Climber] Drowsy Status Value = {currentStatus5}");
}
if (keyFlag5)
{
float currentStatus6 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)5);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)5, currentStatus6 + 0.1f, false);
currentStatus6 += 0.1f;
keyFlag5 = false;
Debug.Log((object)$"[Casual_Climber] Curse Status Value = {currentStatus6}");
}
if (keyFlag6)
{
float currentStatus7 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)10);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)10, currentStatus7 + 0.1f, false);
currentStatus7 += 0.1f;
keyFlag6 = false;
Debug.Log((object)$"[Casual_Climber] Spores Status Value = {currentStatus7}");
}
if (keyFlag7)
{
float currentStatus8 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)9);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)9, currentStatus8 + 0.1f, false);
currentStatus8 += 0.1f;
keyFlag7 = false;
Debug.Log((object)$"[Casual_Climber] Thorns Status Value = {currentStatus8}");
}
if (keyFlag8)
{
float currentStatus9 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)4);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)4, currentStatus9 + 0.1f, false);
currentStatus9 += 0.1f;
keyFlag8 = false;
Debug.Log((object)$"[Casual_Climber] Crab Status Value = {currentStatus9}");
}
if (keyFlag9)
{
float currentStatus10 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)11);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)11, currentStatus10 + 0.1f, false);
currentStatus10 += 0.1f;
keyFlag9 = false;
Debug.Log((object)$"[Casual_Climber] Web Status Value = {currentStatus10}");
}
if (keyFlag10)
{
float currentStatus11 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)7);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)7, currentStatus11 + 0.1f, false);
currentStatus11 += 0.1f;
keyFlag10 = false;
Debug.Log((object)$"[Casual_Climber] Weight Status Value = {currentStatus11}");
}
if (keyFlag11)
{
float currentStatus12 = Character.localCharacter.refs.afflictions.GetCurrentStatus((STATUSTYPE)0);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)0, currentStatus12 + 0.1f, false);
currentStatus12 += 0.1f;
keyFlag11 = false;
Debug.Log((object)$"[Casual_Climber] Injury Status Value = {currentStatus12}");
}
if (keyFlag12)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)5, 0f, false);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)9, 0f, false);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)4, 0f, false);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)11, 0f, false);
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)7, 0f, false);
Character.localCharacter.refs.afflictions.ClearAllStatus(false);
keyFlag12 = false;
Debug.Log((object)"[Casual_Climber] Remove All Status Types");
}
hungerModifier = Casual_ClimberPlugin.hungerModifier;
hungerModifierToggle = Casual_ClimberPlugin.hungerModifierToggle;
poisonModifier = Casual_ClimberPlugin.poisonModifier;
poisonModifierToggle = Casual_ClimberPlugin.poisonModifierToggle;
heatModifier = Casual_ClimberPlugin.heatModifier;
heatModifierToggle = Casual_ClimberPlugin.heatModifierToggle;
coldModifier = Casual_ClimberPlugin.coldModifier;
coldModifierToggle = Casual_ClimberPlugin.coldModifierToggle;
drowsyModifier = Casual_ClimberPlugin.drowsyModifier;
drowsyModifierToggle = Casual_ClimberPlugin.drowsyModifierToggle;
curseModifier = Casual_ClimberPlugin.curseModifier;
curseModifierToggle = Casual_ClimberPlugin.curseModifierToggle;
sporesModifier = Casual_ClimberPlugin.sporesModifier;
sporesModifierToggle = Casual_ClimberPlugin.sporesModifierToggle;
thornsModifier = Casual_ClimberPlugin.thornsModifier;
thornsModifierToggle = Casual_ClimberPlugin.thornsModifierToggle;
crabModifier = Casual_ClimberPlugin.crabModifier;
crabModifierToggle = Casual_ClimberPlugin.crabModifierToggle;
webModifier = Casual_ClimberPlugin.webModifier;
webModifierToggle = Casual_ClimberPlugin.webModifierToggle;
weightModifier = Casual_ClimberPlugin.weightModifier;
weightModifierToggle = Casual_ClimberPlugin.weightModifierToggle;
injuryModifier = Casual_ClimberPlugin.injuryModifier;
injuryModifierToggle = Casual_ClimberPlugin.injuryModifierToggle;
if (hungerModifier && hungerModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)1, 0f, false);
}
if (poisonModifier && poisonModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)3, 0f, false);
}
if (heatModifier && heatModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)8, 0f, false);
}
if (coldModifier && coldModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)2, 0f, false);
}
if (drowsyModifier && drowsyModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)6, 0f, false);
}
if (curseModifier && curseModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)5, 0f, false);
}
if (sporesModifier && sporesModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)10, 0f, false);
}
if (thornsModifier && thornsModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)9, 0f, false);
}
if (crabModifier && crabModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)4, 0f, false);
}
if (webModifier && webModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)11, 0f, false);
}
if (weightModifier && weightModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)7, 0f, false);
}
if (injuryModifier && injuryModifierToggle)
{
Character.localCharacter.refs.afflictions.SetStatus((STATUSTYPE)0, 0f, false);
}
}
}
[HarmonyPatch]
public class ClimbSpeedModPatches
{
public static float climbSpeedMod_Default = 1f;
public static float climbSpeedMod;
public static bool climbSpeedModToggle;
[HarmonyPatch(typeof(CharacterClimbing), "FixedUpdate")]
[HarmonyPostfix]
public static void Awake_Postfix(ref float ___climbSpeedMod)
{
climbSpeedMod = Casual_ClimberPlugin.climbSpeedMod;
climbSpeedModToggle = Casual_ClimberPlugin.climbSpeedModToggle;
if (climbSpeedModToggle)
{
___climbSpeedMod = climbSpeedMod;
}
else
{
___climbSpeedMod = climbSpeedMod_Default;
}
}
}
[HarmonyPatch]
public class CurrentStaminaPatches
{
public static bool staminaModifier_Default;
public static bool staminaModifier;
public static bool staminaModifierToggle;
[HarmonyPatch(typeof(Character), "FixedUpdate")]
[HarmonyPostfix]
public static void Awake_Postfix(Character __instance)
{
staminaModifier = Casual_ClimberPlugin.staminaModifier;
staminaModifierToggle = Casual_ClimberPlugin.staminaModifierToggle;
float currentStamina = __instance.data.currentStamina;
if (staminaModifier && staminaModifierToggle)
{
__instance.data.currentStamina = currentStamina + 0.0005f;
if (currentStamina <= 0.001f)
{
__instance.data.currentStamina = 0f;
}
}
else
{
__instance.data.currentStamina = currentStamina + 0f;
}
}
}
[HarmonyPatch]
public class CursorPatches
{
[HarmonyPatch(typeof(GUIManager), "UpdateWindowStatus")]
[HarmonyPostfix]
private static void Postfix(GUIManager __instance)
{
if (GUI_UI.isConfigVisible)
{
__instance.windowShowingCursor = true;
__instance.windowBlockingInput = true;
}
}
}
[HarmonyPatch]
public class GUI_Patches : MonoBehaviour
{
public static bool uiActive = false;
public static bool displayUIFlag = Casual_ClimberPlugin.displayUIFlag;
public static bool displayUIConfigFlag = Casual_ClimberPlugin.displayUIConfigFlag;
[HarmonyPatch(typeof(GUIManager), "LateUpdate")]
[HarmonyPostfix]
private static void Postfix(GUIManager __instance)
{
displayUIFlag = Casual_ClimberPlugin.displayUIFlag;
displayUIConfigFlag = Casual_ClimberPlugin.displayUIConfigFlag;
if (displayUIFlag)
{
uiActive = !uiActive;
Debug.Log((object)("[Casual_Climber] Status " + (uiActive ? "Enabled" : "Disabled")));
GUI_UI.Instance?.DisplayValues(uiActive);
}
if (displayUIConfigFlag)
{
GUI_UI.Instance?.DisplayConfig();
}
}
}
public class GUI_UI : MonoBehaviour
{
public static GUI_UI? Instance;
public static bool ui_Active = GUI_Patches.uiActive;
public bool isValuesVisible;
public static bool isConfigVisible = false;
public float lastTimeChange = -10f;
public static string mod_ActiveStatus = "Disabled";
public static Color colorDisplayed;
public static string casualClimber_ActivatedString = Casual_ClimberPlugin.casualClimber_ActivatedString;
public static string casualClimber_DeactivatedString = Casual_ClimberPlugin.casualClimber_DeactivatedString;
public static string casualClimber_ActivationStatus = Casual_ClimberPlugin.casualClimber_ActivatedString;
public static string jumpString = Casual_ClimberPlugin.jumpString;
public static float jumpString_Value;
public static float jumpString_DefaultValue;
public static float jumpString_DisplayValue;
public static string moveSpeedString = Casual_ClimberPlugin.moveSpeedString;
public static float moveSpeedString_Value;
public static float moveSpeedString_DefaultValue;
public static float moveSpeedString_DisplayValue;
public static string climbSpeedString = Casual_ClimberPlugin.climbSpeedString;
public static float climbSpeedString_Value;
public static float climbSpeedString_DefaultValue;
public static float climbSpeedString_DisplayValue;
public static string staminaModifierString = Casual_ClimberPlugin.staminaModifierString;
public static bool staminaModifierString_Value;
public static bool staminaModifierString_DefaultValue;
public static bool staminaModifierString_DisplayValue;
public static string hungerModifierString = Casual_ClimberPlugin.hungerModifierString;
public static bool hungerModifierString_Value;
public static bool hungerModifierString_DefaultValue;
public static bool hungerModifierString_DisplayValue;
public static string poisonModifierString = Casual_ClimberPlugin.poisonModifierString;
public static bool poisonModifierString_Value;
public static bool poisonModifierString_DefaultValue;
public static bool poisonModifierString_DisplayValue;
public static string heatModifierString = Casual_ClimberPlugin.heatModifierString;
public static bool heatModifierString_Value;
public static bool heatModifierString_DefaultValue;
public static bool heatModifierString_DisplayValue;
public static string coldModifierString = Casual_ClimberPlugin.coldModifierString;
public static bool coldModifierString_Value;
public static bool coldModifierString_DefaultValue;
public static bool coldModifierString_DisplayValue;
public static string drowsyModifierString = Casual_ClimberPlugin.drowsyModifierString;
public static bool drowsyModifierString_Value;
public static bool drowsyModifierString_DefaultValue;
public static bool drowsyModifierString_DisplayValue;
public static string curseModifierString = Casual_ClimberPlugin.curseModifierString;
public static bool curseModifierString_Value;
public static bool curseModifierString_DefaultValue;
public static bool curseModifierString_DisplayValue;
public static string sporesModifierString = Casual_ClimberPlugin.sporesModifierString;
public static bool sporesModifierString_Value;
public static bool sporesModifierString_DefaultValue;
public static bool sporesModifierString_DisplayValue;
public static string thornsModifierString = Casual_ClimberPlugin.thornsModifierString;
public static bool thornsModifierString_Value;
public static bool thornsModifierString_DefaultValue;
public static bool thornsModifierString_DisplayValue;
public static string crabModifierString = Casual_ClimberPlugin.crabModifierString;
public static bool crabModifierString_Value;
public static bool crabModifierString_DefaultValue;
public static bool crabModifierString_DisplayValue;
public static string webModifierString = Casual_ClimberPlugin.webModifierString;
public static bool webModifierString_Value;
public static bool webModifierString_DefaultValue;
public static bool webModifierString_DisplayValue;
public static string weightModifierString = Casual_ClimberPlugin.weightModifierString;
public static bool weightModifierString_Value;
public static bool weightModifierString_DefaultValue;
public static bool weightModifierString_DisplayValue;
public static string injuryModifierString = Casual_ClimberPlugin.injuryModifierString;
public static bool injuryModifierString_Value;
public static bool injuryModifierString_DefaultValue;
public static bool injuryModifierString_DisplayValue;
public void DisplayValues(bool ui_Active)
{
if (ui_Active)
{
casualClimber_ActivationStatus = casualClimber_ActivatedString;
}
else
{
casualClimber_ActivationStatus = casualClimber_DeactivatedString;
}
mod_ActiveStatus = (ui_Active ? "Enabled" : "Disabled");
isValuesVisible = true;
lastTimeChange = Time.time;
}
public void DisplayConfig()
{
if (isConfigVisible)
{
isConfigVisible = false;
isValuesVisible = false;
lastTimeChange = Time.time;
}
else
{
isValuesVisible = true;
isConfigVisible = true;
lastTimeChange = Time.time;
}
}
public void OnGUI()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0302: Unknown result type (might be due to invalid IL or missing references)
//IL_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_0316: Unknown result type (might be due to invalid IL or missing references)
//IL_032a: Unknown result type (might be due to invalid IL or missing references)
//IL_032f: Unknown result type (might be due to invalid IL or missing references)
//IL_0337: Unknown result type (might be due to invalid IL or missing references)
//IL_033e: Unknown result type (might be due to invalid IL or missing references)
//IL_0345: Unknown result type (might be due to invalid IL or missing references)
//IL_034d: Expected O, but got Unknown
//IL_0357: Unknown result type (might be due to invalid IL or missing references)
//IL_035c: Unknown result type (might be due to invalid IL or missing references)
//IL_0364: Unknown result type (might be due to invalid IL or missing references)
//IL_036b: Unknown result type (might be due to invalid IL or missing references)
//IL_0373: Expected O, but got Unknown
//IL_037d: Unknown result type (might be due to invalid IL or missing references)
//IL_0382: Unknown result type (might be due to invalid IL or missing references)
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
//IL_0391: Unknown result type (might be due to invalid IL or missing references)
//IL_039a: Expected O, but got Unknown
//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
//IL_03d6: Unknown result type (might be due to invalid IL or missing references)
//IL_0404: Unknown result type (might be due to invalid IL or missing references)
//IL_040e: Unknown result type (might be due to invalid IL or missing references)
//IL_043b: Unknown result type (might be due to invalid IL or missing references)
//IL_0445: Unknown result type (might be due to invalid IL or missing references)
//IL_0757: Unknown result type (might be due to invalid IL or missing references)
//IL_0775: Unknown result type (might be due to invalid IL or missing references)
//IL_079d: Unknown result type (might be due to invalid IL or missing references)
//IL_07df: Unknown result type (might be due to invalid IL or missing references)
//IL_0c69: Unknown result type (might be due to invalid IL or missing references)
//IL_0c87: Unknown result type (might be due to invalid IL or missing references)
//IL_0caf: Unknown result type (might be due to invalid IL or missing references)
//IL_0cf1: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2a: Unknown result type (might be due to invalid IL or missing references)
//IL_0d63: Unknown result type (might be due to invalid IL or missing references)
//IL_0d9c: Unknown result type (might be due to invalid IL or missing references)
//IL_0dd5: Unknown result type (might be due to invalid IL or missing references)
//IL_0e0e: Unknown result type (might be due to invalid IL or missing references)
//IL_0e47: Unknown result type (might be due to invalid IL or missing references)
//IL_0e80: Unknown result type (might be due to invalid IL or missing references)
//IL_0eb9: Unknown result type (might be due to invalid IL or missing references)
//IL_0ef2: Unknown result type (might be due to invalid IL or missing references)
//IL_0f2b: Unknown result type (might be due to invalid IL or missing references)
//IL_0f64: Unknown result type (might be due to invalid IL or missing references)
//IL_0f9d: Unknown result type (might be due to invalid IL or missing references)
if (mod_ActiveStatus == "Enabled")
{
colorDisplayed = Color.green;
}
else
{
colorDisplayed = Color.yellow;
}
if (!isValuesVisible)
{
return;
}
bool flag = Time.time - lastTimeChange > 2f;
if (isConfigVisible)
{
flag = false;
}
if (flag)
{
isValuesVisible = false;
return;
}
if (flag)
{
isValuesVisible = false;
}
jumpString_Value = Casual_ClimberPlugin.jumpString_Value;
jumpString_DefaultValue = Casual_ClimberPlugin.jumpString_DefaultValue;
moveSpeedString_Value = Casual_ClimberPlugin.moveSpeedString_Value;
moveSpeedString_DefaultValue = Casual_ClimberPlugin.moveSpeedString_DefaultValue;
climbSpeedString_Value = Casual_ClimberPlugin.climbSpeedString_Value;
climbSpeedString_DefaultValue = Casual_ClimberPlugin.climbSpeedString_DefaultValue;
staminaModifierString_Value = Casual_ClimberPlugin.staminaModifierString_Value;
staminaModifierString_DefaultValue = Casual_ClimberPlugin.staminaModifierString_DefaultValue;
hungerModifierString_Value = Casual_ClimberPlugin.hungerModifierString_Value;
hungerModifierString_DefaultValue = Casual_ClimberPlugin.hungerModifierString_DefaultValue;
poisonModifierString_Value = Casual_ClimberPlugin.poisonModifierString_Value;
poisonModifierString_DefaultValue = Casual_ClimberPlugin.poisonModifierString_DefaultValue;
heatModifierString_Value = Casual_ClimberPlugin.heatModifierString_Value;
heatModifierString_DefaultValue = Casual_ClimberPlugin.heatModifierString_DefaultValue;
coldModifierString_Value = Casual_ClimberPlugin.coldModifierString_Value;
coldModifierString_DefaultValue = Casual_ClimberPlugin.coldModifierString_DefaultValue;
drowsyModifierString_Value = Casual_ClimberPlugin.drowsyModifierString_Value;
drowsyModifierString_DefaultValue = Casual_ClimberPlugin.drowsyModifierString_DefaultValue;
curseModifierString_Value = Casual_ClimberPlugin.curseModifierString_Value;
curseModifierString_DefaultValue = Casual_ClimberPlugin.curseModifierString_DefaultValue;
sporesModifierString_Value = Casual_ClimberPlugin.sporesModifierString_Value;
sporesModifierString_DefaultValue = Casual_ClimberPlugin.sporesModifierString_DefaultValue;
thornsModifierString_Value = Casual_ClimberPlugin.thornsModifierString_Value;
thornsModifierString_DefaultValue = Casual_ClimberPlugin.thornsModifierString_DefaultValue;
crabModifierString_Value = Casual_ClimberPlugin.crabModifierString_Value;
crabModifierString_DefaultValue = Casual_ClimberPlugin.crabModifierString_DefaultValue;
webModifierString_Value = Casual_ClimberPlugin.webModifierString_Value;
webModifierString_DefaultValue = Casual_ClimberPlugin.webModifierString_DefaultValue;
weightModifierString_Value = Casual_ClimberPlugin.weightModifierString_Value;
weightModifierString_DefaultValue = Casual_ClimberPlugin.weightModifierString_DefaultValue;
injuryModifierString_Value = Casual_ClimberPlugin.injuryModifierString_Value;
injuryModifierString_DefaultValue = Casual_ClimberPlugin.injuryModifierString_DefaultValue;
if (mod_ActiveStatus == "Enabled")
{
jumpString_DisplayValue = jumpString_Value;
moveSpeedString_DisplayValue = moveSpeedString_Value;
climbSpeedString_DisplayValue = climbSpeedString_Value;
staminaModifierString_DisplayValue = staminaModifierString_Value;
hungerModifierString_DisplayValue = hungerModifierString_Value;
poisonModifierString_DisplayValue = poisonModifierString_Value;
heatModifierString_DisplayValue = heatModifierString_Value;
coldModifierString_DisplayValue = coldModifierString_Value;
drowsyModifierString_DisplayValue = drowsyModifierString_Value;
curseModifierString_DisplayValue = curseModifierString_Value;
sporesModifierString_DisplayValue = sporesModifierString_Value;
thornsModifierString_DisplayValue = thornsModifierString_Value;
crabModifierString_DisplayValue = crabModifierString_Value;
webModifierString_DisplayValue = webModifierString_Value;
weightModifierString_DisplayValue = weightModifierString_Value;
injuryModifierString_DisplayValue = injuryModifierString_Value;
}
else
{
jumpString_DisplayValue = jumpString_DefaultValue;
moveSpeedString_DisplayValue = moveSpeedString_DefaultValue;
climbSpeedString_DisplayValue = climbSpeedString_DefaultValue;
staminaModifierString_DisplayValue = staminaModifierString_DefaultValue;
hungerModifierString_DisplayValue = hungerModifierString_DefaultValue;
poisonModifierString_DisplayValue = poisonModifierString_DefaultValue;
heatModifierString_DisplayValue = heatModifierString_DefaultValue;
coldModifierString_DisplayValue = coldModifierString_DefaultValue;
drowsyModifierString_DisplayValue = drowsyModifierString_DefaultValue;
curseModifierString_DisplayValue = curseModifierString_DefaultValue;
sporesModifierString_DisplayValue = sporesModifierString_DefaultValue;
thornsModifierString_DisplayValue = thornsModifierString_DefaultValue;
crabModifierString_DisplayValue = crabModifierString_DefaultValue;
webModifierString_DisplayValue = webModifierString_DefaultValue;
weightModifierString_DisplayValue = weightModifierString_DefaultValue;
injuryModifierString_DisplayValue = injuryModifierString_DefaultValue;
}
GUI.color = Color.white;
GUI.contentColor = Color.white;
GUI.backgroundColor = Color.black;
GUIStyle val = new GUIStyle(GUI.skin.label)
{
fontSize = 22,
alignment = (TextAnchor)0,
fontStyle = (FontStyle)1,
richText = true
};
GUIStyle val2 = new GUIStyle(GUI.skin.label)
{
fontSize = 18,
alignment = (TextAnchor)0,
richText = true
};
GUIStyle val3 = new GUIStyle(GUI.skin.label)
{
fontSize = 14,
alignment = (TextAnchor)0,
richText = true
};
GUILayout.BeginArea(new Rect(30f, 30f, 400f, 596f), GUI.skin.box);
GUILayout.BeginArea(new Rect(6f, 6f, 388f, 584f), GUI.skin.box);
GUILayout.Label("Casual Climber: " + mod_ActiveStatus, val, Array.Empty<GUILayoutOption>());
GUI.color = colorDisplayed;
GUI.contentColor = colorDisplayed;
GUILayout.Label(casualClimber_ActivationStatus ?? "", val, Array.Empty<GUILayoutOption>());
GUILayout.Space(26f);
GUI.color = Color.white;
GUI.contentColor = Color.white;
GUILayout.Label(string.Format($"{jumpString} {jumpString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{moveSpeedString} {moveSpeedString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{climbSpeedString} {climbSpeedString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{staminaModifierString} {staminaModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{hungerModifierString} {hungerModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{poisonModifierString} {poisonModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{heatModifierString} {heatModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{coldModifierString} {coldModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{drowsyModifierString} {drowsyModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{curseModifierString} {curseModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{sporesModifierString} {sporesModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{thornsModifierString} {thornsModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{crabModifierString} {crabModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{webModifierString} {webModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{weightModifierString} {weightModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.Label(string.Format($"{injuryModifierString} {injuryModifierString_DisplayValue}"), val2, Array.Empty<GUILayoutOption>());
GUILayout.EndArea();
GUILayout.EndArea();
if (isConfigVisible)
{
GUI.backgroundColor = new Color(20f, 20f, 20f, 1f);
GUILayout.BeginArea(new Rect(444f, 30f, 400f, 596f), GUI.skin.box);
GUILayout.BeginArea(new Rect(6f, 6f, 388f, 584f), GUI.skin.button);
GUILayout.Label($"Casual Climber Configuration", val, Array.Empty<GUILayoutOption>());
bool flag2 = GUI.Button(new Rect(358f, 8f, 24f, 24f), "X");
if (flag2)
{
isConfigVisible = false;
isValuesVisible = false;
Debug.Log((object)("[Casual_Climber] Status " + $"Menus closed. {flag2}"));
}
GUILayout.Space(10f);
GUILayout.Label(string.Format($"Jump Height {Casual_ClimberPlugin.jumpGravity}"), val3, Array.Empty<GUILayoutOption>());
Casual_ClimberPlugin.JumpHeight.Value = GUILayout.HorizontalSlider(Casual_ClimberPlugin.JumpHeight.Value, 15f, 60f, Array.Empty<GUILayoutOption>());
GUILayout.Space(6f);
GUILayout.Label(string.Format($"Movement Speed {Casual_ClimberPlugin.movementForce}"), val3, Array.Empty<GUILayoutOption>());
Casual_ClimberPlugin.MovementSpeed.Value = GUILayout.HorizontalSlider(Casual_ClimberPlugin.MovementSpeed.Value, 25f, 50f, Array.Empty<GUILayoutOption>());
GUILayout.Space(6f);
GUILayout.Label(string.Format($"Climb Speed {Casual_ClimberPlugin.climbSpeedMod}"), val3, Array.Empty<GUILayoutOption>());
Casual_ClimberPlugin.ClimbSpeedMod.Value = GUILayout.HorizontalSlider(Casual_ClimberPlugin.ClimbSpeedMod.Value, 1f, 2f, Array.Empty<GUILayoutOption>());
GUILayout.Space(9f);
Casual_ClimberPlugin.StaminaModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.staminaModifier, $" Enable Stamina Modifier {Casual_ClimberPlugin.StaminaModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.HungerModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.hungerModifier, $" Hunger Disabled {Casual_ClimberPlugin.HungerModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.PoisonModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.poisonModifier, $" Poison Disabled {Casual_ClimberPlugin.PoisonModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.HeatModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.heatModifier, $" Hot Disabled {Casual_ClimberPlugin.HeatModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.ColdModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.coldModifier, $" Cold Disabled {Casual_ClimberPlugin.ColdModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.DrowsyModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.drowsyModifier, $" Drowsy Disabled {Casual_ClimberPlugin.DrowsyModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.CurseModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.curseModifier, $" Curse Disabled {Casual_ClimberPlugin.CurseModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.SporesModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.sporesModifier, $" Spores Disabled {Casual_ClimberPlugin.SporesModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.ThornsModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.thornsModifier, $" Thorns Disabled {Casual_ClimberPlugin.ThornsModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(7f);
Casual_ClimberPlugin.CrabModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.crabModifier, $" Crab Disabled {Casual_ClimberPlugin.CrabModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.WebModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.webModifier, $" Web Disabled {Casual_ClimberPlugin.WebModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.WeightModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.weightModifier, $" Weight Disabled {Casual_ClimberPlugin.WeightModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(8f);
Casual_ClimberPlugin.InjuryModifier.Value = GUILayout.Toggle(Casual_ClimberPlugin.injuryModifier, $" Injury Disabled {Casual_ClimberPlugin.InjuryModifier.Value}", Array.Empty<GUILayoutOption>());
GUILayout.Space(7f);
GUILayout.EndArea();
GUILayout.EndArea();
GUI.backgroundColor = new Color(20f, 20f, 20f, 1f);
GUILayout.BeginArea(new Rect(444f, 630f, 400f, 186f), GUI.skin.box);
GUILayout.BeginArea(new Rect(6f, 6f, 388f, 174f), GUI.skin.button);
GUILayout.Label($"Apply Status Types", val2, Array.Empty<GUILayoutOption>());
if (GUI.Button(new Rect(8f, 40f, 90f, 24f), "Hunger"))
{
CharacterAfflictionsPatches.keyFlag0 = true;
Debug.Log((object)"[Casual_Climber] Hunger Button pressed");
}
if (GUI.Button(new Rect(102f, 40f, 90f, 24f), "Poison"))
{
CharacterAfflictionsPatches.keyFlag1 = true;
Debug.Log((object)"[Casual_Climber] Poison Button pressed");
}
if (GUI.Button(new Rect(196f, 40f, 90f, 24f), "Hot"))
{
CharacterAfflictionsPatches.keyFlag2 = true;
Debug.Log((object)"[Casual_Climber] Hot Button pressed");
}
if (GUI.Button(new Rect(290f, 40f, 90f, 24f), "Cold"))
{
CharacterAfflictionsPatches.keyFlag3 = true;
Debug.Log((object)"[Casual_Climber] Cold Button pressed");
}
if (GUI.Button(new Rect(8f, 70f, 90f, 24f), "Drowsy"))
{
CharacterAfflictionsPatches.keyFlag4 = true;
Debug.Log((object)"[Casual_Climber] Drowsy Button pressed");
}
if (GUI.Button(new Rect(102f, 70f, 90f, 24f), "Curse"))
{
CharacterAfflictionsPatches.keyFlag5 = true;
Debug.Log((object)"[Casual_Climber] Curse Button pressed");
}
if (GUI.Button(new Rect(196f, 70f, 90f, 24f), "Spores"))
{
CharacterAfflictionsPatches.keyFlag6 = true;
Debug.Log((object)"[Casual_Climber] Spores Button pressed");
}
if (GUI.Button(new Rect(290f, 70f, 90f, 24f), "Thorns"))
{
CharacterAfflictionsPatches.keyFlag7 = true;
Debug.Log((object)"[Casual_Climber] Thorns Button pressed");
}
if (GUI.Button(new Rect(8f, 100f, 90f, 24f), "Crab"))
{
CharacterAfflictionsPatches.keyFlag8 = true;
Debug.Log((object)"[Casual_Climber] Crab Button pressed");
}
if (GUI.Button(new Rect(102f, 100f, 90f, 24f), "Web"))
{
CharacterAfflictionsPatches.keyFlag9 = true;
Debug.Log((object)"[Casual_Climber] Web Button pressed");
}
if (GUI.Button(new Rect(196f, 100f, 90f, 24f), "Weight"))
{
CharacterAfflictionsPatches.keyFlag10 = true;
Debug.Log((object)"[Casual_Climber] Weight Button pressed");
}
if (GUI.Button(new Rect(290f, 100f, 90f, 24f), "Injury"))
{
CharacterAfflictionsPatches.keyFlag11 = true;
Debug.Log((object)"[Casual_Climber] Injury Button pressed");
}
if (GUI.Button(new Rect(8f, 136f, 372f, 24f), "Remove All Status Types"))
{
CharacterAfflictionsPatches.keyFlag12 = true;
Debug.Log((object)"[Casual_Climber] Remove All Status Types Button pressed");
}
GUILayout.EndArea();
GUILayout.EndArea();
}
}
}
[HarmonyPatch]
public class JumpGravityPatches
{
public static float jumpGravity_Default = 15f;
public static float jumpGravity;
public static bool jumpGravityToggle;
[HarmonyPatch(typeof(CharacterMovement), "TryToJump")]
[HarmonyPostfix]
public static void Awake_Postfix(ref float ___jumpGravity)
{
jumpGravity = Casual_ClimberPlugin.jumpGravity;
jumpGravityToggle = Casual_ClimberPlugin.jumpGravityToggle;
if (jumpGravityToggle)
{
___jumpGravity = jumpGravity;
}
else
{
___jumpGravity = jumpGravity_Default;
}
}
}
[HarmonyPatch]
public class MovementForcePatches
{
public static float movementForce_Default = 25f;
public static float movementForce;
public static bool movementForceToggle;
[HarmonyPatch(typeof(CharacterMovement), "FixedUpdate")]
[HarmonyPostfix]
public static void Awake_Postfix(ref float ___movementForce)
{
movementForce = Casual_ClimberPlugin.movementForce;
movementForceToggle = Casual_ClimberPlugin.movementForceToggle;
if (movementForceToggle)
{
___movementForce = movementForce;
}
else
{
___movementForce = movementForce_Default;
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}