Decompiled source of Shawesomes Infinite Multiverse v2.2.6

Shawesomes_Infinite_Multiverse.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
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("Shawesomes_Infinte_Multiverse")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Shawesomes_Infinte_Multiverse")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e0e26f8d-a8f0-41a7-a502-951624fa6f31")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Shawesomes_Infinite_Multiverse;

public class Ascend : MonoBehaviour
{
	private static Ascend instance;

	public static readonly List<string> FLIGHT_ITEM_PREFABS = new List<string> { "CapeFeather", "TurtleHermitQloud", "sflightkipower" };

	public static readonly float ASCEND_SPEED = 10f;

	public static readonly float HORIZONTAL_SPEED = 20f;

	public static readonly float RUN_ASCEND_SPEED = 25f;

	public static readonly float RUN_HORIZONTAL_SPEED = 25f;

	public static readonly float HOVER_ASCEND_SPEED = 0f;

	public static readonly float HOVER_HORIZONTAL_SPEED = 0f;

	public static readonly float DESCENT_SPEED = 40f;

	public static readonly float STAMINA_USAGE = 5f;

	public static readonly bool REQUIRE_EQUIPPED = true;

	public static readonly bool SIMULATE_GROUND = false;

	public static Ascend Instance
	{
		get
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			if ((Object)(object)instance == (Object)null)
			{
				GameObject val = new GameObject("Ascend");
				instance = val.AddComponent<Ascend>();
				Object.DontDestroyOnLoad((Object)(object)val);
			}
			return instance;
		}
	}

	private void Awake()
	{
		if ((Object)(object)instance != (Object)null && (Object)(object)instance != (Object)(object)this)
		{
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
		else
		{
			instance = this;
		}
	}

	public static void InitConfig(ConfigFile config)
	{
		if ((Object)(object)instance != (Object)null)
		{
			instance.ApplyConfig();
		}
	}

	public void ApplyConfig()
	{
	}
}
[HarmonyPatch(typeof(Character), "UpdateMotion")]
public static class SimpleAscend_Character_UpdateMotion_Patch
{
	[HarmonyPostfix]
	public static void Postfix(Character __instance, float dt)
	{
		//IL_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c4: 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_01cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_01db: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0204: Unknown result type (might be due to invalid IL or missing references)
		//IL_0209: Unknown result type (might be due to invalid IL or missing references)
		//IL_021e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0223: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_02be: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance != (Object)(object)Player.m_localPlayer)
		{
			return;
		}
		Player val = (Player)(object)((__instance is Player) ? __instance : null);
		if ((Object)(object)val == (Object)null || !HasRequiredItem(val) || val.GetStamina() <= 0f)
		{
			return;
		}
		Rigidbody component = ((Component)__instance).GetComponent<Rigidbody>();
		if ((Object)(object)component == (Object)null)
		{
			return;
		}
		bool key = Input.GetKey((KeyCode)304);
		bool key2 = Input.GetKey((KeyCode)32);
		bool key3 = Input.GetKey((KeyCode)308);
		bool key4 = Input.GetKey((KeyCode)306);
		bool flag = false;
		float num = 0f;
		float num2 = 0f;
		if (Input.GetKey((KeyCode)97) || Input.GetKey((KeyCode)276))
		{
			num -= 1f;
		}
		if (Input.GetKey((KeyCode)100) || Input.GetKey((KeyCode)275))
		{
			num += 1f;
		}
		if (Input.GetKey((KeyCode)119) || Input.GetKey((KeyCode)273))
		{
			num2 += 1f;
		}
		if (Input.GetKey((KeyCode)115) || Input.GetKey((KeyCode)274))
		{
			num2 -= 1f;
		}
		Vector3 val2 = default(Vector3);
		((Vector3)(ref val2))..ctor(num, 0f, num2);
		bool flag2 = ((Vector3)(ref val2)).magnitude > 0.1f;
		if (flag2)
		{
			((Vector3)(ref val2)).Normalize();
		}
		Camera component2 = ((Component)((Component)GameCamera.instance).transform).GetComponent<Camera>();
		Vector3 forward = ((Component)component2).transform.forward;
		Vector3 right = ((Component)component2).transform.right;
		Vector3 val3 = new Vector3(forward.x, 0f, forward.z);
		Vector3 normalized = ((Vector3)(ref val3)).normalized;
		val3 = new Vector3(right.x, 0f, right.z);
		Vector3 normalized2 = ((Vector3)(ref val3)).normalized;
		Vector3 val4 = normalized * num2 + normalized2 * num;
		if (flag2)
		{
			((Vector3)(ref val4)).Normalize();
		}
		Vector3 velocity = component.velocity;
		float y = Ascend.ASCEND_SPEED;
		float num3 = Ascend.HORIZONTAL_SPEED;
		if (key4)
		{
			y = 0f - Ascend.DESCENT_SPEED;
			flag = true;
		}
		else if (key3)
		{
			y = Ascend.HOVER_ASCEND_SPEED;
			num3 = Ascend.HOVER_HORIZONTAL_SPEED;
			flag = true;
		}
		else if (key)
		{
			y = Ascend.RUN_ASCEND_SPEED;
			num3 = Ascend.RUN_HORIZONTAL_SPEED;
			flag = true;
		}
		else
		{
			if (!key2)
			{
				return;
			}
			flag = true;
		}
		if (key2 || key3 || key4)
		{
			velocity.y = y;
		}
		if (flag2)
		{
			Vector3 val5 = val4 * num3;
			velocity.x = val5.x;
			velocity.z = val5.z;
		}
		if (flag)
		{
			((Character)val).UseStamina(Ascend.STAMINA_USAGE * dt);
			component.velocity = velocity;
		}
	}

	private static bool HasRequiredItem(Player player)
	{
		if ((Object)(object)player == (Object)null || ((Humanoid)player).GetInventory() == null)
		{
			return false;
		}
		if (Ascend.REQUIRE_EQUIPPED)
		{
			foreach (ItemData equippedItem in ((Humanoid)player).GetInventory().GetEquippedItems())
			{
				if (!((Object)(object)equippedItem.m_dropPrefab != (Object)null))
				{
					continue;
				}
				foreach (string fLIGHT_ITEM_PREFAB in Ascend.FLIGHT_ITEM_PREFABS)
				{
					if (((Object)equippedItem.m_dropPrefab).name.Equals(fLIGHT_ITEM_PREFAB, StringComparison.OrdinalIgnoreCase))
					{
						return true;
					}
				}
			}
		}
		else
		{
			foreach (ItemData allItem in ((Humanoid)player).GetInventory().GetAllItems())
			{
				if (!((Object)(object)allItem.m_dropPrefab != (Object)null))
				{
					continue;
				}
				foreach (string fLIGHT_ITEM_PREFAB2 in Ascend.FLIGHT_ITEM_PREFABS)
				{
					if (((Object)allItem.m_dropPrefab).name.Equals(fLIGHT_ITEM_PREFAB2, StringComparison.OrdinalIgnoreCase))
					{
						return true;
					}
				}
			}
		}
		return false;
	}
}
[HarmonyPatch(typeof(Character), "IsOnGround")]
public static class SimpleAscend_Character_IsOnGround_Patch
{
	[HarmonyPostfix]
	public static void Postfix(Character __instance, ref bool __result)
	{
		if (!((Object)(object)__instance != (Object)(object)Player.m_localPlayer) && ZInput.GetButton("Jump") && Ascend.SIMULATE_GROUND)
		{
			__result = true;
		}
	}
}
[HarmonyPatch(typeof(Player), "Update")]
public static class Player_Update_Patch
{
	static Player_Update_Patch()
	{
	}

	[HarmonyPostfix]
	public static void Postfix(Player __instance)
	{
		if ((Object)(object)__instance != (Object)(object)Player.m_localPlayer)
		{
			return;
		}
		try
		{
			ControllerSwapperSystem.HandleControllerSwap(__instance);
		}
		catch
		{
		}
	}
}
[HarmonyPatch(typeof(Animator), "set_runtimeAnimatorController")]
public static class Animator_runtimeAnimatorController_Patch
{
	static Animator_runtimeAnimatorController_Patch()
	{
	}

	[HarmonyPrefix]
	public static bool Prefix(Animator __instance, RuntimeAnimatorController value)
	{
		try
		{
			if (ControllerSwapperSystem.IsUsingCustomController() && (Object)(object)__instance == (Object)(object)((Character)(Player.m_localPlayer?)).m_animator)
			{
				if ((Object)(object)value == (Object)(object)ControllerSwapperSystem.GetOriginalController() || (Object)(object)value == (Object)(object)ControllerSwapperSystem.GetCustomController())
				{
					return true;
				}
				return false;
			}
		}
		catch
		{
		}
		return true;
	}
}
public class ItemSetComparer : IEqualityComparer<List<string>>
{
	public bool Equals(List<string> x, List<string> y)
	{
		if (x == null && y == null)
		{
			return true;
		}
		if (x == null || y == null)
		{
			return false;
		}
		if (x.Count != y.Count)
		{
			return false;
		}
		return new HashSet<string>(x).SetEquals(new HashSet<string>(y));
	}

	public int GetHashCode(List<string> obj)
	{
		if (obj == null)
		{
			return 0;
		}
		int num = 0;
		foreach (string item in obj)
		{
			num ^= item.GetHashCode();
		}
		return num;
	}
}
public static class ControllerSwapperSystem
{
	private static ManualLogSource logger;

	private const bool ENABLE_CONTROLLER_SWAPPER = true;

	private const string ITEM_CONTROLLER_MAPPINGS = "TurtleHermitQloud:nimbus_animator,sflightkipower:ascend_animator";

	private const bool CHECK_RIGHT_HAND = true;

	private const bool CHECK_LEFT_HAND = true;

	private const bool CHECK_UTILITY = true;

	private const bool CHECK_HELMET = true;

	private const bool CHECK_CHEST = true;

	private const bool CHECK_LEGS = true;

	private const bool CHECK_SHOULDER = true;

	private static RuntimeAnimatorController originalController;

	private static Dictionary<string, RuntimeAnimatorController> controllerCache = new Dictionary<string, RuntimeAnimatorController>();

	private static string currentControllerName = null;

	private static bool isUsingCustomController = false;

	private const string ASCEND_PARAM = "IsAscending";

	private const string HOVER_PARAM = "IsHovering";

	private const string DESCEND_PARAM = "IsDescending";

	private const string RUN_PARAM = "IsRunning";

	private static bool wasAscending = false;

	private static bool wasHovering = false;

	private static bool wasDescending = false;

	private static bool wasRunning = false;

	private static readonly string ASCEND_SFX = "sfx_flyascend";

	private static readonly string HOVER_SFX = "";

	private static readonly string DESCEND_SFX = "sfx_flydescend";

	private static readonly string RUN_SFX = "sfx_flyfast";

	private static readonly string ASCEND_VFX = "";

	private static readonly string HOVER_VFX = "";

	private static readonly string DESCEND_VFX = "";

	private static readonly string RUN_VFX = "vfx_flyfast";

	private static GameObject activeAscendSfx = null;

	private static GameObject activeHoverSfx = null;

	private static GameObject activeDescendSfx = null;

	private static GameObject activeRunSfx = null;

	private static GameObject activeAscendVfx = null;

	private static GameObject activeHoverVfx = null;

	private static GameObject activeDescendVfx = null;

	private static GameObject activeRunVfx = null;

	private static readonly bool ASCEND_CONTINUOUS_SFX = false;

	private static readonly bool HOVER_CONTINUOUS_SFX = false;

	private static readonly bool DESCEND_CONTINUOUS_SFX = false;

	private static readonly bool RUN_CONTINUOUS_SFX = false;

	private static readonly bool ASCEND_CONTINUOUS_VFX = false;

	private static readonly bool HOVER_CONTINUOUS_VFX = false;

	private static readonly bool DESCEND_CONTINUOUS_VFX = false;

	private static readonly bool RUN_CONTINUOUS_VFX = false;

	private static string currentSingleItemTrigger = null;

	private static List<string> currentSetTrigger = null;

	private static Dictionary<List<string>, string> itemSetControllerMap = new Dictionary<List<string>, string>(new ItemSetComparer());

	private static Dictionary<string, string> itemControllerMap = new Dictionary<string, string>();

	private static float lastItemCheckTime = 0f;

	private static float itemCheckInterval = 0.2f;

	private static bool wasItemEquippedLastCheck = false;

	private static void ParseItemControllerMappings()
	{
		itemControllerMap.Clear();
		itemSetControllerMap.Clear();
		string text = "TurtleHermitQloud:nimbus_animator,sflightkipower:ascend_animator";
		if (!string.IsNullOrEmpty(text))
		{
			string[] array = text.Split(new char[1] { ',' });
			string[] array2 = array;
			foreach (string text2 in array2)
			{
				if (string.IsNullOrEmpty(text2))
				{
					continue;
				}
				string[] array3 = text2.Split(new char[1] { ':' });
				if (array3.Length < 2)
				{
					continue;
				}
				string value = array3[^1].Trim();
				if (array3.Length == 2)
				{
					string key = array3[0].Trim().ToLower();
					itemControllerMap[key] = value;
					continue;
				}
				List<string> list = new List<string>();
				for (int j = 0; j < array3.Length - 1; j++)
				{
					string text3 = array3[j].Trim().ToLower();
					if (!string.IsNullOrEmpty(text3))
					{
						list.Add(text3);
					}
				}
				if (list.Count > 0)
				{
					itemSetControllerMap[list] = value;
				}
			}
		}
		int num = itemControllerMap.Count + itemSetControllerMap.Count;
	}

	public static bool IsUsingCustomController()
	{
		return isUsingCustomController;
	}

	public static RuntimeAnimatorController GetCustomController()
	{
		if (!string.IsNullOrEmpty(currentControllerName) && controllerCache.ContainsKey(currentControllerName))
		{
			return controllerCache[currentControllerName];
		}
		return null;
	}

	public static RuntimeAnimatorController GetOriginalController()
	{
		return originalController;
	}

	public static void Initialize()
	{
		logger = Shawesomes_Infinite_Multiverse.logger;
		lastItemCheckTime = 0f;
		wasItemEquippedLastCheck = false;
		ParseItemControllerMappings();
		try
		{
			AssetBundle val = AssetUtils.LoadAssetBundleFromResources("animators", Assembly.GetExecutingAssembly());
			if (!((Object)(object)val != (Object)null))
			{
				return;
			}
			HashSet<string> hashSet = new HashSet<string>();
			foreach (string value in itemControllerMap.Values)
			{
				hashSet.Add(value);
			}
			foreach (string value2 in itemSetControllerMap.Values)
			{
				hashSet.Add(value2);
			}
			foreach (string item in hashSet)
			{
				try
				{
					RuntimeAnimatorController val2 = null;
					val2 = val.LoadAsset<RuntimeAnimatorController>(item);
					if ((Object)(object)val2 == (Object)null && !item.EndsWith(".controller"))
					{
						val2 = val.LoadAsset<RuntimeAnimatorController>(item + ".controller");
					}
					if ((Object)(object)val2 == (Object)null && !item.StartsWith("Assets/"))
					{
						val2 = val.LoadAsset<RuntimeAnimatorController>("Assets/" + item);
					}
					if ((Object)(object)val2 == (Object)null && !item.StartsWith("Assets/") && !item.EndsWith(".controller"))
					{
						val2 = val.LoadAsset<RuntimeAnimatorController>("Assets/" + item + ".controller");
					}
					if ((Object)(object)val2 != (Object)null)
					{
						controllerCache[item] = val2;
					}
				}
				catch (Exception)
				{
				}
			}
		}
		catch (Exception)
		{
		}
	}

	private static bool HasRequiredItemEquipped(Player player, out string controllerName)
	{
		controllerName = null;
		if ((Object)(object)player == (Object)null)
		{
			return false;
		}
		lastItemCheckTime = Time.time;
		if (currentSetTrigger != null && isUsingCustomController)
		{
			if (HasAllRequiredItems(player, currentSetTrigger))
			{
				controllerName = currentControllerName;
				wasItemEquippedLastCheck = true;
				return true;
			}
			wasItemEquippedLastCheck = false;
			return false;
		}
		if (currentSingleItemTrigger != null && isUsingCustomController)
		{
			if (IsItemEquipped(player, currentSingleItemTrigger))
			{
				controllerName = currentControllerName;
				wasItemEquippedLastCheck = true;
				return true;
			}
			wasItemEquippedLastCheck = false;
			return false;
		}
		foreach (List<string> key in itemSetControllerMap.Keys)
		{
			if (HasAllRequiredItems(player, key))
			{
				controllerName = itemSetControllerMap[key];
				currentSetTrigger = new List<string>(key);
				currentSingleItemTrigger = null;
				wasItemEquippedLastCheck = true;
				return true;
			}
		}
		bool flag = true;
		ItemData rightItem = ((Humanoid)player).GetRightItem();
		if (rightItem != null && MatchesItem(rightItem, out controllerName, out var itemName))
		{
			currentSingleItemTrigger = itemName;
			currentSetTrigger = null;
			wasItemEquippedLastCheck = true;
			return true;
		}
		bool flag2 = true;
		ItemData leftItem = ((Humanoid)player).GetLeftItem();
		if (leftItem != null && MatchesItem(leftItem, out controllerName, out var itemName2))
		{
			currentSingleItemTrigger = itemName2;
			currentSetTrigger = null;
			wasItemEquippedLastCheck = true;
			return true;
		}
		if (((Humanoid)player).m_utilityItem != null && MatchesItem(((Humanoid)player).m_utilityItem, out controllerName, out var itemName3))
		{
			currentSingleItemTrigger = itemName3;
			currentSetTrigger = null;
			wasItemEquippedLastCheck = true;
			return true;
		}
		if (((Humanoid)player).m_helmetItem != null && MatchesItem(((Humanoid)player).m_helmetItem, out controllerName, out var itemName4))
		{
			currentSingleItemTrigger = itemName4;
			currentSetTrigger = null;
			wasItemEquippedLastCheck = true;
			return true;
		}
		if (((Humanoid)player).m_chestItem != null && MatchesItem(((Humanoid)player).m_chestItem, out controllerName, out var itemName5))
		{
			currentSingleItemTrigger = itemName5;
			currentSetTrigger = null;
			wasItemEquippedLastCheck = true;
			return true;
		}
		if (((Humanoid)player).m_legItem != null && MatchesItem(((Humanoid)player).m_legItem, out controllerName, out var itemName6))
		{
			currentSingleItemTrigger = itemName6;
			currentSetTrigger = null;
			wasItemEquippedLastCheck = true;
			return true;
		}
		if (((Humanoid)player).m_shoulderItem != null && MatchesItem(((Humanoid)player).m_shoulderItem, out controllerName, out var itemName7))
		{
			currentSingleItemTrigger = itemName7;
			currentSetTrigger = null;
			wasItemEquippedLastCheck = true;
			return true;
		}
		currentSingleItemTrigger = null;
		currentSetTrigger = null;
		wasItemEquippedLastCheck = false;
		return false;
	}

	private static bool HasAllRequiredItems(Player player, List<string> requiredItems)
	{
		foreach (string requiredItem in requiredItems)
		{
			if (!IsItemEquipped(player, requiredItem))
			{
				return false;
			}
		}
		return true;
	}

	private static bool IsItemEquipped(Player player, string requiredItemName)
	{
		bool flag = true;
		ItemData rightItem = ((Humanoid)player).GetRightItem();
		if (rightItem != null && ItemMatchesName(rightItem, requiredItemName))
		{
			return true;
		}
		bool flag2 = true;
		ItemData leftItem = ((Humanoid)player).GetLeftItem();
		if (leftItem != null && ItemMatchesName(leftItem, requiredItemName))
		{
			return true;
		}
		if (((Humanoid)player).m_utilityItem != null && ItemMatchesName(((Humanoid)player).m_utilityItem, requiredItemName))
		{
			return true;
		}
		if (((Humanoid)player).m_helmetItem != null && ItemMatchesName(((Humanoid)player).m_helmetItem, requiredItemName))
		{
			return true;
		}
		if (((Humanoid)player).m_chestItem != null && ItemMatchesName(((Humanoid)player).m_chestItem, requiredItemName))
		{
			return true;
		}
		if (((Humanoid)player).m_legItem != null && ItemMatchesName(((Humanoid)player).m_legItem, requiredItemName))
		{
			return true;
		}
		if (((Humanoid)player).m_shoulderItem != null && ItemMatchesName(((Humanoid)player).m_shoulderItem, requiredItemName))
		{
			return true;
		}
		return false;
	}

	private static bool MatchesItem(ItemData item, out string controllerName)
	{
		string itemName;
		return MatchesItem(item, out controllerName, out itemName);
	}

	private static bool MatchesItem(ItemData item, out string controllerName, out string itemName)
	{
		controllerName = null;
		itemName = null;
		if (item == null)
		{
			return false;
		}
		string text = (Object.op_Implicit((Object)(object)item.m_dropPrefab) ? ((Object)item.m_dropPrefab).name.ToLower() : "");
		if (!string.IsNullOrEmpty(text) && itemControllerMap.ContainsKey(text))
		{
			controllerName = itemControllerMap[text];
			itemName = text;
			return true;
		}
		if (item.m_shared != null && !string.IsNullOrEmpty(item.m_shared.m_name))
		{
			string text2 = item.m_shared.m_name.ToLower();
			if (itemControllerMap.ContainsKey(text2))
			{
				controllerName = itemControllerMap[text2];
				itemName = text2;
				return true;
			}
		}
		return false;
	}

	private static bool ItemMatchesName(ItemData item, string requiredItemName)
	{
		if (item == null || string.IsNullOrEmpty(requiredItemName))
		{
			return false;
		}
		string text = (Object.op_Implicit((Object)(object)item.m_dropPrefab) ? ((Object)item.m_dropPrefab).name.ToLower() : "");
		if (!string.IsNullOrEmpty(text) && text == requiredItemName)
		{
			return true;
		}
		if (item.m_shared != null && !string.IsNullOrEmpty(item.m_shared.m_name))
		{
			string text2 = item.m_shared.m_name.ToLower();
			if (text2 == requiredItemName)
			{
				return true;
			}
		}
		return false;
	}

	public static void ApplyCustomController(Player player, string controllerName)
	{
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_0154: Unknown result type (might be due to invalid IL or missing references)
		if (string.IsNullOrEmpty(controllerName) || (Object)(object)player == (Object)null)
		{
			return;
		}
		string text = "unknown";
		if (currentSingleItemTrigger != null)
		{
			text = "single item '" + currentSingleItemTrigger + "'";
		}
		else if (currentSetTrigger != null)
		{
			text = $"item set with {currentSetTrigger.Count} items";
		}
		RuntimeAnimatorController value = null;
		if (!controllerCache.TryGetValue(controllerName, out value) || (Object)(object)value == (Object)null)
		{
			return;
		}
		try
		{
			if ((Object)(object)originalController == (Object)null && (Object)(object)((Character)player).m_animator != (Object)null)
			{
				originalController = ((Character)player).m_animator.runtimeAnimatorController;
			}
			Vector3 velocity = ((Character)player).GetVelocity();
			SetMovementAnimationParameters(((Character)player).m_animator);
			currentControllerName = controllerName;
			((Character)player).m_animator.runtimeAnimatorController = value;
			SetMovementAnimationParameters(((Character)player).m_animator);
			((Character)player).m_animator.Update(0f);
			((Character)player).m_animator.Update(0.1f);
			((Character)player).m_animator.Update(0.1f);
			if ((Object)(object)((Character)player).m_body != (Object)null)
			{
				((Character)player).m_body.velocity = velocity;
			}
			isUsingCustomController = true;
		}
		catch (Exception)
		{
		}
	}

	private static void RestoreOriginalController(Player player)
	{
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		if (!isUsingCustomController || (Object)(object)originalController == (Object)null)
		{
			return;
		}
		try
		{
			CleanupAllVfx();
			wasAscending = false;
			wasHovering = false;
			wasDescending = false;
			wasRunning = false;
			if ((Object)(object)((Character)player).m_animator != (Object)null)
			{
				Vector3 velocity = ((Character)player).GetVelocity();
				SetMovementAnimationParameters(((Character)player).m_animator);
				((Character)player).m_animator.runtimeAnimatorController = originalController;
				SetMovementAnimationParameters(((Character)player).m_animator);
				((Character)player).m_animator.Update(0f);
				((Character)player).m_animator.Update(0.1f);
				((Character)player).m_animator.Update(0.1f);
				if ((Object)(object)((Character)player).m_body != (Object)null)
				{
					((Character)player).m_body.velocity = velocity;
				}
				isUsingCustomController = false;
				currentControllerName = null;
				currentSingleItemTrigger = null;
				currentSetTrigger = null;
			}
		}
		catch (Exception)
		{
		}
	}

	private static void SetMovementAnimationParameters(Animator animator)
	{
		if (!((Object)(object)animator == (Object)null))
		{
			animator.SetBool("wakeup", false);
			animator.SetBool("sleeping", false);
			animator.SetFloat("forward_speed", 1f);
		}
	}

	public static void UpdateFlightAnimationTriggers(Player player)
	{
		if ((Object)(object)player == (Object)null || (Object)(object)((Character)player).m_animator == (Object)null || !isUsingCustomController)
		{
			return;
		}
		bool key = Input.GetKey((KeyCode)32);
		bool key2 = Input.GetKey((KeyCode)308);
		bool key3 = Input.GetKey((KeyCode)306);
		bool key4 = Input.GetKey((KeyCode)304);
		((Character)player).m_animator.SetBool("IsAscending", key);
		((Character)player).m_animator.SetBool("IsHovering", key2);
		((Character)player).m_animator.SetBool("IsDescending", key3);
		((Character)player).m_animator.SetBool("IsRunning", key4);
		if (key != wasAscending)
		{
			if (key)
			{
				if (!string.IsNullOrEmpty(ASCEND_SFX))
				{
					if (ASCEND_CONTINUOUS_SFX)
					{
						activeAscendSfx = PlayContinuousSoundEffect(player, ASCEND_SFX, activeAscendSfx);
					}
					else
					{
						PlaySoundEffect(player, ASCEND_SFX);
					}
				}
				if (!string.IsNullOrEmpty(ASCEND_VFX))
				{
					if (ASCEND_CONTINUOUS_VFX)
					{
						activeAscendVfx = SpawnVisualEffect(player, ASCEND_VFX, activeAscendVfx);
					}
					else
					{
						SpawnVisualEffect(player, ASCEND_VFX, null);
					}
				}
			}
			else
			{
				if ((Object)(object)activeAscendVfx != (Object)null)
				{
					Object.Destroy((Object)(object)activeAscendVfx);
					activeAscendVfx = null;
				}
				if ((Object)(object)activeAscendSfx != (Object)null)
				{
					Object.Destroy((Object)(object)activeAscendSfx);
					activeAscendSfx = null;
				}
			}
			wasAscending = key;
		}
		if (key2 != wasHovering)
		{
			if (key2)
			{
				if (!string.IsNullOrEmpty(HOVER_SFX))
				{
					if (HOVER_CONTINUOUS_SFX)
					{
						activeHoverSfx = PlayContinuousSoundEffect(player, HOVER_SFX, activeHoverSfx);
					}
					else
					{
						PlaySoundEffect(player, HOVER_SFX);
					}
				}
				if (!string.IsNullOrEmpty(HOVER_VFX))
				{
					if (HOVER_CONTINUOUS_VFX)
					{
						activeHoverVfx = SpawnVisualEffect(player, HOVER_VFX, activeHoverVfx);
					}
					else
					{
						SpawnVisualEffect(player, HOVER_VFX, null);
					}
				}
			}
			else
			{
				if ((Object)(object)activeHoverVfx != (Object)null)
				{
					Object.Destroy((Object)(object)activeHoverVfx);
					activeHoverVfx = null;
				}
				if ((Object)(object)activeHoverSfx != (Object)null)
				{
					Object.Destroy((Object)(object)activeHoverSfx);
					activeHoverSfx = null;
				}
			}
			wasHovering = key2;
		}
		if (key3 != wasDescending)
		{
			if (key3)
			{
				if (!string.IsNullOrEmpty(DESCEND_SFX))
				{
					if (DESCEND_CONTINUOUS_SFX)
					{
						activeDescendSfx = PlayContinuousSoundEffect(player, DESCEND_SFX, activeDescendSfx);
					}
					else
					{
						PlaySoundEffect(player, DESCEND_SFX);
					}
				}
				if (!string.IsNullOrEmpty(DESCEND_VFX))
				{
					if (DESCEND_CONTINUOUS_VFX)
					{
						activeDescendVfx = SpawnVisualEffect(player, DESCEND_VFX, activeDescendVfx);
					}
					else
					{
						SpawnVisualEffect(player, DESCEND_VFX, null);
					}
				}
			}
			else
			{
				if ((Object)(object)activeDescendVfx != (Object)null)
				{
					Object.Destroy((Object)(object)activeDescendVfx);
					activeDescendVfx = null;
				}
				if ((Object)(object)activeDescendSfx != (Object)null)
				{
					Object.Destroy((Object)(object)activeDescendSfx);
					activeDescendSfx = null;
				}
			}
			wasDescending = key3;
		}
		if (key4 == wasRunning)
		{
			return;
		}
		if (key4)
		{
			if (!string.IsNullOrEmpty(RUN_SFX))
			{
				if (RUN_CONTINUOUS_SFX)
				{
					activeRunSfx = PlayContinuousSoundEffect(player, RUN_SFX, activeRunSfx);
				}
				else
				{
					PlaySoundEffect(player, RUN_SFX);
				}
			}
			if (!string.IsNullOrEmpty(RUN_VFX))
			{
				if (RUN_CONTINUOUS_VFX)
				{
					activeRunVfx = SpawnVisualEffect(player, RUN_VFX, activeRunVfx);
				}
				else
				{
					SpawnVisualEffect(player, RUN_VFX, null);
				}
			}
		}
		else
		{
			if ((Object)(object)activeRunVfx != (Object)null)
			{
				Object.Destroy((Object)(object)activeRunVfx);
				activeRunVfx = null;
			}
			if ((Object)(object)activeRunSfx != (Object)null)
			{
				Object.Destroy((Object)(object)activeRunSfx);
				activeRunSfx = null;
			}
		}
		wasRunning = key4;
	}

	private static void ResetFlightTriggers(Animator animator)
	{
		if (!((Object)(object)animator == (Object)null))
		{
			animator.SetBool("IsAscending", false);
			animator.SetBool("IsHovering", false);
			animator.SetBool("IsDescending", false);
			animator.SetBool("IsRunning", false);
		}
	}

	private static void PlaySoundEffect(Player player, string prefabName)
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)player == (Object)null || string.IsNullOrEmpty(prefabName))
		{
			return;
		}
		try
		{
			ZNetScene instance = ZNetScene.instance;
			GameObject val = ((instance != null) ? instance.GetPrefab(prefabName) : null);
			if ((Object)(object)val != (Object)null)
			{
				GameObject val2 = Object.Instantiate<GameObject>(val, ((Component)player).transform.position, Quaternion.identity);
			}
		}
		catch (Exception)
		{
		}
	}

	private static GameObject PlayContinuousSoundEffect(Player player, string prefabName, GameObject currentSfx)
	{
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)player == (Object)null || string.IsNullOrEmpty(prefabName))
		{
			return null;
		}
		try
		{
			if ((Object)(object)currentSfx != (Object)null)
			{
				Object.Destroy((Object)(object)currentSfx);
			}
			ZNetScene instance = ZNetScene.instance;
			GameObject val = ((instance != null) ? instance.GetPrefab(prefabName) : null);
			if ((Object)(object)val != (Object)null)
			{
				GameObject val2 = Object.Instantiate<GameObject>(val, ((Component)player).transform.position, Quaternion.identity);
				val2.transform.SetParent(((Component)player).transform);
				val2.transform.localPosition = Vector3.zero;
				if (ASCEND_CONTINUOUS_SFX || HOVER_CONTINUOUS_SFX || DESCEND_CONTINUOUS_SFX || RUN_CONTINUOUS_SFX)
				{
					RemoveDestructionComponents(val2);
					AudioSource[] componentsInChildren = val2.GetComponentsInChildren<AudioSource>();
					AudioSource[] array = componentsInChildren;
					foreach (AudioSource val3 in array)
					{
						if ((Object)(object)val3 != (Object)null)
						{
							val3.loop = true;
						}
					}
				}
				return val2;
			}
		}
		catch (Exception)
		{
		}
		return null;
	}

	private static void RemoveDestructionComponents(GameObject gameObject)
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Expected O, but got Unknown
		if ((Object)(object)gameObject == (Object)null)
		{
			return;
		}
		try
		{
			TimedDestruction component = gameObject.GetComponent<TimedDestruction>();
			if ((Object)(object)component != (Object)null)
			{
				Object.Destroy((Object)(object)component);
			}
			foreach (Transform item in gameObject.transform)
			{
				Transform val = item;
				TimedDestruction component2 = ((Component)val).GetComponent<TimedDestruction>();
				if ((Object)(object)component2 != (Object)null)
				{
					Object.Destroy((Object)(object)component2);
				}
			}
		}
		catch (Exception)
		{
		}
	}

	private static GameObject SpawnVisualEffect(Player player, string prefabName, GameObject currentVfx)
	{
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)player == (Object)null || string.IsNullOrEmpty(prefabName))
		{
			return null;
		}
		try
		{
			if ((Object)(object)currentVfx != (Object)null)
			{
				Object.Destroy((Object)(object)currentVfx);
			}
			ZNetScene instance = ZNetScene.instance;
			GameObject val = ((instance != null) ? instance.GetPrefab(prefabName) : null);
			if ((Object)(object)val != (Object)null)
			{
				GameObject val2 = Object.Instantiate<GameObject>(val, ((Component)player).transform.position, Quaternion.identity);
				val2.transform.SetParent(((Component)player).transform);
				val2.transform.localPosition = Vector3.zero;
				if (ASCEND_CONTINUOUS_VFX || HOVER_CONTINUOUS_VFX || DESCEND_CONTINUOUS_VFX || RUN_CONTINUOUS_VFX)
				{
					RemoveDestructionComponents(val2);
				}
				return val2;
			}
		}
		catch (Exception)
		{
		}
		return null;
	}

	private static void CleanupAllVfx()
	{
		if ((Object)(object)activeAscendVfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeAscendVfx);
		}
		if ((Object)(object)activeHoverVfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeHoverVfx);
		}
		if ((Object)(object)activeDescendVfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeDescendVfx);
		}
		if ((Object)(object)activeRunVfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeRunVfx);
		}
		activeAscendVfx = null;
		activeHoverVfx = null;
		activeDescendVfx = null;
		activeRunVfx = null;
		if ((Object)(object)activeAscendSfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeAscendSfx);
		}
		if ((Object)(object)activeHoverSfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeHoverSfx);
		}
		if ((Object)(object)activeDescendSfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeDescendSfx);
		}
		if ((Object)(object)activeRunSfx != (Object)null)
		{
			Object.Destroy((Object)(object)activeRunSfx);
		}
		activeAscendSfx = null;
		activeHoverSfx = null;
		activeDescendSfx = null;
		activeRunSfx = null;
	}

	public static void HandleControllerSwap(Player player)
	{
		if ((Object)(object)player == (Object)null)
		{
			return;
		}
		if (HasRequiredItemEquipped(player, out var controllerName))
		{
			if (!isUsingCustomController)
			{
				ApplyCustomController(player, controllerName);
			}
			else if (currentControllerName != controllerName)
			{
				RestoreOriginalController(player);
				ApplyCustomController(player, controllerName);
			}
			if (isUsingCustomController)
			{
				UpdateFlightAnimationTriggers(player);
			}
		}
		else if (isUsingCustomController)
		{
			RestoreOriginalController(player);
		}
	}
}
[HarmonyPatch]
public static class HealthVisualManager
{
	private class HealthEffect
	{
		public float HealthPercentage { get; set; }

		public string VisualChildName { get; set; }

		public bool AllowStacking { get; set; }

		public List<string> MeshesToHide { get; set; }

		public bool HideOriginalMeshes { get; set; }

		public HealthEffect(float healthPercentage, string visualChildName, bool allowStacking = false, List<string> meshesToHide = null, bool hideOriginalMeshes = false)
		{
			HealthPercentage = healthPercentage;
			VisualChildName = visualChildName;
			AllowStacking = allowStacking;
			MeshesToHide = meshesToHide ?? new List<string>();
			HideOriginalMeshes = hideOriginalMeshes;
		}
	}

	private class HealthMapping
	{
		public string PrefabName { get; set; }

		public List<HealthEffect> Effects { get; set; }

		public HealthMapping(string prefabName, List<HealthEffect> effects)
		{
			PrefabName = prefabName;
			Effects = effects;
			Effects.Sort((HealthEffect a, HealthEffect b) => b.HealthPercentage.CompareTo(a.HealthPercentage));
		}
	}

	private static Dictionary<ZDOID, List<string>> activeEffects;

	private static Dictionary<ZDOID, HashSet<float>> triggeredThresholds;

	private static readonly Dictionary<string, HealthMapping> HealthMappings;

	static HealthVisualManager()
	{
		activeEffects = new Dictionary<ZDOID, List<string>>();
		triggeredThresholds = new Dictionary<ZDOID, HashSet<float>>();
		HealthMappings = new Dictionary<string, HealthMapping>
		{
			{
				"sGundamExia",
				new HealthMapping("sGundamExia", new List<HealthEffect>
				{
					new HealthEffect(80f, "Sparcs80", allowStacking: true, new List<string>()),
					new HealthEffect(70f, "Sparcs70", allowStacking: true, new List<string>()),
					new HealthEffect(50f, "Sparcs50", allowStacking: true, new List<string>()),
					new HealthEffect(40f, "Sparcs40", allowStacking: true, new List<string>()),
					new HealthEffect(20f, "majordmgchest20", allowStacking: true, new List<string>())
				})
			},
			{
				"sGundamBarbatos",
				new HealthMapping("sGundamBarbatos", new List<HealthEffect>
				{
					new HealthEffect(80f, "Sparcs80", allowStacking: true, new List<string>()),
					new HealthEffect(70f, "Sparcs70", allowStacking: true, new List<string>()),
					new HealthEffect(50f, "Sparcs50", allowStacking: true, new List<string>()),
					new HealthEffect(40f, "Sparcs40", allowStacking: true, new List<string>()),
					new HealthEffect(20f, "majordmgchest20", allowStacking: true, new List<string>())
				})
			}
		};
		ValidateHealthMappings();
	}

	private static void ValidateHealthMappings()
	{
		foreach (HealthMapping value in HealthMappings.Values)
		{
			value.Effects.Sort((HealthEffect a, HealthEffect b) => b.HealthPercentage.CompareTo(a.HealthPercentage));
		}
	}

	private static string GetCleanPrefabName(string prefabName)
	{
		if (string.IsNullOrEmpty(prefabName))
		{
			return string.Empty;
		}
		if (prefabName.EndsWith("(Clone)"))
		{
			return prefabName.Substring(0, prefabName.Length - 7);
		}
		return prefabName;
	}

	[HarmonyPatch(typeof(Character), "SetHealth")]
	[HarmonyPostfix]
	public static void Character_SetHealth_Postfix(Character __instance)
	{
		UpdateVisualEffects(__instance);
	}

	[HarmonyPatch(typeof(Character), "Damage")]
	[HarmonyPostfix]
	public static void Character_Damage_Postfix(Character __instance)
	{
		UpdateVisualEffects(__instance);
	}

	private static void UpdateVisualEffects(Character __instance)
	{
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0171: Unknown result type (might be due to invalid IL or missing references)
		//IL_0227: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance == (Object)null || !__instance.m_nview.IsValid())
		{
			return;
		}
		string cleanPrefabName = GetCleanPrefabName(((Object)((Component)__instance).gameObject).name);
		if (!HealthMappings.TryGetValue(cleanPrefabName, out var value))
		{
			return;
		}
		float maxHealth = __instance.GetMaxHealth();
		float health = __instance.GetHealth();
		float num = health / maxHealth * 100f;
		ZDOID uid = __instance.m_nview.GetZDO().m_uid;
		if (!activeEffects.ContainsKey(uid))
		{
			activeEffects[uid] = new List<string>();
		}
		if (!triggeredThresholds.ContainsKey(uid))
		{
			triggeredThresholds[uid] = new HashSet<float>();
		}
		List<HealthEffect> list = new List<HealthEffect>();
		HashSet<string> hashSet = new HashSet<string>();
		foreach (HealthEffect effect in value.Effects)
		{
			if (num <= effect.HealthPercentage)
			{
				if (effect.AllowStacking || !triggeredThresholds[uid].Contains(effect.HealthPercentage))
				{
					list.Add(effect);
					if (!triggeredThresholds[uid].Contains(effect.HealthPercentage))
					{
						triggeredThresholds[uid].Add(effect.HealthPercentage);
					}
				}
				if (!effect.AllowStacking)
				{
					break;
				}
			}
			else
			{
				triggeredThresholds[uid].Remove(effect.HealthPercentage);
			}
		}
		foreach (HealthEffect item in list)
		{
			hashSet.Add(item.VisualChildName);
		}
		List<string> list2 = new List<string>();
		foreach (string item2 in activeEffects[uid])
		{
			if (!hashSet.Contains(item2))
			{
				Transform val = Utils.FindChild(((Component)__instance).transform, item2, (IterativeSearchType)0);
				if ((Object)(object)val != (Object)null)
				{
					((Component)val).gameObject.SetActive(false);
				}
				list2.Add(item2);
			}
		}
		foreach (string item3 in list2)
		{
			activeEffects[uid].Remove(item3);
		}
		foreach (HealthEffect item4 in list)
		{
			ApplyHealthEffect(__instance, item4);
		}
	}

	private static void ApplyHealthEffect(Character character, HealthEffect effect)
	{
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		if (effect == null || string.IsNullOrEmpty(effect.VisualChildName))
		{
			return;
		}
		Transform val = Utils.FindChild(((Component)character).transform, effect.VisualChildName, (IterativeSearchType)0);
		if ((Object)(object)val == (Object)null)
		{
			return;
		}
		((Component)val).gameObject.SetActive(true);
		if (character.m_nview.IsValid())
		{
			ZDOID uid = character.m_nview.GetZDO().m_uid;
			if (!activeEffects.ContainsKey(uid))
			{
				activeEffects[uid] = new List<string>();
			}
			if (!activeEffects[uid].Contains(effect.VisualChildName))
			{
				activeEffects[uid].Add(effect.VisualChildName);
			}
		}
		if (effect.MeshesToHide != null && effect.MeshesToHide.Count > 0)
		{
			foreach (string item in effect.MeshesToHide)
			{
				Transform val2 = Utils.FindChild(((Component)character).transform, item, (IterativeSearchType)0);
				if ((Object)(object)val2 != (Object)null)
				{
					MeshRenderer component = ((Component)val2).GetComponent<MeshRenderer>();
					if ((Object)(object)component != (Object)null)
					{
						((Renderer)component).enabled = false;
					}
					SkinnedMeshRenderer component2 = ((Component)val2).GetComponent<SkinnedMeshRenderer>();
					if ((Object)(object)component2 != (Object)null)
					{
						((Renderer)component2).enabled = false;
					}
					if ((Object)(object)component == (Object)null && (Object)(object)component2 == (Object)null)
					{
						((Component)val2).gameObject.SetActive(false);
					}
				}
			}
		}
		if (!effect.HideOriginalMeshes)
		{
			return;
		}
		MeshRenderer[] componentsInChildren = ((Component)character).GetComponentsInChildren<MeshRenderer>(true);
		SkinnedMeshRenderer[] componentsInChildren2 = ((Component)character).GetComponentsInChildren<SkinnedMeshRenderer>(true);
		MeshRenderer[] array = componentsInChildren;
		foreach (MeshRenderer val3 in array)
		{
			if (!IsPartOfVisualEffect(((Component)val3).transform, effect.VisualChildName))
			{
				((Renderer)val3).enabled = false;
			}
		}
		SkinnedMeshRenderer[] array2 = componentsInChildren2;
		foreach (SkinnedMeshRenderer val4 in array2)
		{
			if (!IsPartOfVisualEffect(((Component)val4).transform, effect.VisualChildName))
			{
				((Renderer)val4).enabled = false;
			}
		}
	}

	private static void DisableAllEffects(Character character)
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)character == (Object)null || !character.m_nview.IsValid())
		{
			return;
		}
		ZDOID uid = character.m_nview.GetZDO().m_uid;
		if (!activeEffects.ContainsKey(uid))
		{
			return;
		}
		string cleanPrefabName = GetCleanPrefabName(((Object)((Component)character).gameObject).name);
		if (!HealthMappings.TryGetValue(cleanPrefabName, out var value))
		{
			return;
		}
		foreach (HealthEffect effect in value.Effects)
		{
			Transform val = Utils.FindChild(((Component)character).transform, effect.VisualChildName, (IterativeSearchType)0);
			if ((Object)(object)val != (Object)null)
			{
				((Component)val).gameObject.SetActive(false);
			}
		}
		activeEffects[uid].Clear();
	}

	private static bool IsPartOfVisualEffect(Transform transform, string visualEffectName)
	{
		if ((Object)(object)transform == (Object)null || string.IsNullOrEmpty(visualEffectName))
		{
			return false;
		}
		Transform val = transform;
		while ((Object)(object)val != (Object)null)
		{
			if (((Object)val).name == visualEffectName)
			{
				return true;
			}
			val = val.parent;
		}
		return false;
	}

	[HarmonyPatch(typeof(Character), "OnDestroy")]
	[HarmonyPostfix]
	public static void Character_OnDestroy_Postfix(Character __instance)
	{
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		ZNetView component = ((Component)__instance).GetComponent<ZNetView>();
		if (!((Object)(object)component == (Object)null) && component.GetZDO() != null)
		{
			ZDOID uid = component.GetZDO().m_uid;
			activeEffects.Remove(uid);
			triggeredThresholds.Remove(uid);
		}
	}
}
public class Patches : MonoBehaviour
{
	[HarmonyPatch(typeof(Player), "SetControls")]
	[HarmonyPrefix]
	private static void PrefixSetControlsforShip(Player __instance, ref bool jump, ref bool crouch, ref bool attack, ref bool secondaryAttack, ref bool block)
	{
		Ship controlledShip = __instance.GetControlledShip();
		ShipFlyIM shipFlyIM = default(ShipFlyIM);
		if (!((Object)(object)controlledShip == (Object)null) && ((Component)controlledShip).gameObject.TryGetComponent<ShipFlyIM>(ref shipFlyIM))
		{
			shipFlyIM.flyship(ref jump, ref crouch, ref attack, ref secondaryAttack, ref block);
		}
	}
}
public class ShipFlyIM : MonoBehaviour
{
	private Ship ship;

	private Rigidbody rb;

	public float drop_reduction = 10f;

	public Vector3 forcepos = new Vector3(0f, 0f, 0f);

	public float forwardReduction = 0.5f;

	public float hoverlift_modifier = 0.1f;

	public float hoverheight_modifier = 0.15f;

	public float hovertilt_modifier = 2f;

	public float jump_lift_mod = 0.1f;

	private float lift = 110f;

	public float LR_StabilityForce = 100f;

	public Vector3 LRpos = new Vector3(0f, 4f, -5f);

	public float maxangle = 0.35f;

	public float R_multi = 10f;

	public float rightingForce = -45f;

	public float rollForce = -25000f;

	public float rotationForce = 70f;

	public float slowDown_multi = 3f;

	public float thrust = 15f;

	public float turningForce = 0.05f;

	public float yawForce = 30000f;

	private float waterlvl = 30f;

	private Vector3[] projectileForce = (Vector3[])(object)new Vector3[2]
	{
		new Vector3(0f, 0f, 100f),
		new Vector3(0f, 0f, 50f)
	};

	private Vector3[] projectileLoc = (Vector3[])(object)new Vector3[2]
	{
		new Vector3(0f, 0f, 0f),
		new Vector3(5f, 0f, -6f)
	};

	private float[] projectileCooldown = new float[2] { 10f, 16f };

	private float[] lastProjectile = new float[2];

	private int[] AmtBeforeRecharge = new int[2] { 15, 4 };

	private int[] AmtInChamber = new int[2] { 15, 4 };

	private float manouverForce = 600f;

	public void Awake()
	{
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		ship = ((Component)this).gameObject.GetComponent<Ship>();
		if (Object.op_Implicit((Object)(object)ship))
		{
			rb = ship.m_body;
			waterlvl = (Object.op_Implicit((Object)(object)ship.m_previousCenter) ? ((Component)ship.m_previousCenter).transform.position.y : 30f);
		}
	}

	private bool hasShip()
	{
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)ship) && Object.op_Implicit((Object)(object)rb))
		{
			return true;
		}
		ship = ((Component)this).gameObject.GetComponent<Ship>();
		if (Object.op_Implicit((Object)(object)ship))
		{
			rb = ship.m_body;
			waterlvl = (Object.op_Implicit((Object)(object)ship.m_previousCenter) ? ((Component)ship.m_previousCenter).transform.position.y : 30f);
			if (Object.op_Implicit((Object)(object)rb))
			{
				return true;
			}
			return false;
		}
		return false;
	}

	public void flyship(ref bool jump, ref bool crouch, ref bool attack, ref bool secondaryattack, ref bool block)
	{
		//IL_022f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0267: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b1: 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)
		//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0317: Unknown result type (might be due to invalid IL or missing references)
		//IL_031c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_07c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_07c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_07cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_07dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_07e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_07ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_07f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0869: Unknown result type (might be due to invalid IL or missing references)
		//IL_0897: Unknown result type (might be due to invalid IL or missing references)
		//IL_089c: Unknown result type (might be due to invalid IL or missing references)
		//IL_082d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0850: Unknown result type (might be due to invalid IL or missing references)
		//IL_0387: Unknown result type (might be due to invalid IL or missing references)
		//IL_039c: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_04de: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_016b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Unknown result type (might be due to invalid IL or missing references)
		//IL_0554: Unknown result type (might be due to invalid IL or missing references)
		//IL_0568: Unknown result type (might be due to invalid IL or missing references)
		//IL_056d: Unknown result type (might be due to invalid IL or missing references)
		//IL_058b: Unknown result type (might be due to invalid IL or missing references)
		//IL_059d: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ac: 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)
		//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_05f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0601: Unknown result type (might be due to invalid IL or missing references)
		//IL_0606: Unknown result type (might be due to invalid IL or missing references)
		//IL_061e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0623: Unknown result type (might be due to invalid IL or missing references)
		//IL_0522: Unknown result type (might be due to invalid IL or missing references)
		//IL_0431: 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_044a: Unknown result type (might be due to invalid IL or missing references)
		//IL_046c: Unknown result type (might be due to invalid IL or missing references)
		//IL_040a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0412: 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_0646: Unknown result type (might be due to invalid IL or missing references)
		//IL_064c: Invalid comparison between Unknown and I4
		//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01de: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_06d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_06db: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0692: Unknown result type (might be due to invalid IL or missing references)
		//IL_069a: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0724: Unknown result type (might be due to invalid IL or missing references)
		//IL_072f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0747: Unknown result type (might be due to invalid IL or missing references)
		//IL_075b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0760: Unknown result type (might be due to invalid IL or missing references)
		//IL_0782: Unknown result type (might be due to invalid IL or missing references)
		if (!hasShip())
		{
			Shawesomes_Infinite_Multiverse.logger.LogWarning((object)"Does not have ship");
			return;
		}
		float time = Time.time;
		if (attack | secondaryattack | block)
		{
			Container component = ((Component)this).gameObject.GetComponent<Container>();
			if ((Object)(object)component != (Object)null)
			{
				int num = (block ? 1 : 0);
				if (time > lastProjectile[num] + projectileCooldown[num])
				{
					List<DropData> drops = component.m_defaultItems.m_drops;
					GameObject item = drops[num].m_item;
					if ((Object)(object)item != (Object)null)
					{
						if (AmtBeforeRecharge[num] > 0)
						{
							if (--AmtInChamber[num] <= 0)
							{
								AmtInChamber[num] = AmtBeforeRecharge[num];
								lastProjectile[num] = time;
							}
						}
						else
						{
							lastProjectile[num] = time;
						}
						for (int i = 0; i <= num; i++)
						{
							GameObject val = Object.Instantiate<GameObject>(item, ((Component)this).gameObject.transform.position + ((Component)this).gameObject.transform.rotation * Vector3.Scale(projectileLoc[num], new Vector3((float)(1 - 2 * i), 1f, 1f)), ((Component)this).gameObject.transform.rotation);
							Projectile component2 = val.GetComponent<Projectile>();
							if (Object.op_Implicit((Object)(object)component2))
							{
								Shawesomes_Infinite_Multiverse.logger.LogWarning((object)((!block) ? "attempt to attack primary1" : "attempt to attack secondary2"));
								component2.m_vel = ((Component)this).gameObject.transform.rotation * projectileForce[num];
							}
						}
					}
				}
			}
			attack = false;
			secondaryattack = false;
		}
		if (jump)
		{
			jump = false;
		}
		float num2 = 1f + 0.25f * Math.Min(Math.Max(rb.position.y - waterlvl, 0f), 6f);
		float num3 = Math.Max(Math.Min(1.25f - 0.25f * Math.Min(rb.position.y - waterlvl, 4f), 1f), 0f) * rotationForce;
		Vector3 val2 = rb.position + forcepos;
		Vector3 val3 = rb.rotation * Vector3.forward;
		float num4 = Vector3.Dot(val3, Vector3.up);
		if (num4 > maxangle)
		{
			num3 *= -1f;
		}
		float num5 = (maxangle - num4) * (maxangle - num4) * 100f;
		float num6 = Vector3.Dot(rb.velocity, val3);
		int num7 = 1;
		if (ZInput.GetButton("Jump") || ZInput.GetButtonDown("JoyJump"))
		{
			if (ZInput.GetButton("Run") || ZInput.GetButtonDown("JoyRun"))
			{
				Shawesomes_Infinite_Multiverse.logger.LogWarning((object)"shiftjump");
				rb.AddForceAtPosition(rb.rotation * new Vector3(0f, manouverForce, 0f), rb.position, (ForceMode)1);
				num7 = 0;
			}
			if (num7 > 0)
			{
				rb.AddForceAtPosition(new Vector3(0f, num3 * num5, 0f), rb.position, (ForceMode)1);
			}
			if (num6 < 30f)
			{
				rb.AddForce(val3 * thrust * num2, (ForceMode)1);
			}
			rb.AddForce(rb.rotation * new Vector3(0f, 1f, 0.1f) * Math.Min(lift * jump_lift_mod * num4 * num6, 2400f), (ForceMode)1);
		}
		float num8 = Math.Max(num2 - 1.5f, 0f);
		if (num7 > 0)
		{
			if (ZInput.GetButton("Crouch") || ZInput.GetButtonDown("JoyCrouch"))
			{
				num7 = 5;
			}
			rb.AddForceAtPosition(new Vector3(0f, rightingForce * (float)num7, 0f), val2, (ForceMode)1);
			float num9 = 1f;
			if (rb.position.y > waterlvl + 20f)
			{
				num9 = 1f - Math.Min(0.01f * (rb.position.y - waterlvl - 20f), 0.3f);
			}
			rb.AddForce(rb.rotation * new Vector3(0f, 1f, 0.1f) * Math.Min(lift * num9 * num4 * num6, 2400f), (ForceMode)1);
			float num10 = Vector3.Dot(rb.rotation * Vector3.left, Vector3.up);
			Vector3 val4 = rb.position + R_multi * num10 * (rb.rotation * Vector3.right) + rb.rotation * LRpos;
			rb.AddForceAtPosition(new Vector3(0f, LR_StabilityForce, 0f), val4, (ForceMode)1);
			if (num2 < 2f)
			{
				return;
			}
			if ((int)ship.m_speed == 4)
			{
				float num11 = Math.Max(Math.Min(10f / num6 - 27f, 2f), 0.1f);
				if (num6 < 30f)
				{
					rb.AddForce(val3 * thrust * num11 * num2 * hoverheight_modifier, (ForceMode)1);
				}
				else
				{
					rb.AddForce(val3 * thrust * slowDown_multi * (30f - num6) * num2 * hoverheight_modifier, (ForceMode)1);
				}
				rb.AddForceAtPosition(new Vector3(0f, num3 * hovertilt_modifier * num11 * num5, 0f), rb.position, (ForceMode)1);
				rb.AddForce(rb.rotation * new Vector3(0f, 1f, 0.1f) * Math.Min(lift * num4 * num6 * hoverlift_modifier, 2400f), (ForceMode)1);
			}
		}
		if (num8 > 0f)
		{
			float rudderValue = ship.m_rudderValue;
			float num12 = Vector3.Dot(rb.velocity, rb.rotation * Vector3.left);
			float num13 = Vector3.Dot(rb.velocity, rb.rotation * Vector3.up);
			if (num13 < 0f && num6 > 15f)
			{
				rb.AddForce(new Vector3(0f, 1f, 0f) * Math.Min(lift * (0f - num13) * drop_reduction * num8, 2400f), (ForceMode)1);
			}
			rb.AddForce(rb.rotation * new Vector3(num12 * turningForce * num8, 0f, forwardReduction * Math.Abs(num12) * turningForce * num8), (ForceMode)2);
			rb.AddRelativeTorque(0f, rudderValue * yawForce * num8, rudderValue * rollForce * num8);
			ship.m_rudderValue += 0.02f * (num8 * (float)((!(ship.m_rudderValue > 0f)) ? 1 : (-1)));
		}
	}
}
[BepInPlugin("IDshawesome4u1", "Shawesomes_Infinite_Multiverse", "2.2.6")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Shawesomes_Infinite_Multiverse : BaseUnityPlugin
{
	[HarmonyPriority(0)]
	[HarmonyPatch(typeof(Player), "OnSpawned")]
	private static class Player_OnSpawned_Patch
	{
		private static void Postfix()
		{
			if (m_initialized || !Object.op_Implicit((Object)(object)ZNetScene.instance))
			{
				return;
			}
			Dictionary<string, string> dictionary = new Dictionary<string, string>
			{
				["sGundamBarbatos"] = "Troll",
				["sGundamExia"] = "Troll",
				["shawesomesurtrboss"] = "Troll"
			};
			Humanoid val = default(Humanoid);
			Humanoid val2 = default(Humanoid);
			foreach (KeyValuePair<string, string> item in dictionary)
			{
				GameObject prefab = ZNetScene.instance.GetPrefab(item.Value);
				GameObject prefab2 = ZNetScene.instance.GetPrefab(item.Key);
				if (Object.op_Implicit((Object)(object)prefab) && Object.op_Implicit((Object)(object)prefab2) && prefab.TryGetComponent<Humanoid>(ref val) && prefab2.TryGetComponent<Humanoid>(ref val2))
				{
					((Character)val2).m_waterEffects = ((Character)val).m_waterEffects;
				}
			}
			m_initialized = true;
		}
	}

	public Harmony harmony;

	public static GameObject Root;

	public string version = "1.0.0";

	private static int i = 0;

	public static ManualLogSource logger;

	public static ManualLogSource harmonyLog;

	private static AssetBundle Shawcassets;

	public static List<GameObject> EffectList = new List<GameObject>();

	private static bool m_initialized;

	public void Awake()
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Expected O, but got Unknown
		logger = ((BaseUnityPlugin)this).Logger;
		harmony = new Harmony("IDshawesome4u1");
		Root = new GameObject("Shaw Root");
		Object.DontDestroyOnLoad((Object)(object)Root);
		harmony.PatchAll(typeof(HealthVisualManager));
		harmony.PatchAll(typeof(ControllerSwapperSystem));
		harmony.PatchAll(typeof(Player_Update_Patch));
		harmony.PatchAll(typeof(Animator_runtimeAnimatorController_Patch));
		ControllerSwapperSystem.Initialize();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"HealthVisualManager initialized");
		((BaseUnityPlugin)this).Logger.LogInfo((object)"ControllerSwapperSystem initialized");
		harmony.PatchAll(typeof(Patches));
		Ascend.InitConfig(((BaseUnityPlugin)this).Config);
		harmony.PatchAll(typeof(SimpleAscend_Character_UpdateMotion_Patch));
		harmony.PatchAll(typeof(SimpleAscend_Character_IsOnGround_Patch));
		Ascend.Instance.ApplyConfig();
		harmonyLog = ((BaseUnityPlugin)this).Logger;
		IEnumerable<MethodBase> patchedMethods = harmony.GetPatchedMethods();
		foreach (MethodBase item in patchedMethods)
		{
			harmonyLog.LogWarning((object)(item.ReflectedType?.ToString() + ":" + item.Name + " is patched"));
		}
		harmonyLog.LogMessage((object)"[BOOT SEQUENCE COMPLETE] :: Multiversal anomalies online. Unique Combat parameters unlocked. Dragonballs scattered...Awaiting Hero of Legend...");
		Shawcassets = AssetUtils.LoadAssetBundleFromResources("shaw_im", Assembly.GetExecutingAssembly());
		LoadAssets();
		PrefabManager.OnVanillaPrefabsAvailable += additems;
		PrefabManager.OnPrefabsRegistered += delegate
		{
			harmonyLog.LogMessage((object)"Registering VFX via PrefabManager (safe, ZNetScene ready)...");
			AddEffectsToZNet();
		};
	}

	public static void LoadAssets()
	{
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/batmissile_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/bow_projectile1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/bow_projectile2.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/batmobile_boost_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawbathookprojectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/vfx_shawtechdmg_impact1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/vfx_shawtechdmg_impact.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/cryobatarang_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/batarang_freeze_bomb_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/pyrobatarang_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/pyrobatarang_projectile_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/vfx_arrowhit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeArmor/fx_shawarmorset.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/ddstuff/yu-gi-oh-winged-dragon-of-ra/RA_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/fx_eikthyr_stomp.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/gaara/SandBC.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/gaara/fx_shield_startGAARA.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/gaara/sand_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/vfx_HitSparks1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/ddstuff/vfx_YGOBLOCK.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/custom attacks/sfx_lifepointsdrop.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/fx_SageMode_Activation.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/sclone_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/sclone_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/RS_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/Rasensh_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/icedragon_hyorinmaru_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/IceBlocker1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/vfx_icedragon_hyorinmaru_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/shunsui/Shunsui projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/shunsui/shunsui_attack_aoe.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/nozarashi/fx_nozarashi_attack.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/nozarashi/sfx_Nozarashi.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/shunsui/sfx_shunsui.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/sfx_hyorinmaru.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/Byakuya/Senbonzakura_aoe.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/Byakuya/zakura_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-kurosaki/Mugetsu_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-kurosaki/fx_mugetsu_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-kurosaki/sfx_Mugetsu.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-sword-the-second-mode/textures/Getsugatensho_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-sword-the-second-mode/textures/fx_gt_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-sword-the-second-mode/textures/sfx_getsugatensho.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/sfx_firework_explode1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/vfx_Burning1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/Surtr_groundslam.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/troll_groundslam_aoe1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/relicswordspecial_aoe_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_meteor_throw.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surtspwan_meteorthrow_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_swing_h1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_swing_v1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/beamsaber_swing_v.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/beamsaber_swing_h.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawesomeexplosion.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/vfx_Place_VikingShip1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawesomeexplosion1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/barbatos_swing_v.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/barbatos_swing_h.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/vfx_troll_footstep_water1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/custom attacks/projectile_Gungnir1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/custom attacks/gungprojhitnew.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/warpgung_spawn.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawAura/Effects/Hovl Studio/8 KI levels/Prefabs/Ki aura grand.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/fx_Lightning_green.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/fx_Lightning_purp.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/skitetsu_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/sfx_kitetsu.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/sfx_enma.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/enma_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/ddstuff/sfx_ra_summon.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/beud_projectile_card.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/sfx_beud_roar.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/sfx_beud_beam_start.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/nbexplosion_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/fx_beud_stomp.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/neutronblast_start_vfx.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/neutronblast_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/sfx_beud_atklong_beamfire.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/SOUNDS/sfx_senzu_remark.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome/fx_Potion_SENZU.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome/spirit bomb projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome/BBK_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeCapeimage/ki_blast_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/fx_kiblast_hit1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome/kameha_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeTOOTS/titustoy_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/hatchling_spit_cold1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/hatchling_cold_projectile1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/SOUNDS/sfx_KMHMH_Launch1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/SOUNDS/sfx_SB_Launch.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/SOUNDS/sfx_UltraInstinct_Block.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/SOUNDS/sfx_BBKmhmh_launch.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/sfx_cloneras_launch1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/sfx_rasenshuriken_launch.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/Byakuya/vfx_blocked_senbonz.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/Byakuya/fx_shield_startGAARA1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/sfx_shawbatarang_beeps.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/fx_kmhmhstart.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/fx_energyblast_hit.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/ki_hit_dig.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/vfx_Place_digg.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome/GG_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome/Tkameha_projectile1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/sfx_GG_start.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/CamShake1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome2/SOUNDS/sfx_GG_Launch.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome2/SOUNDS/sfx_BBKmhmh_launch.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome2/SOUNDS/sfx_SB_Launch.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome2/SOUNDS/sfx_senzu_remark.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/fx_kiblast_hit2.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeTOOTS/toots_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeTOOTS/titus_attack_special.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawTitan/thrusters.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawTitan/thrusters1.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/sfx_tech_warning.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/sfx-warning-jet.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome40kweapons/Titan/Titan_misile_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome40kweapons/Titan/titan_misiles.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/gryphon_projectile.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/sfx_divinedeparture.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeDBZ/sfx_flydescend.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeDBZ/sfx_flyfast.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeDBZ/vfx_flyfast.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeDBZ/sfx_flyascend.prefab"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome/Potion_SENZU.asset"));
		EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeArmor/blackvalk_se.asset"));
	}

	public static void AddEffectsToZNet()
	{
		harmonyLog.LogMessage((object)"Adding effects to ZNet");
		foreach (GameObject effect in EffectList)
		{
			int stableHashCode = StringExtensionMethods.GetStableHashCode(((Object)effect).name);
			harmonyLog.LogMessage((object)("Attempting to add to Znet " + stableHashCode + ":" + ((Object)effect).name));
			if ((Object)(object)ZNetScene.instance != (Object)null && !ZNetScene.instance.m_namedPrefabs.ContainsKey(stableHashCode))
			{
				harmonyLog.LogMessage((object)("Adding to ZNet" + ((Object)effect).name));
				PrefabManager.Instance.RegisterToZNetScene(effect);
			}
			harmonyLog.LogMessage((object)((Object)(object)ZNetScene.instance.GetPrefab(stableHashCode) != (Object)null));
		}
	}

	public static void additems()
	{
		Addwarpspear();
		Addtitus();
		Addtitusmount();
		Addtitustoy();
		AddItsover9000();
		AddKIBLAST();
		Addbbksb();
		AddKIBLAST1();
		Addperveysagecloud();
		AddSENZU();
		Addkifly();
		AddSpacePod();
		Addssj5fusion();
		AddIT2Duel();
		AddHeartotc();
		AddMPSoul();
		Addkaibahand();
		AddBEmount();
		Addultimatedragon();
		Addudatk1();
		Addudatk2();
		Addshawesomeboat();
		Addgaara();
		AddGaaraCape();
		AddNaruto();
		AddShunsuiCape();
		AddKatenKyokotsu();
		AddZangetsu();
		AddFinalZangetsu();
		AddNozarashi();
		AddSenbonzakura();
		Addhyorenmaru();
		Addzoro3();
		Addzoro2();
		Addzoro1();
		Addgryphon();
		Addbatmanhead();
		Addbatmanchest();
		Addbatmanlegs();
		Addbatmancape();
		Addbatgrap();
		Addbatarangfire();
		Addbatarangfrost();
		Addbarbatos();
		Addexia();
		Addsurtboss();
		Addexiakey();
		Addbarbkey();
		Addbeamsaber2();
		Addbeamsaber1();
		Addbeamsaber4();
		Addbeamsaber3();
		Addsurtsword1();
		Addsurtsword2();
		Addsurtrock();
		Add1sdb();
		Add2sdb();
		Add3sdb();
		Add4sdb();
		Add5sdb();
		Add6sdb();
		Add7sdb();
		PrefabManager.OnVanillaPrefabsAvailable -= additems;
	}

	public static void Addudatk1()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/ultimatedragon_stomp.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addudatk2()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/ultimatedragon_atk_long.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addbatarangfrost()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Expected O, but got Unknown
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Expected O, but got Unknown
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		val.AddRequirement(new RequirementConfig("AlphaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("GammaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("DeltaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("EpsilonSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("ZetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("DragonTear", 1, 1, false));
		val.AddRequirement(new RequirementConfig("EtaSun", 1, 0, false));
		val.CraftingStation = CraftingStations.Forge;
		val.MinStationLevel = 1;
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawbatarangIce.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addbatarangfire()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Expected O, but got Unknown
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Expected O, but got Unknown
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		val.AddRequirement(new RequirementConfig("AlphaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("GammaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("DeltaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("EpsilonSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("ZetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("SurtlingCore", 10, 10, false));
		val.AddRequirement(new RequirementConfig("EtaSun", 1, 0, false));
		val.CraftingStation = CraftingStations.Forge;
		val.MinStationLevel = 1;
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawbatarangfire.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addbatgrap()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Expected O, but got Unknown
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Expected O, but got Unknown
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		val.AddRequirement(new RequirementConfig("AlphaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("GammaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("DeltaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("EpsilonSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("ZetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("MechanicalSpring", 4, 4, false));
		val.AddRequirement(new RequirementConfig("EtaSun", 1, 0, false));
		val.CraftingStation = CraftingStations.Forge;
		val.MinStationLevel = 1;
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawbathook.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addshawbatcart()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Expected O, but got Unknown
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Expected O, but got Unknown
		PieceConfig val = new PieceConfig();
		val.PieceTable = PieceTables.Hammer;
		val.CraftingStation = CraftingStations.Workbench;
		val.Category = PieceCategories.Misc;
		val.AddRequirement(new RequirementConfig("IronNails", 100, 0, false));
		val.AddRequirement(new RequirementConfig("ElderBark", 50, 0, false));
		val.AddRequirement(new RequirementConfig("BlackMetal", 50, 0, false));
		val.AddRequirement(new RequirementConfig("FlametalNew", 50, 0, false));
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawbatcart.prefab");
		CustomPiece val3 = new CustomPiece(val2, true, val);
		logger.LogWarning((object)("test" + i++));
		PieceManager.Instance.AddPiece(val3);
	}

	public static void Addtitustoy()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Expected O, but got Unknown
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Expected O, but got Unknown
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		val.AddRequirement(new RequirementConfig("AlphaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("GammaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("DeltaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("EpsilonSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("ZetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BlackCore", 10, 0, false));
		val.AddRequirement(new RequirementConfig("EtaSun", 1, 0, false));
		val.CraftingStation = CraftingStations.Forge;
		val.MinStationLevel = 1;
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeTOOTS/godogtoy4.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addtitusmount()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Expected O, but got Unknown
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Expected O, but got Unknown
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		val.AddRequirement(new RequirementConfig("AlphaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("GammaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("DeltaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("EpsilonSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("ZetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BlackCore", 10, 0, false));
		val.AddRequirement(new RequirementConfig("EtaSun", 1, 0, false));
		val.CraftingStation = CraftingStations.Forge;
		val.MinStationLevel = 1;
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeTOOTS/godogtoy.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addtitus()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Expected O, but got Unknown
		CreatureConfig val = new CreatureConfig();
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeTOOTS/TitusAndronicusGodShaw.prefab");
		CustomCreature val3 = new CustomCreature(val2, true, val);
		CreatureManager.Instance.AddCreature(val3);
	}

	public static void Addsurtrock()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_meteor_throw.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addsurtboss()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Expected O, but got Unknown
		CreatureConfig val = new CreatureConfig();
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/shawesomesurtrboss.prefab");
		CustomCreature val3 = new CustomCreature(val2, true, val);
		CreatureManager.Instance.AddCreature(val3);
	}

	public static void Addsurtsword1()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_swing_h1.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addsurtsword2()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_swing_v1.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Addgryphon()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Expected O, but got Unknown
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Expected O, but got Unknown
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Expected O, but got Unknown
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Expected O, but got Unknown
		ItemConfig val = new ItemConfig();
		val.AddRequirement(new RequirementConfig("AlphaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("GammaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("DeltaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("EpsilonSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("ZetaSun", 1, 0, false));
		val.AddRequirement(new RequirementConfig("BlackCore", 10, 10, false));
		val.AddRequirement(new RequirementConfig("EtaSun", 1, 0, false));
		val.CraftingStation = CraftingStations.Forge;
		val.MinStationLevel = 1;
		GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/sgryphon.prefab");
		CustomItem val3 = new CustomItem(val2, true, val);
		ItemManager.Instance.AddItem(val3);
	}

	public static void Ad