Decompiled source of TechnicalItems v1.0.10

TechnicalItems.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
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 DM;
using HarmonyLib;
using Landfall.TABS;
using Landfall.TABS.UnitEditor;
using SLMA;
using TIComponents;
using TechnicalItems;
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("TechnicalItems")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("GeeztJeez")]
[assembly: AssemblyProduct("TechnicalItems")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7acfaef0-7669-4401-8bff-5a9a02e18c75")]
[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.10.0")]
[module: UnverifiableCode]
namespace TechnicalItems
{
	public static class UManager
	{
		public class Utility : MonoBehaviour
		{
			public static class ItemCategorizer
			{
				public static void SetTag(GameObject item, string categoryName = "Technical Items", TagType tagType = 0)
				{
					//IL_0018: Unknown result type (might be due to invalid IL or missing references)
					//IL_0020: Unknown result type (might be due to invalid IL or missing references)
					//IL_0021: 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)
					try
					{
						CharacterItem componentInChildren = item.GetComponentInChildren<CharacterItem>();
						if (Object.op_Implicit((Object)(object)componentInChildren))
						{
							componentInChildren.tags = new List<Tag>
							{
								new Tag
								{
									tagType = tagType,
									value = categoryName
								}
							};
						}
					}
					catch (Exception ex)
					{
						Debug.Log((object)ex);
					}
				}
			}

			public static Sprite Image2Sprite(string name)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Expected O, but got Unknown
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name);
				Texture2D val = new Texture2D(4, 4);
				byte[] array = new byte[stream.Length];
				stream.Read(array, 0, (int)stream.Length);
				((Texture)val).filterMode = (FilterMode)0;
				ImageConversion.LoadImage(val, array);
				return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
			}

			public static Sprite LoadBundleTextureToSprite(string name)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Expected O, but got Unknown
				//IL_0031: 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)
				Texture2D val = (Texture2D)bundle.LoadAsset(name);
				((Texture)val).filterMode = (FilterMode)0;
				return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
			}

			public static GameObject LoadBundleGameObject(string name)
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Expected O, but got Unknown
				return (GameObject)bundle.LoadAsset(name);
			}

			public static bool CheckCombatID(DatabaseID databaseID)
			{
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				return ((Dictionary<DatabaseID, GameObject>)typeof(LandfallContentDatabase).GetField("m_combatMoves", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().LandfallContentDatabase)).ContainsKey(databaseID);
			}

			public static bool CheckCharacterPropID(DatabaseID databaseID)
			{
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				return ((Dictionary<DatabaseID, GameObject>)typeof(LandfallContentDatabase).GetField("m_characterProps", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().LandfallContentDatabase)).ContainsKey(databaseID);
			}

			public static int IDChecker(LandfallContentDatabase landfallContentDatabase, assetType assetType, int id = 0, int modId = -1)
			{
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				int num = id;
				DatabaseID arg = default(DatabaseID);
				((DatabaseID)(ref arg))..ctor(modId, num);
				Func<DatabaseID, bool> func;
				switch (assetType)
				{
				case assetType.Ability:
					func = CheckCombatID;
					break;
				case assetType.Prop:
					func = CheckCharacterPropID;
					break;
				default:
					return id;
				}
				if (func(arg))
				{
					while (func(arg))
					{
						Debug.LogError((object)$"Duplicate ID: {num} with mod ID: {modId}");
						num++;
						((DatabaseID)(ref arg))..ctor(modId, num);
					}
					Debug.LogError((object)$"Found a compatible ID: {num} with mod ID: {modId}");
					return num;
				}
				return id;
			}
		}

		public enum assetType
		{
			Prop,
			Ability
		}

		public static string comment;

		public static AssetBundle bundle;

		public static void SetClothItems(GameObject cloth, CharacterItem item, PropItemData data, LandfallContentDatabase db)
		{
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("ColorableProjParticle"))
			{
				cloth.AddComponent<ColorableProj>().MaterialChangeType = ColorableProj.ChangeType.Particle;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("ColorableProjModel"))
			{
				cloth.AddComponent<ColorableProj>().MaterialChangeType = ColorableProj.ChangeType.Model;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderBoxRight"))
			{
				cloth.AddComponent<DynamicBoxWeapon>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderBoxRight"))
			{
				cloth.AddComponent<DynamicBoxWeapon>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderBoxLeft"))
			{
				cloth.AddComponent<DynamicBoxWeapon>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxHands"))
			{
				cloth.AddComponent<DynamicBoxProp>();
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxLegs"))
			{
				cloth.AddComponent<DynamicBoxProp>();
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxFeet"))
			{
				cloth.AddComponent<DynamicBoxProp>();
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxArms"))
			{
				cloth.AddComponent<DynamicBoxProp>();
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleHead"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.Head;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleNeck"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.Neck;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleTorso"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.Torso;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleLegLeft"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.LegLeft;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleLegRight"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.LegRight;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleFootLeft"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.FootLeft;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleFootRight"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.FootRight;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleLeftHand"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.LeftHand;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleRightHand"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.RightHand;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleLeftArm"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.LeftArm;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleRightArm"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.RightArm;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RigScaleHip"))
			{
				cloth.AddComponent<SmartRigScaleSizing>().rigType = SmartRigScaleSizing.RigType.Hip;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartWeaponScalingLeft"))
			{
				cloth.AddComponent<SmartWeaponScaling>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartWeaponScalingRight"))
			{
				cloth.AddComponent<SmartWeaponScaling>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartOnHitEffect"))
			{
				cloth.AddComponent<SmartOnHitEffect>().explosions = (GameObject[])(object)new GameObject[9]
				{
					Utility.LoadBundleGameObject("E_GroundExplosionTI"),
					Utility.LoadBundleGameObject("E_FireExplosionTI"),
					Utility.LoadBundleGameObject("E_IceExplosionTI"),
					Utility.LoadBundleGameObject("E_GunpowderExplosionTI"),
					Utility.LoadBundleGameObject("E_ThorHammerLightningExplosionTI"),
					Utility.LoadBundleGameObject("E_ReaperExplosionTI"),
					Utility.LoadBundleGameObject("E_ChronotimeExplosionTI"),
					Utility.LoadBundleGameObject("E_EFBluefireExplosionTI"),
					Utility.LoadBundleGameObject("E_EFEvilSwordExplosionTI")
				};
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartProjSetLeft"))
			{
				cloth.AddComponent<SmartProjSet>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartProjSetRight"))
			{
				cloth.AddComponent<SmartProjSet>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("ForcePointAddReaperScytheEffect"))
			{
				cloth.AddComponent<ForcePointAddReaperScytheEffect>().trailObject = Utility.LoadBundleGameObject("ReaperParticleTI");
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartLeftMeleeSet"))
			{
				cloth.AddComponent<SmartMeleeSet>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartRightMeleeSet"))
			{
				cloth.AddComponent<SmartMeleeSet>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartLeftRangedSet"))
			{
				cloth.AddComponent<SmartRangedSet>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartRightRangedSet"))
			{
				cloth.AddComponent<SmartRangedSet>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartLeftMagSet"))
			{
				cloth.AddComponent<SmartMagSet>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartRightMagSet"))
			{
				cloth.AddComponent<SmartMagSet>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartWeaponWeightingLeft"))
			{
				cloth.AddComponent<SmartWeaponRigidbodyChange>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SmartWeaponWeightingRight"))
			{
				cloth.AddComponent<SmartWeaponRigidbodyChange>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingUpRotationLeft"))
			{
				SmartWeaponHoldingChange smartWeaponHoldingChange = cloth.AddComponent<SmartWeaponHoldingChange>();
				smartWeaponHoldingChange.right = false;
				smartWeaponHoldingChange.holdingChangeType = SmartWeaponHoldingChange.HoldingChangeType.UpRotation;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingForwardRotationLeft"))
			{
				SmartWeaponHoldingChange smartWeaponHoldingChange2 = cloth.AddComponent<SmartWeaponHoldingChange>();
				smartWeaponHoldingChange2.right = false;
				smartWeaponHoldingChange2.holdingChangeType = SmartWeaponHoldingChange.HoldingChangeType.ForwardRotation;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingRelativePositionLeft"))
			{
				SmartWeaponHoldingChange smartWeaponHoldingChange3 = cloth.AddComponent<SmartWeaponHoldingChange>();
				smartWeaponHoldingChange3.right = false;
				smartWeaponHoldingChange3.holdingChangeType = SmartWeaponHoldingChange.HoldingChangeType.RelativePosition;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingUpRotationRight"))
			{
				SmartWeaponHoldingChange smartWeaponHoldingChange4 = cloth.AddComponent<SmartWeaponHoldingChange>();
				smartWeaponHoldingChange4.right = true;
				smartWeaponHoldingChange4.holdingChangeType = SmartWeaponHoldingChange.HoldingChangeType.UpRotation;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingForwardRotationRight"))
			{
				SmartWeaponHoldingChange smartWeaponHoldingChange5 = cloth.AddComponent<SmartWeaponHoldingChange>();
				smartWeaponHoldingChange5.right = true;
				smartWeaponHoldingChange5.holdingChangeType = SmartWeaponHoldingChange.HoldingChangeType.ForwardRotation;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingRelativePositionRight"))
			{
				SmartWeaponHoldingChange smartWeaponHoldingChange6 = cloth.AddComponent<SmartWeaponHoldingChange>();
				smartWeaponHoldingChange6.right = true;
				smartWeaponHoldingChange6.holdingChangeType = SmartWeaponHoldingChange.HoldingChangeType.RelativePosition;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("ForceSkinChange"))
			{
				cloth.AddComponent<ForcedSkinnedChanges>();
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("MeleeTrailLeft"))
			{
				cloth.AddComponent<MeleeTrail>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("MeleeTrailRight"))
			{
				cloth.AddComponent<MeleeTrail>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("SkinChanges"))
			{
				cloth.AddComponent<SkinnedChanges>();
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("AlwaysOpenedEyes"))
			{
				cloth.AddComponent<EyeKeepOpened>();
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RemoveRightWParticles"))
			{
				cloth.AddComponent<RemoveWeaponParticles>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RemoveLeftWParticles"))
			{
				cloth.AddComponent<RemoveWeaponParticles>().right = false;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RemoveRightWProj"))
			{
				cloth.AddComponent<RemoveWeaponProjectiles>().right = true;
			}
			if ((Object)(object)cloth == (Object)(object)UPool.MyPool.GetObject("RemoveLefttWProj"))
			{
				cloth.AddComponent<RemoveWeaponProjectiles>().right = false;
			}
		}

		public static void SetMovesItems(GameObject move, LandfallContentDatabase db)
		{
			//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_069c: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0776: Unknown result type (might be due to invalid IL or missing references)
			//IL_0790: Unknown result type (might be due to invalid IL or missing references)
			//IL_07aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c4: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("MeleeAddStick"))
			{
				move.AddComponent<MeleeAddStick>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("MeleeHitFaster"))
			{
				move.AddComponent<MeleeHitFaster>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("SetProjHoming"))
			{
				move.AddComponent<ChangeProjectileHoming>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("UnbindVehicleHealth"))
			{
				move.AddComponent<BindSiegeHealth>().HealthBindType = BindSiegeHealth.BindType.UnbindVehicleHealth;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("UnbindRiderHealth"))
			{
				move.AddComponent<BindSiegeHealth>().HealthBindType = BindSiegeHealth.BindType.UnbindRiderHealth;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("BindVehicleHealth"))
			{
				move.AddComponent<BindSiegeHealth>().HealthBindType = BindSiegeHealth.BindType.BindVehicleHealth;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("BindRiderHealth"))
			{
				move.AddComponent<BindSiegeHealth>().HealthBindType = BindSiegeHealth.BindType.BindRiderHealth;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("SummonRider"))
			{
				move.AddComponent<GetAndDeleteRider>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("MultiplyRangedDelay"))
			{
				move.AddComponent<RangedDelayChanges>().amount = 2f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HalvesRangedDelay"))
			{
				move.AddComponent<RangedDelayChanges>().amount = 0.5f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NullifyAllDelay"))
			{
				move.AddComponent<NullifyAllDelay>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("KeepNormalUnitColorInstance"))
			{
				move.AddComponent<KeepNormalUnitColorInstance>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("AbilityRemoveSound"))
			{
				move.AddComponent<AbilityRemoveSound>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("DoublesMeleeKnockback"))
			{
				move.AddComponent<TransformAddDelay>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("DoublesMeleeKnockback"))
			{
				move.AddComponent<EditAllMeleeWeapon>().knockbackM = 2f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HalvesMeleeKnockback"))
			{
				move.AddComponent<EditAllMeleeWeapon>().knockbackM = 0.5f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("DoublesMeleeScreenshake"))
			{
				move.AddComponent<EditAllMeleeWeapon>().screenShakeM = 2f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HalvesMeleeScreenshake"))
			{
				move.AddComponent<EditAllMeleeWeapon>().screenShakeM = 0.5f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HideAbilityModel"))
			{
				move.AddComponent<AddDestroyAbilityChildRenderer>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("DoublesUnitSpawning"))
			{
				move.AddComponent<DoublesSpawnerAmount>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TornadoDisables"))
			{
				move.AddComponent<RemoveTurnado>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NulifyHead"))
			{
				move.AddComponent<NulifyBodyParts>().bodyPartType = NulifyBodyParts.BodyPart.Head;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NulifyLeftHand"))
			{
				move.AddComponent<NulifyBodyParts>().bodyPartType = NulifyBodyParts.BodyPart.LeftArm;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NulifyRightHand"))
			{
				move.AddComponent<NulifyBodyParts>().bodyPartType = NulifyBodyParts.BodyPart.RightArm;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HalvesWeaponSwingforce"))
			{
				move.AddComponent<EditAllMeleeWeapon>().curveForceM = 0.5f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("DoublesWeaponSwingforce"))
			{
				move.AddComponent<EditAllMeleeWeapon>().curveForceM = 2f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NulifyWeaponSwingforce"))
			{
				move.AddComponent<EditAllMeleeWeapon>().curveForceM = 0f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HalvesWeaponRecoil"))
			{
				move.AddComponent<EditAllRangeWeapon>().recoilM = 0.5f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("DoublesWeaponRecoil"))
			{
				move.AddComponent<EditAllRangeWeapon>().recoilM = 2f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NulifyWeaponRecoil"))
			{
				move.AddComponent<EditAllRangeWeapon>().recoilM = 0f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HalvesProjectileScale"))
			{
				move.AddComponent<ChangeProjectileScale>().scaleM = 0.5f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("DoublesProjectileScale"))
			{
				move.AddComponent<ChangeProjectileScale>().scaleM = 2f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("WeaponHalvedRange"))
			{
				move.AddComponent<WeaponRangeHalves>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRiderWhenDies"))
			{
				move.AddComponent<GetAndDeleteRider>();
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].conditionType = (ConditionType)5;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("HalvesProjectiles"))
			{
				move.AddComponent<HalvesProjectiles>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("MultiplyProjectiles"))
			{
				move.AddComponent<MultiplyProjectiles>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NoFallDamage"))
			{
				move.AddComponent<NoFallDamage>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("StandStill"))
			{
				move.AddComponent<StandStill>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("FusionWithRider"))
			{
				move.AddComponent<GetAndDeleteRider>();
				move.AddComponent<FusionMechanic>();
				move.GetComponentInChildren<UnitSpawner>().destroyroot = false;
				move.GetComponentInChildren<UnitSpawner>().transferHp = false;
				move.GetComponentInChildren<UnitSpawner>().switchIfRanged = true;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("WeaponDoubledRange"))
			{
				move.AddComponent<WeaponRangeDoubler>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("MeleeAddDash"))
			{
				move.AddComponent<AddMeleeDash>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("MeleeAddDissarm"))
			{
				move.AddComponent<AddMeleeDissarm>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("MeleeAddBlink"))
			{
				move.AddComponent<AddMeleeBlinks>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("WeaponSwapWhenBelowHalf"))
			{
				move.AddComponent<SwapDistanceHalf>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("WeaponSwapWhenTargetDistance"))
			{
				move.AddComponent<SwapDistanceBase>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("AlwaysTansferHP"))
			{
				move.AddComponent<TransferHPEnable>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("NeverShowHealthBar"))
			{
				move.AddComponent<NeverShowHealthBar>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRiderWhenHealthHalfCondition"))
			{
				move.AddComponent<GetAndDeleteRider>();
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].conditionType = (ConditionType)12;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].value = 0.5f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRiderWhenHealthQuarterCondition"))
			{
				move.AddComponent<GetAndDeleteRider>();
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].conditionType = (ConditionType)12;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].value = 0.25f;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRiderWhenTargetFarCondition"))
			{
				move.AddComponent<GetAndDeleteRider>();
				move.GetComponentInChildren<UnitSpawner>().transferHp = false;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRiderWhenTargetCloseCondition"))
			{
				move.AddComponent<GetAndDeleteRider>();
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].conditionType = (ConditionType)1;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].whichRange = (WhichRange)0;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].rangeType = (RangeType)0;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].valueType = (ValueType)1;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].onlyCountWhenUnitInRange = false;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].alwaysResetCounter = false;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].cooldownRange = 10f;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].counter = 3f;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions[0].value = 10f;
				move.GetComponentInChildren<UnitSpawner>().transferHp = false;
				move.GetComponentInChildren<UnitSpawner>().switchIfRanged = true;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRider10SecondsCondition"))
			{
				move.AddComponent<GetAndDeleteRider>();
				move.AddComponent<DeadDeleteThisObject>();
				move.GetComponentInChildren<ConditionalEvent>().events[0].delay = 10f;
				move.GetComponentInChildren<ConditionalEvent>().events[0].conditions = null;
				move.GetComponentInChildren<ConditionalEvent>().ignoreDead = false;
				move.GetComponentInChildren<UnitSpawner>().transferHp = false;
				move.GetComponentInChildren<UnitSpawner>().switchIfRanged = true;
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRiderChronoCondition"))
			{
				move.AddComponent<GetAndDeleteRider>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("TransformToRiderDarkKingCondition"))
			{
				move.AddComponent<GetAndDeleteRider>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("AdaptiveOrbCasting"))
			{
				move.AddComponent<AdaptiveCasting>().spookySwords = move.GetComponentInChildren<SpookySwords>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("AdaptiveSwordCasting"))
			{
				move.AddComponent<AdaptiveCasting>().spookySwords = move.GetComponentInChildren<SpookySwords>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("AdaptivePirateQueenThrow"))
			{
				move.AddComponent<AdaptiveThrow>();
			}
			if ((Object)(object)move == (Object)(object)UPool.MyPool.GetObject("AdaptiveSenseiBurstThrow"))
			{
				ParticleSystem[] componentsInChildren = move.GetComponentsInChildren<ParticleSystem>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].startSize = 1.6f;
				}
				move.AddComponent<AdaptiveBurst>();
			}
		}

		public static void Init(LandfallContentDatabase db)
		{
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			comment = "Static Variable";
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			LoadBundle("techitemsbundle");
			Sprite val = Utility.LoadBundleTextureToSprite("icon_technicalitems");
			GameObject val2 = Utility.LoadBundleGameObject("Move_EmptyAbility");
			GameObject val3 = Utility.LoadBundleGameObject("EmptyPropTechItem");
			GameObject val4 = Utility.LoadBundleGameObject("Move_EmptySpawner");
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			comment = "Custom Clothes";
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleHead", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100978), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleNeck", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100979), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleTorso", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100980), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleLegLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100981), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleLegRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100982), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleFootLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100983), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleFootRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100984), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleLeftHand", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100985), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleRightHand", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100986), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleLeftArm", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100987), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleRightArm", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100988), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RigScaleHip", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100989), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartOnHitEffect", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100990), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("ColorableProjModel", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100991), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("ColorableProjParticle", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100992), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("ForcePointAddReaperScytheEffect", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100993), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxHead", Utility.LoadBundleGameObject("AddPlaceholderBoxHead"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100994), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxNeck", Utility.LoadBundleGameObject("AddPlaceholderBoxNeck"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100995), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxTorso", Utility.LoadBundleGameObject("AddPlaceholderBoxTorso"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100997), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderBoxLeft", Utility.LoadBundleGameObject("AddPlaceholderBoxWeapon"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100996), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxArms", Utility.LoadBundleGameObject("AddPlaceholderBoxArms"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100998), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderBoxRight", Utility.LoadBundleGameObject("AddPlaceholderBoxWeapon"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10100999), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxHands", Utility.LoadBundleGameObject("AddPlaceholderBoxHands"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101001), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxWaist", Utility.LoadBundleGameObject("AddPlaceholderBoxWaist"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101002), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxLegs", Utility.LoadBundleGameObject("AddPlaceholderBoxLegs"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101003), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxFeet", Utility.LoadBundleGameObject("AddPlaceholderBoxFeet"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101004), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("ForceSkinChange", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101005), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MeleeTrailLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101006), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MeleeTrailRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101007), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SkinChanges", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101008), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AlwaysOpenedEyes", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 10101009), true), "Technical Items", (TagType)0);
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			comment = "Right Weapons";
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartWeaponScalingRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101010), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RemoveRightWParticles", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101011), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RemoveRightWProj", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101012), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartWeaponWeightingLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101017), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponHoldingUpRotationLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101018), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponHoldingForwardRotationLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101019), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponHoldingRelativePositionLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101020), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartRightMagSet", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101021), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartRightRangedSet", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101022), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartRightMeleeSet", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101023), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartProjSetRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 40101024), true), "Technical Items", (TagType)0);
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			comment = "Left Weapons";
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartWeaponScalingLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 20101010), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RemoveLeftWParticles", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 20202024), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("RemoveLeftWProj", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 20202025), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartWeaponWeightingRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101017), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponHoldingUpRotationRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101018), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponHoldingForwardRotationRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101019), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponHoldingRelativePositionRight", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101020), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartLeftMagSet", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101021), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartLeftRangedSet", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101022), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartLeftMeleeSet", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101023), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SmartProjSetLeft", val3, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Prop, 50101024), true), "Technical Items", (TagType)0);
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			comment = "Technical Abilities";
			comment = "----------------------------------------------------------------------------------------------------------------------------";
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HideAbilityModel", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303001), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("DoublesUnitSpawning", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303002), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TornadoDisables", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303003), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NulifyHead", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303004), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NulifyLeftHand", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303005), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NulifyRightHand", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303006), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HalvesWeaponSwingforce", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303007), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("DoublesWeaponSwingforce", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303008), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NulifyWeaponSwingforce", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303009), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HalvesWeaponRecoil", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303010), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("DoublesWeaponRecoil", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303011), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NulifyWeaponRecoil", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303012), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HalvesProjectileScale", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303013), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("DoublesProjectileScale", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303014), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponHalvedRange", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303015), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRiderWhenDies", val4, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303016), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HalvesProjectiles", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303017), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MultiplyProjectiles", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303018), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NoFallDamage", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303019), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("StandStill", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303020), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("FusionWithRider", val4, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303021), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponDoubledRange", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303022), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MeleeAddDash", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303023), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MeleeAddDissarm", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303024), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MeleeAddBlink", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303025), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponSwapWhenBelowHalf", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303026), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("WeaponSwapWhenTargetDistance", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303027), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AlwaysTansferHP", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303028), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NeverShowHealthBar", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303029), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRiderWhenTargetFarCondition", val4, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303030), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRiderWhenTargetCloseCondition", val4, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303031), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRider10SecondsCondition", val4, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303032), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRiderChronoCondition", Utility.LoadBundleGameObject("TransformToRiderChronoCondition"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303033), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRiderDarkKingCondition", Utility.LoadBundleGameObject("TransformToRiderDarkKingCondition"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303034), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRiderWhenHealthHalfCondition", val4, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303036), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformToRiderWhenHealthQuarterCondition", val4, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303037), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AdaptivePirateQueenThrow", Utility.LoadBundleGameObject("AdaptivePirateQueenThrow"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303038), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AdaptiveSenseiBurstThrow", Utility.LoadBundleGameObject("AdaptiveSenseiBurstThrow"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303035), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("DoublesMeleeKnockback", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303039), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HalvesMeleeKnockback", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303040), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("DoublesMeleeScreenshake", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303041), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HalvesMeleeScreenshake", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303042), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AdaptiveOrbCasting", Utility.LoadBundleGameObject("AdaptiveOrbCasting"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303043), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AdaptiveSwordCasting", Utility.LoadBundleGameObject("AdaptiveSwordCasting"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303044), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("TransformAddDelay", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303045), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("AbilityRemoveSound", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303046), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("KeepNormalUnitColorInstance", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303047), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("NullifyAllDelay", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303048), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MultiplyRangedDelay", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303049), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("HalvesRangedDelay", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303050), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SummonRider", Utility.LoadBundleGameObject("Move_SpawnRider"), true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303051), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("UnbindVehicleHealth", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303052), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("UnbindRiderHealth", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303053), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("BindVehicleHealth", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303054), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("BindRiderHealth", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303055), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("SetProjHoming", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303056), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MeleeHitFaster", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303057), true), "Technical Items", (TagType)0);
			Utility.ItemCategorizer.SetTag(UPool.MyPool.AddObject("MeleeAddStick", val2, true, (HideFlags)52, val, Utility.IDChecker(db, assetType.Ability, 30303058), true), "Technical Items", (TagType)0);
		}

		public static void LoadBundle(string assetBundleName)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(assetBundleName);
			bundle = AssetBundle.LoadFromStream(stream);
		}
	}
	[BepInPlugin("GeeztJeez.Technicalitems", "TechnicalItems", "1.0.10")]
	internal class Loader : BaseUnityPlugin
	{
		private void Awake()
		{
			((MonoBehaviour)this).StartCoroutine("Call");
		}

		private IEnumerator Call()
		{
			yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)Object.FindObjectOfType<ServiceLocator>() != (Object)null));
			yield return (object)new WaitUntil((Func<bool>)(() => ServiceLocator.GetService<ISaveLoaderService>() != null));
			Debug.Log((object)"Loading TechnicalItems...");
			SLMALoader.GetInstance();
			LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase;
			UManager.Init(landfallContentDatabase);
			new Harmony("TechnicalItems").PatchAll();
			GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>();
			for (int i = 0; i < array.Length; i++)
			{
				if (Object.op_Implicit((Object)(object)array[i].GetComponent<SpecialAbility>()))
				{
					UManager.SetMovesItems(array[i], landfallContentDatabase);
				}
				if (Object.op_Implicit((Object)(object)array[i].GetComponent<PropItem>()))
				{
					UManager.SetClothItems(array[i], array[i].GetComponent<CharacterItem>(), array[i].GetComponent<PropItemData>(), landfallContentDatabase);
				}
			}
			Debug.Log((object)"Loaded TechnicalItems Successfully!");
		}
	}
}
namespace TIComponents
{
	public class RemoveSkinnedMeshes : MonoBehaviour
	{
		private void Start()
		{
			SkinnedMeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				if (((Object)((Component)componentsInChildren[i]).gameObject).name.Contains("LOD"))
				{
					Object.Destroy((Object)(object)((Component)componentsInChildren[i]).gameObject);
				}
			}
		}
	}
	public class AddVanillaCompatibility : MonoBehaviour
	{
		private void Start()
		{
			UManager.comment = "I tried, it was worth trying but didn't worth as much as having blood and extremely painful headache :(";
		}

		private void Update()
		{
			if (((Component)this).gameObject.tag.EndsWith("(TI)"))
			{
				Debug.Log((object)("Verified Tag is " + ((Component)this).gameObject.tag));
				Debug.Log((object)"Adding Permanent Script to unit!");
			}
			else
			{
				Debug.Log((object)("Undetected Tag is " + ((Component)this).gameObject.tag));
			}
		}
	}
	public class ScaleWeapon : MonoBehaviour
	{
		private Unit unit;

		public bool right;

		public float scaleMultiplier;

		private void Start()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			if (right)
			{
				Transform transform = ((Component)unit.data.weaponHandler.rightWeapon).gameObject.transform;
				transform.localScale *= scaleMultiplier;
			}
			if (!right)
			{
				Transform transform2 = ((Component)unit.data.weaponHandler.leftWeapon).gameObject.transform;
				transform2.localScale *= scaleMultiplier;
			}
		}
	}
	public class RemoveWeaponParticles : MonoBehaviour
	{
		private Unit unit;

		private Weapon weapon;

		public bool right;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			if (right)
			{
				weapon = unit.data.weaponHandler.rightWeapon;
			}
			if (!right)
			{
				weapon = unit.data.weaponHandler.leftWeapon;
			}
			ParticleSystem[] componentsInChildren = ((Component)weapon).gameObject.GetComponentsInChildren<ParticleSystem>();
			foreach (ParticleSystem obj in componentsInChildren)
			{
				Object.Destroy((Object)(object)((Component)obj).gameObject.GetComponentInChildren<ParticleSystemRenderer>());
				Object.Destroy((Object)(object)obj);
			}
		}
	}
	public class RemoveWeaponProjectiles : MonoBehaviour
	{
		private Unit unit;

		private Weapon weapon;

		public bool right;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			if (right)
			{
				weapon = unit.data.weaponHandler.rightWeapon;
			}
			if (!right)
			{
				weapon = unit.data.weaponHandler.leftWeapon;
			}
			if (Object.op_Implicit((Object)(object)((Component)weapon).gameObject.GetComponentInChildren<RangeWeapon>()))
			{
				((Component)weapon).gameObject.GetComponentInChildren<RangeWeapon>().ObjectToSpawn = null;
				((Component)weapon).gameObject.GetComponentInChildren<RangeWeapon>().unitToSpawn = null;
			}
		}
	}
	public class GetAndDeleteRider : MonoBehaviour
	{
		private UnitSpawner unitSpawner;

		private void Start()
		{
			GameObject obj = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<RiderHolder>().riders[0];
			UnitBlueprint unitBlueprint = obj.GetComponentInChildren<Unit>().unitBlueprint;
			unitSpawner = ((Component)this).gameObject.GetComponentInChildren<UnitSpawner>();
			unitSpawner.unitBlueprint = unitBlueprint;
			unitSpawner.rangedUnitBlueprint = unitBlueprint;
			Object.Destroy((Object)(object)obj.gameObject);
		}
	}
	public class AdaptiveBurst : MonoBehaviour
	{
		private Color color;

		private Unit unit;

		private RangeWeapon[] rangeWeapons;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
		}

		private void Update()
		{
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Expected O, but got Unknown
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Expected O, but got Unknown
			rangeWeapons = ((Component)unit).gameObject.GetComponentsInChildren<RangeWeapon>();
			if (rangeWeapons.Length != 0)
			{
				int num = Random.Range(0, rangeWeapons.Length);
				SpawnObject[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<SpawnObject>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].objectToSpawn = rangeWeapons[num].ObjectToSpawn;
				}
				Renderer[] componentsInChildren2 = rangeWeapons[num].ObjectToSpawn.GetComponentsInChildren<Renderer>();
				foreach (Renderer val in componentsInChildren2)
				{
					color = val.material.color;
				}
				ParticleSystem[] componentsInChildren3 = ((Component)this).GetComponentsInChildren<ParticleSystem>();
				for (int k = 0; k < componentsInChildren3.Length; k++)
				{
					componentsInChildren3[k].startColor = color;
				}
				ParticleSystemRenderer[] componentsInChildren4 = ((Component)this).GetComponentsInChildren<ParticleSystemRenderer>();
				foreach (ParticleSystemRenderer obj in componentsInChildren4)
				{
					((Renderer)obj).material = new Material(((Renderer)obj).material)
					{
						color = color
					};
					obj.trailMaterial = new Material(obj.trailMaterial)
					{
						color = color
					};
				}
			}
		}
	}
	public class AdaptiveThrow : MonoBehaviour
	{
		private Unit unit;

		private RangeWeapon[] rangeWeapons;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
		}

		private void Update()
		{
			rangeWeapons = ((Component)unit).gameObject.GetComponentsInChildren<RangeWeapon>();
			if (rangeWeapons.Length != 0)
			{
				int num = Random.Range(0, rangeWeapons.Length);
				SpawnObject[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<SpawnObject>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].objectToSpawn = rangeWeapons[num].ObjectToSpawn;
				}
			}
		}
	}
	public class NeverShowHealthBar : MonoBehaviour
	{
		private Unit unit;

		public void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
		}

		public void Update()
		{
			unit.SetHealthBarActive(false);
		}
	}
	public class EyeKeepOpened : MonoBehaviour
	{
		public void Update()
		{
			try
			{
				GooglyEye[] componentsInChildren = ((Component)((Component)this).gameObject.transform.root).GetComponentsInChildren<GooglyEye>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].SetState((EyeState)0);
				}
			}
			catch (Exception)
			{
				Debug.LogWarning((object)"No eye detected");
			}
		}
	}
	public class TransferHPEnable : MonoBehaviour
	{
		private Unit unit;

		public void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
		}

		public void Update()
		{
			UnitSpawner[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<UnitSpawner>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				componentsInChildren[i].transferHp = true;
			}
		}
	}
	public class SwapDistanceBase : MonoBehaviour
	{
		private HoldingHandler holdingHandler;

		private Unit unit;

		private bool swapped;

		private GameObject leftObject;

		private Holdable leftObjectHoldable;

		private GameObject rightObject;

		private Holdable rightObjectHoldable;

		private WeaponHandler WeaponHandler;

		public void Start()
		{
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
			if (!Object.op_Implicit((Object)(object)unit))
			{
				return;
			}
			WeaponHandler = unit.WeaponHandler;
			holdingHandler = unit.holdingHandler;
			if (!Object.op_Implicit((Object)(object)holdingHandler))
			{
				return;
			}
			if (Object.op_Implicit((Object)(object)holdingHandler.rightObject))
			{
				rightObject = ((Component)holdingHandler.rightObject).gameObject;
				rightObjectHoldable = holdingHandler.rightObject;
			}
			if (Object.op_Implicit((Object)(object)holdingHandler.leftObject))
			{
				leftObject = ((Component)holdingHandler.leftObject).gameObject;
				leftObjectHoldable = holdingHandler.leftObject;
				holdingHandler.LetGoOfWeapon(leftObject);
				if (Object.op_Implicit((Object)(object)holdingHandler.rightObject))
				{
					holdingHandler.leftObject = holdingHandler.rightObject;
					holdingHandler.leftHandActivity = (HandActivity)1;
				}
				Scaler(leftObject, Vector3.zero);
			}
		}

		public void Update()
		{
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			float num = 5f;
			if (Object.op_Implicit((Object)(object)unit))
			{
				if (!Object.op_Implicit((Object)(object)rightObject))
				{
					rightObject = ((Component)holdingHandler.rightObject).gameObject;
					rightObjectHoldable = holdingHandler.rightObject;
				}
				if (!Object.op_Implicit((Object)(object)leftObject))
				{
					leftObject = ((Component)holdingHandler.leftObject).gameObject;
					leftObjectHoldable = holdingHandler.leftObject;
					holdingHandler.LetGoOfWeapon(leftObject);
					if (Object.op_Implicit((Object)(object)holdingHandler.rightObject))
					{
						holdingHandler.leftObject = holdingHandler.rightObject;
						holdingHandler.leftHandActivity = (HandActivity)1;
					}
					Scaler(leftObject, Vector3.zero);
				}
			}
			if (Object.op_Implicit((Object)(object)unit.data.targetData) && !unit.data.Dead)
			{
				if (Vector3.Distance(unit.data.mainRig.position, unit.data.targetData.mainRig.position) <= num && !swapped)
				{
					WeaponSwap(SwapToLeft: true);
					swapped = true;
				}
				else if (Vector3.Distance(unit.data.mainRig.position, unit.data.targetData.mainRig.position) > num && swapped)
				{
					WeaponSwap(SwapToLeft: false);
					swapped = false;
				}
			}
		}

		public void WeaponSwap(bool SwapToLeft)
		{
			//IL_009a: 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_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)leftObject != (Object)null) || !((Object)(object)rightObject != (Object)null))
			{
				return;
			}
			if (SwapToLeft)
			{
				holdingHandler.LetGoOfWeapon(rightObject);
				holdingHandler.GrabObject(leftObjectHoldable, true, true, (Action)delegate
				{
				});
				if (Object.op_Implicit((Object)(object)holdingHandler.leftObject))
				{
					holdingHandler.rightObject = holdingHandler.leftObject;
				}
				Scaler(rightObject, Vector3.zero);
				Scaler(leftObject, Vector3.one);
				holdingHandler.leftHandActivity = (HandActivity)1;
				holdingHandler.rightHandActivity = (HandActivity)1;
				WeaponHandler.SetWeapon(leftObject.GetComponentInChildren<Weapon>(), (HandType)0);
			}
			else if (!SwapToLeft)
			{
				holdingHandler.LetGoOfWeapon(leftObject);
				holdingHandler.GrabObject(rightObjectHoldable, true, true, (Action)delegate
				{
				});
				if (Object.op_Implicit((Object)(object)holdingHandler.leftObject))
				{
					holdingHandler.leftObject = holdingHandler.rightObject;
				}
				Scaler(rightObject, Vector3.one);
				Scaler(leftObject, Vector3.zero);
				holdingHandler.leftHandActivity = (HandActivity)1;
				holdingHandler.rightHandActivity = (HandActivity)1;
				WeaponHandler.SetWeapon(rightObject.GetComponentInChildren<Weapon>(), (HandType)0);
			}
		}

		public void Scaler(GameObject basedGameObject, Vector3 scale)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			basedGameObject.transform.localScale = scale;
		}
	}
	public class SwapDistanceHalf : MonoBehaviour
	{
		private HoldingHandler holdingHandler;

		private Unit unit;

		private bool swapped;

		private GameObject leftObject;

		private Holdable leftObjectHoldable;

		private GameObject rightObject;

		private Holdable rightObjectHoldable;

		private WeaponHandler WeaponHandler;

		public void Start()
		{
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
			if (!Object.op_Implicit((Object)(object)unit))
			{
				return;
			}
			WeaponHandler = unit.WeaponHandler;
			holdingHandler = unit.holdingHandler;
			if (!Object.op_Implicit((Object)(object)holdingHandler))
			{
				return;
			}
			if (Object.op_Implicit((Object)(object)holdingHandler.rightObject))
			{
				rightObject = ((Component)holdingHandler.rightObject).gameObject;
				rightObjectHoldable = holdingHandler.rightObject;
			}
			if (Object.op_Implicit((Object)(object)holdingHandler.leftObject))
			{
				leftObject = ((Component)holdingHandler.leftObject).gameObject;
				leftObjectHoldable = holdingHandler.leftObject;
				holdingHandler.LetGoOfWeapon(leftObject);
				if (Object.op_Implicit((Object)(object)holdingHandler.rightObject))
				{
					holdingHandler.leftObject = holdingHandler.rightObject;
					holdingHandler.leftHandActivity = (HandActivity)1;
				}
				Scaler(leftObject, Vector3.zero);
			}
		}

		public void Update()
		{
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			float num = unit.data.maxHealth * 0.5f;
			if (Object.op_Implicit((Object)(object)unit))
			{
				if (!Object.op_Implicit((Object)(object)rightObject))
				{
					rightObject = ((Component)holdingHandler.rightObject).gameObject;
					rightObjectHoldable = holdingHandler.rightObject;
				}
				if (!Object.op_Implicit((Object)(object)leftObject))
				{
					leftObject = ((Component)holdingHandler.leftObject).gameObject;
					leftObjectHoldable = holdingHandler.leftObject;
					holdingHandler.LetGoOfWeapon(leftObject);
					if (Object.op_Implicit((Object)(object)holdingHandler.rightObject))
					{
						holdingHandler.leftObject = holdingHandler.rightObject;
						holdingHandler.leftHandActivity = (HandActivity)1;
					}
					Scaler(leftObject, Vector3.zero);
				}
			}
			if (Object.op_Implicit((Object)(object)unit.data.targetData) && !unit.data.Dead)
			{
				if (unit.data.health <= num && !swapped)
				{
					WeaponSwap(SwapToLeft: true);
					swapped = true;
				}
				else if (Vector3.Distance(unit.data.mainRig.position, unit.data.targetData.mainRig.position) > num && swapped)
				{
					WeaponSwap(SwapToLeft: false);
					swapped = false;
				}
			}
		}

		public void WeaponSwap(bool SwapToLeft)
		{
			//IL_009a: 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_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)leftObject != (Object)null) || !((Object)(object)rightObject != (Object)null))
			{
				return;
			}
			if (SwapToLeft)
			{
				holdingHandler.LetGoOfWeapon(rightObject);
				holdingHandler.GrabObject(leftObjectHoldable, true, true, (Action)delegate
				{
				});
				if (Object.op_Implicit((Object)(object)holdingHandler.leftObject))
				{
					holdingHandler.rightObject = holdingHandler.leftObject;
				}
				Scaler(rightObject, Vector3.zero);
				Scaler(leftObject, Vector3.one);
				holdingHandler.leftHandActivity = (HandActivity)1;
				holdingHandler.rightHandActivity = (HandActivity)1;
				WeaponHandler.SetWeapon(leftObject.GetComponentInChildren<Weapon>(), (HandType)0);
			}
			else if (!SwapToLeft)
			{
				holdingHandler.LetGoOfWeapon(leftObject);
				holdingHandler.GrabObject(rightObjectHoldable, true, true, (Action)delegate
				{
				});
				if (Object.op_Implicit((Object)(object)holdingHandler.leftObject))
				{
					holdingHandler.leftObject = holdingHandler.rightObject;
				}
				Scaler(rightObject, Vector3.one);
				Scaler(leftObject, Vector3.zero);
				holdingHandler.leftHandActivity = (HandActivity)1;
				holdingHandler.rightHandActivity = (HandActivity)1;
				WeaponHandler.SetWeapon(rightObject.GetComponentInChildren<Weapon>(), (HandType)0);
			}
		}

		public void Scaler(GameObject basedGameObject, Vector3 scale)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			basedGameObject.transform.localScale = scale;
		}
	}
	public class AddMeleeBlinks : MonoBehaviour
	{
		private Unit unit;

		private MeleeWeapon[] meleeWeapons;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			meleeWeapons = ((Component)unit).GetComponentsInChildren<MeleeWeapon>();
			MeleeWeapon[] array = meleeWeapons;
			for (int i = 0; i < array.Length; i++)
			{
				List<AttackEffect> list = new List<AttackEffect>(((Weapon)array[i]).attackEffects);
				list.Add((AttackEffect)(object)((Component)array[i]).gameObject.AddComponent<BlinkDagger>());
				((Weapon)array[i]).attackEffects = list.ToArray();
			}
		}
	}
	public class AddMeleeDissarm : MonoBehaviour
	{
		private Unit unit;

		private MeleeWeapon[] meleeWeapons;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			meleeWeapons = ((Component)unit).GetComponentsInChildren<MeleeWeapon>();
			MeleeWeapon[] array = meleeWeapons;
			for (int i = 0; i < array.Length; i++)
			{
				((Component)array[i]).gameObject.AddComponent<MeleeWeaponDissarm>();
			}
		}
	}
	public class AddMeleeDash : MonoBehaviour
	{
		private Unit unit;

		private MeleeWeapon[] meleeWeapons;

		private void Start()
		{
			//IL_00c8: 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)
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			meleeWeapons = ((Component)unit).GetComponentsInChildren<MeleeWeapon>();
			MeleeWeapon[] array = meleeWeapons;
			for (int i = 0; i < array.Length; i++)
			{
				WeaponForceAnimation componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren<WeaponForceAnimation>();
				if (!Object.op_Implicit((Object)(object)componentInChildren))
				{
					List<AttackEffect> list = new List<AttackEffect>(((Weapon)array[i]).attackEffects);
					list.Add((AttackEffect)(object)s.DeepCopyOf<WeaponForceAnimation>(((Component)array[i]).gameObject.AddComponent<WeaponForceAnimation>(), ((GameObject)SLMALoader.SDic["weapons"]["shogunSword"]).GetComponentInChildren<WeaponForceAnimation>()));
					((Weapon)array[i]).attackEffects = list.ToArray();
				}
				else
				{
					s.DeepCopyOf<WeaponForceAnimation>(componentInChildren, ((GameObject)SLMALoader.SDic["weapons"]["shogunSword"]).GetComponentInChildren<WeaponForceAnimation>());
				}
			}
		}
	}
	public class WeaponRangeDoubler : MonoBehaviour
	{
		private Unit unit;

		private Weapon[] weapons;

		private void Start()
		{
			unit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>();
			if ((Object)(object)unit == (Object)null)
			{
				Debug.LogError((object)"Unit not found in hierarchy.");
				return;
			}
			weapons = ((Component)unit).GetComponentsInChildren<Weapon>();
			float num = 0f;
			Weapon[] array = weapons;
			foreach (Weapon val in array)
			{
				val.maxRange *= 2f;
				num += val.maxRange;
			}
			unit.api.UpdateECSValues();
			unit.m_PreferedDistance = num;
		}

		private void Update()
		{
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)unit == (Object)null || unit.data.Dead || (Object)(object)unit.data.targetData == (Object)null || (Object)(object)MainCam.instance == (Object)null)
			{
				return;
			}
			CameraAbilityPossess componentInParent = ((Component)MainCam.instance).GetComponentInParent<CameraAbilityPossess>();
			if (!((Object)(object)componentInParent == (Object)null) && !((Object)(object)componentInParent.currentUnit == (Object)(object)unit) && unit.data.distanceToTarget <= unit.m_PreferedDistance)
			{
				Unit val = unit.data.targetData.unit;
				if ((Object)(object)val != (Object)null)
				{
					unit.Attack(val.data.mainRig.position, val.data.mainRig, Vector3.zero);
				}
			}
		}
	}
	public class FusionMechanic : MonoBehaviour
	{
		private UnitSpawner unitSpawner;

		private Unit unit;

		private Unit rider;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			unitSpawner = ((Component)this).gameObject.GetComponentInChildren<UnitSpawner>();
			rider = unitSpawner.Spawn();
			Object.Destroy((Object)(object)unitSpawner);
		}

		private void Update()
		{
			if (Object.op_Implicit((Object)(object)unit) & Object.op_Implicit((Object)(object)rider))
			{
				MirrorRigs(rider, unit);
			}
		}

		private void MirrorRigs(Unit unit, Unit target)
		{
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			Rigidbody[] allRigs = unit.data.allRigs.AllRigs;
			Rigidbody[] allRigs2 = target.data.allRigs.AllRigs;
			for (int i = 0; i < allRigs.Length; i++)
			{
				if (allRigs.Length == allRigs2.Length)
				{
					((Component)allRigs[i]).transform.position = ((Component)allRigs2[i]).transform.position;
					((Component)allRigs[i]).transform.rotation = ((Component)allRigs2[i]).transform.rotation;
				}
				else
				{
					unit.data.mainRig.position = target.data.mainRig.position;
					unit.data.mainRig.rotation = target.data.mainRig.rotation;
				}
			}
		}
	}
	public class StandStill : MonoBehaviour
	{
		private Unit unit;

		private UnitDontWalkFor unitDontWalkFor;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			unitDontWalkFor = ((Component)unit).gameObject.AddComponent<UnitDontWalkFor>();
			unitDontWalkFor.time = float.PositiveInfinity;
			unitDontWalkFor.Go();
		}

		private void Update()
		{
			unitDontWalkFor.Go();
		}
	}
	public class SkinnedChanges : MonoBehaviour
	{
		private Unit unit;

		private Material curMat;

		private void Start()
		{
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Expected O, but got Unknown
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			curMat = ((Component)this).gameObject.GetComponentInChildren<Renderer>().materials[0];
			if (!Object.op_Implicit((Object)(object)curMat))
			{
				return;
			}
			Renderer[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<Renderer>();
			foreach (Renderer val in componentsInChildren)
			{
				if (((Component)val).tag == "UnitMesh" && (Object)(object)val.materials[0] != (Object)(object)curMat)
				{
					List<Material> list = new List<Material>();
					Material[] materials = val.materials;
					for (int j = 0; j < materials.Length; j++)
					{
						list.Add(new Material(curMat));
					}
					val.materials = list.ToArray();
				}
			}
		}
	}
	public class NoFallDamage : MonoBehaviour
	{
		private Unit unit;

		private UnitDontWalkFor unitDontWalkFor;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
		}

		private void Update()
		{
			if (Object.op_Implicit((Object)(object)unit) && Object.op_Implicit((Object)(object)unit.data))
			{
				unit.data.takeFallDamage = false;
				unit.data.canFall = false;
			}
		}
	}
	public class MeleeTrail : MonoBehaviour
	{
		private Unit unit;

		public bool right;

		public Material curMat;

		private void Start()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			curMat = ((Component)this).gameObject.GetComponentInChildren<Renderer>().materials[0];
			AnimationCurve val = new AnimationCurve();
			val.AddKey(0f, 0f);
			val.AddKey(0.75f, 0.1f);
			val.AddKey(1f, 0f);
			GameObject val2 = ((!right) ? ((Component)unit.data.weaponHandler.leftWeapon).gameObject : ((Component)unit.data.weaponHandler.rightWeapon).gameObject);
			MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				Object.Destroy((Object)(object)componentsInChildren[i]);
			}
			AddTrail(((Component)val2.GetComponentInChildren<ForcePoint>()).gameObject, curMat, val);
		}

		private void AddTrail(GameObject point, Material material, AnimationCurve widthCurve)
		{
			TrailRenderer obj = point.AddComponent<TrailRenderer>();
			obj.time = 0.5f;
			((Renderer)obj).material = material;
			obj.widthCurve = widthCurve;
		}
	}
	public class HalvesProjectiles : MonoBehaviour
	{
		private Unit unit;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
			RangeWeapon[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<RangeWeapon>();
			foreach (RangeWeapon val in componentsInChildren)
			{
				val.numberOfObjects = Halfes(val.numberOfObjects);
				val.maxProjectilesPerFrane = Halfes(val.maxProjectilesPerFrane);
			}
		}

		private int Halfes(int count)
		{
			return (int)Mathf.Round((float)count / 2f);
		}
	}
	public class MultiplyProjectiles : MonoBehaviour
	{
		private Unit unit;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
			RangeWeapon[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<RangeWeapon>();
			foreach (RangeWeapon val in componentsInChildren)
			{
				val.numberOfObjects = Multiply(val.numberOfObjects);
				val.maxProjectilesPerFrane = Multiply(val.maxProjectilesPerFrane);
			}
		}

		private int Multiply(int count)
		{
			return (int)Mathf.Round((float)count * 2f);
		}
	}
	public class ForcedSkinnedChanges : MonoBehaviour
	{
		private Unit unit;

		private Material curMat;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
		}

		private void Update()
		{
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			curMat = ((Renderer)((Component)this).gameObject.GetComponentInChildren<MeshRenderer>()).materials[0];
			if (!Object.op_Implicit((Object)(object)curMat))
			{
				return;
			}
			SkinnedMeshRenderer[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
			foreach (SkinnedMeshRenderer val in componentsInChildren)
			{
				if (!Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponentInParent<PropItem>()) && !Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponentInParent<WeaponItem>()) && !Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponentInParent<CharacterItem>()) && !Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponentInParent<SpecialAbility>()))
				{
					List<Material> list = new List<Material>();
					Material[] materials = ((Renderer)val).materials;
					for (int j = 0; j < materials.Length; j++)
					{
						list.Add(new Material(curMat));
					}
					((Renderer)val).materials = list.ToArray();
				}
			}
		}
	}
	public class WeaponRangeHalves : MonoBehaviour
	{
		private Unit unit;

		private Weapon[] weapons;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			weapons = ((Component)unit).GetComponentsInChildren<Weapon>();
			Weapon[] array = weapons;
			float num = 0f;
			for (int i = 0; i < array.Length; i++)
			{
				Weapon obj = array[i];
				obj.maxRange *= 0.5f;
				num += array[i].maxRange;
				unit.api.UpdateECSValues();
			}
			unit.m_PreferedDistance = num;
		}

		private void Update()
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)unit.data.targetData) && unit.data.distanceToTarget <= unit.m_PreferedDistance)
			{
				Unit val = unit.data.targetData.unit;
				unit.Attack(val.data.mainRig.position, val.data.mainRig, Vector3.zero);
			}
		}
	}
	public class EditAllMeleeWeapon : MonoBehaviour
	{
		private Unit unit;

		public float curveForceM = 1f;

		public float screenShakeM = 1f;

		public float knockbackM = 1f;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			MeleeWeapon[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<MeleeWeapon>();
			foreach (MeleeWeapon obj in componentsInChildren)
			{
				obj.curveForce *= curveForceM;
			}
			CollisionWeapon[] componentsInChildren2 = ((Component)unit).gameObject.GetComponentsInChildren<CollisionWeapon>();
			foreach (CollisionWeapon obj2 in componentsInChildren2)
			{
				obj2.screenShakeMultiplier *= screenShakeM;
				obj2.onImpactForce *= knockbackM;
			}
		}
	}
	public class DoublesSpawnerAmount : MonoBehaviour
	{
		private Unit unit;

		public void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
		}

		public void Update()
		{
			UnitSpawner[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<UnitSpawner>();
			foreach (UnitSpawner obj in componentsInChildren)
			{
				obj.amountToSpawn *= 2;
			}
		}
	}
	public class NulifyBodyParts : MonoBehaviour
	{
		public enum BodyPart
		{
			Head,
			LeftArm,
			RightArm
		}

		public BodyPart bodyPartType;

		private Unit unit;

		private void Start()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
			if (bodyPartType == BodyPart.Head)
			{
				((Component)unit.data.head).gameObject.transform.localScale = Vector3.one * 1E-05f;
			}
			else if (bodyPartType == BodyPart.RightArm)
			{
				((Component)unit.data.rightHand).gameObject.transform.localScale = Vector3.one * 1E-05f;
				((Component)unit.data.rightArm).gameObject.transform.localScale = Vector3.one * 1E-05f;
			}
			else
			{
				((Component)unit.data.leftHand).gameObject.transform.localScale = Vector3.one * 1E-05f;
				((Component)unit.data.leftArm).gameObject.transform.localScale = Vector3.one * 1E-05f;
			}
		}
	}
	public class AddDestroyAbilityChildRenderer : MonoBehaviour
	{
		private Unit unit;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			SpecialAbility[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<SpecialAbility>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				((Component)componentsInChildren[i]).gameObject.AddComponent<DestroyChildRenderer>();
			}
		}
	}
	public class RemoveTurnado : MonoBehaviour
	{
		private Unit unit;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
			SpinToWinBehaviour[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<SpinToWinBehaviour>();
			foreach (SpinToWinBehaviour obj in componentsInChildren)
			{
				obj.turnadoStartEvent = obj.turnadoEndEvent;
			}
		}
	}
	public class DestroyChildRenderer : MonoBehaviour
	{
		private void Start()
		{
			Renderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<Renderer>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				Object.Destroy((Object)(object)componentsInChildren[i]);
			}
		}
	}
	public class EditAllRangeWeapon : MonoBehaviour
	{
		private Unit unit;

		public float recoilM = 1f;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			RangeWeapon[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<RangeWeapon>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				RangeWeapon obj = componentsInChildren[i];
				obj.shootRecoil *= recoilM;
				RangeWeapon obj2 = componentsInChildren[i];
				obj2.torsoRecoil *= recoilM;
			}
		}
	}
	public class ChangeProjectileScale : MonoBehaviour
	{
		private Unit unit;

		public float scaleM;

		private GameObject hiddenParent;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			SetHiddenParent();
			RangeWeapon[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<RangeWeapon>();
			foreach (RangeWeapon val in componentsInChildren)
			{
				GameObject objectToSpawn = MakeTempCopy(val.ObjectToSpawn);
				val.ObjectToSpawn = objectToSpawn;
			}
			SpawnObject[] componentsInChildren2 = ((Component)unit).gameObject.GetComponentsInChildren<SpawnObject>();
			for (int j = 0; j < componentsInChildren2.Length; j++)
			{
				GameObject objectToSpawn2 = MakeTempCopy(componentsInChildren2[j].objectToSpawn);
				componentsInChildren2[j].objectToSpawn = objectToSpawn2;
			}
		}

		private GameObject MakeTempCopy(GameObject gameObjectToCopy)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = Object.Instantiate<GameObject>(gameObjectToCopy, hiddenParent.transform);
			Transform transform = obj.transform;
			transform.localScale *= scaleM;
			return obj;
		}

		private void SetHiddenParent()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			hiddenParent = new GameObject
			{
				hideFlags = (HideFlags)61
			};
			hiddenParent.SetActive(false);
		}
	}
	public class DeadDeleteThisObject : MonoBehaviour
	{
		private Unit unit;

		private void Start()
		{
			unit = ((Component)((Component)((Component)this).transform).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
		}

		private void Update()
		{
			if (unit.data.Dead)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}
	}
	public class AdaptiveCasting : MonoBehaviour
	{
		public SpookySwords spookySwords;

		private Unit unit;

		private RangeWeapon[] rangeWeapons;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>();
			if (!Object.op_Implicit((Object)(object)spookySwords))
			{
				spookySwords = ((Component)this).gameObject.GetComponentInChildren<SpookySwords>();
			}
		}

		private void Update()
		{
			rangeWeapons = ((Component)unit).gameObject.GetComponentsInChildren<RangeWeapon>();
			if (rangeWeapons.Length != 0)
			{
				int num = Random.Range(0, rangeWeapons.Length);
				spookySwords.sourceSword = rangeWeapons[num].ObjectToSpawn;
			}
		}
	}
	public class SmartWeaponRigidbodyChange : MonoBehaviour
	{
		private Unit unit;

		public bool right;

		public float scaleMultiplier;

		private void Start()
		{
			unit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>();
			if ((Object)(object)unit == (Object)null)
			{
				Debug.LogError((object)"Unit not found in hierarchy.");
				return;
			}
			Weapon val = (right ? unit.data.weaponHandler.rightWeapon : unit.data.weaponHandler.leftWeapon);
			if ((Object)(object)val != (Object)null)
			{
				ApplyRigidbodyChanges(((Component)val).gameObject);
			}
		}

		private void ApplyRigidbodyChanges(GameObject weapon)
		{
			Rigidbody componentInChildren = weapon.GetComponentInChildren<Rigidbody>();
			if ((Object)(object)componentInChildren != (Object)null)
			{
				UpdateRigidbodyData(componentInChildren);
			}
		}

		private void Update()
		{
			Weapon val = (right ? unit.data.weaponHandler.rightWeapon : unit.data.weaponHandler.leftWeapon);
			if ((Object)(object)val != (Object)null)
			{
				Rigidbody componentInChildren = ((Component)val).GetComponentInChildren<Rigidbody>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					UpdateRigidbodyData(componentInChildren);
				}
			}
		}

		private void UpdateRigidbodyData(Rigidbody rigidbody)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			Vector3 localScale = ((Component)this).transform.localScale;
			rigidbody.mass = localScale.x;
			rigidbody.drag = localScale.y;
			rigidbody.angularDrag = localScale.z;
		}
	}
	public class SmartWeaponHoldingChange : MonoBehaviour
	{
		public enum HoldingChangeType
		{
			UpRotation,
			ForwardRotation,
			RelativePosition
		}

		private Unit unit;

		public bool right;

		public HoldingChangeType holdingChangeType;

		private void Start()
		{
			unit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>();
			if ((Object)(object)unit == (Object)null)
			{
				Debug.LogError((object)"Unit not found in hierarchy.");
				return;
			}
			Weapon val = (right ? unit.data.weaponHandler.rightWeapon : unit.data.weaponHandler.leftWeapon);
			if ((Object)(object)val != (Object)null)
			{
				ApplyWeaponHoldingChanges(((Component)val).gameObject);
			}
		}

		private void ApplyWeaponHoldingChanges(GameObject weapon)
		{
			Holdable componentInChildren = weapon.GetComponentInChildren<Holdable>();
			if (!((Object)(object)componentInChildren == (Object)null))
			{
				UpdateHoldableData(componentInChildren);
			}
		}

		private void Update()
		{
			Weapon val = (right ? unit.data.weaponHandler.rightWeapon : unit.data.weaponHandler.leftWeapon);
			if ((Object)(object)val != (Object)null)
			{
				Holdable componentInChildren = ((Component)val).GetComponentInChildren<Holdable>();
				if ((Object)(object)componentInChildren != (Object)null)
				{
					UpdateHoldableData(componentInChildren);
				}
			}
		}

		private void UpdateHoldableData(Holdable holdable)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			Vector3 localScale = ((Component)this).transform.localScale;
			switch (holdingChangeType)
			{
			case HoldingChangeType.UpRotation:
				holdable.holdableData.upRotation = localScale;
				break;
			case HoldingChangeType.ForwardRotation:
				holdable.holdableData.forwardRotation = localScale;
				break;
			case HoldingChangeType.RelativePosition:
				holdable.holdableData.relativePosition = localScale;
				break;
			}
		}
	}
	public class TransformAddDelay : MonoBehaviour
	{
		private void Start()
		{
			UnitSpawner[] componentsInChildren = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentsInChildren<UnitSpawner>();
			foreach (UnitSpawner obj in componentsInChildren)
			{
				obj.spawnDelay += 1f;
			}
			Object.Destroy((Object)(object)((Component)this).gameObject.gameObject);
		}
	}
	public class AbilityRemoveSound : MonoBehaviour
	{
		private void Start()
		{
			SpecialAbility[] componentsInChildren = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentsInChildren<SpecialAbility>();
			foreach (SpecialAbility val in componentsInChildren)
			{
				AudioSource[] componentsInChildren2 = ((Component)val).gameObject.GetComponentsInChildren<AudioSource>();
				for (int j = 0; j < componentsInChildren2.Length; j++)
				{
					Object.Destroy((Object)(object)componentsInChildren2[j]);
				}
				PlaySoundEffect[] componentsInChildren3 = ((Component)val).gameObject.GetComponentsInChildren<PlaySoundEffect>();
				for (int j = 0; j < componentsInChildren3.Length; j++)
				{
					Object.Destroy((Object)(object)componentsInChildren3[j]);
				}
			}
		}
	}
	public class KeepNormalUnitColorInstance : MonoBehaviour
	{
		private Unit unit;

		private UnitColorHandler colorHandler;

		private void Start()
		{
			unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
			if ((Object)(object)unit == (Object)null)
			{
				Debug.LogError((object)"Unit not found in hierarchy.");
				return;
			}
			colorHandler = ((Component)unit).GetComponentInChildren<UnitColorHandler>();
			if ((Object)(object)colorHandler == (Object)null)
			{
				Debug.LogError((object)"UnitColorHandler not found on the unit.");
			}
		}

		private void Update()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_003f: 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)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing