Decompiled source of fixmod v0.0.5

fixmod.dll

Decompiled 6 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using DM;
using FhpSLib.BundleModCore;
using HarmonyLib;
using Landfall.TABS;
using SLMA;
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("Custom")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("made in SFT by FhpSlime")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3a45c3cf-230c-4310-952f-0887d4266a22")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace fixmod
{
	public static class UManager
	{
		public static string modname;

		public static string modder;

		private static string com;

		public static SLMABundleMod bundleMod;

		public static SLMABundleMod bundleMod1;

		static UManager()
		{
			modname = "SFT";
			modder = "FhpSlime";
		}

		public static void SetRiders(UnitBlueprint me, UnitBlueprint[] riders)
		{
			s.SetField<UnitBlueprint>(me, "Riders", (object)riders);
		}

		public static void EditBlueprint(UnitBlueprint unit, LandfallContentDatabase db)
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Expected O, but got Unknown
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Expected O, but got Unknown
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b2: Expected O, but got Unknown
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Expected O, but got Unknown
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Expected O, but got Unknown
			//IL_042f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0525: Unknown result type (might be due to invalid IL or missing references)
			//IL_0535: Expected O, but got Unknown
			//IL_0558: Unknown result type (might be due to invalid IL or missing references)
			//IL_0568: Expected O, but got Unknown
			//IL_058c: Unknown result type (might be due to invalid IL or missing references)
			//IL_059c: Expected O, but got Unknown
			//IL_05c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d0: Expected O, but got Unknown
			//IL_05e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0466: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fe: Expected O, but got Unknown
			//IL_0713: Unknown result type (might be due to invalid IL or missing references)
			//IL_061d: Unknown result type (might be due to invalid IL or missing references)
			//IL_049c: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_074a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0653: Unknown result type (might be due to invalid IL or missing references)
			//IL_0871: Unknown result type (might be due to invalid IL or missing references)
			//IL_0881: Expected O, but got Unknown
			//IL_08a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b4: Expected O, but got Unknown
			//IL_07ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bd: Expected O, but got Unknown
			//IL_0780: Unknown result type (might be due to invalid IL or missing references)
			//IL_0930: Unknown result type (might be due to invalid IL or missing references)
			//IL_0940: Expected O, but got Unknown
			//IL_0963: Unknown result type (might be due to invalid IL or missing references)
			//IL_0973: Expected O, but got Unknown
			//IL_0996: Unknown result type (might be due to invalid IL or missing references)
			//IL_09aa: Expected O, but got Unknown
			//IL_0a3d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4d: Expected O, but got Unknown
			//IL_0ac3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad3: Expected O, but got Unknown
			if (unit.Entity.Name == "UNIT_ASIA_SAMURAI")
			{
				GameObject obj = UPool.MyPool.AddObject("xiufu16", (GameObject)SLMALoader.SDic["moves"]["BlockSlow"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj.transform.localScale = new Vector3(1f, 1f, 1f);
				Transform val = obj.transform.Find("Sphere (1)");
				if ((Object)(object)val != (Object)null)
				{
					val.localScale = new Vector3(10f, 10f, 10f);
				}
				Transform val2 = obj.transform.Find("Sphere");
				if ((Object)(object)val2 != (Object)null)
				{
					val2.localScale = new Vector3(10f, 10f, 10f);
				}
				ChineseLibrary.技能设置(unit, (GameObject[])(object)new GameObject[1] { UPool.MyPool.GetObject("xiufu16") });
			}
			if (unit.Entity.Name == "UNIT_LEGACY_THOR")
			{
				GameObject obj2 = UPool.MyPool.AddObject("thr", (GameObject)SLMALoader.SDic["moves"]["Move_Block_Thor"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("thr2", (GameObject)SLMALoader.SDic["moves"]["Move_Thor_Lightning"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj2.transform.localScale = new Vector3(1f, 1f, 1f);
				Transform val3 = obj2.transform.Find("Sphere (1)");
				if ((Object)(object)val3 != (Object)null)
				{
					val3.localScale = new Vector3(10f, 10f, 10f);
				}
				Transform val4 = obj2.transform.Find("Sphere");
				if ((Object)(object)val4 != (Object)null)
				{
					val4.localScale = new Vector3(10f, 10f, 10f);
				}
				ChineseLibrary.技能设置(unit, (GameObject[])(object)new GameObject[2]
				{
					UPool.MyPool.GetObject("thr"),
					UPool.MyPool.GetObject("thr2")
				});
			}
			if (unit.Entity.Name == "UNIT_FANTASYGOOD_ORBCASTER")
			{
				GameObject obj3 = UPool.MyPool.AddObject("xiufu17", (GameObject)SLMALoader.SDic["moves"]["BlockShield"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj3.transform.localScale = new Vector3(1f, 1f, 1f);
				Transform obj4 = obj3.transform.Find("Shields");
				Transform val5 = ((Component)obj4).transform.Find("3 + VFX");
				if ((Object)(object)val5 != (Object)null)
				{
					val5.localScale = new Vector3(3.5f, 3.5f, 3.5f);
				}
				Transform val6 = ((Component)obj4).transform.Find("2");
				if ((Object)(object)val6 != (Object)null)
				{
					val6.localScale = new Vector3(9f, 9f, 9f);
				}
				Transform val7 = ((Component)obj4).transform.Find("1");
				if ((Object)(object)val7 != (Object)null)
				{
					val7.localScale = new Vector3(9f, 9f, 9f);
				}
				ChineseLibrary.技能设置(unit, (GameObject[])(object)new GameObject[1] { UPool.MyPool.GetObject("xiufu17") });
			}
			if (unit.Entity.Name == "UNIT_SECRET_SHOGUN")
			{
				GameObject obj5 = UPool.MyPool.AddObject("xiufu118", (GameObject)SLMALoader.SDic["moves"]["BlockShogun"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("sho", (GameObject)SLMALoader.SDic["moves"]["Move_Shogun_Slash"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("sho2", (GameObject)SLMALoader.SDic["moves"]["Shogun_Dodge"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj5.transform.localScale = new Vector3(1f, 1f, 1f);
				Transform val8 = obj5.transform.Find("Sphere (1)");
				if ((Object)(object)val8 != (Object)null)
				{
					val8.localScale = new Vector3(10f, 10f, 10f);
				}
				Transform val9 = obj5.transform.Find("Sphere");
				if ((Object)(object)val9 != (Object)null)
				{
					val9.localScale = new Vector3(10f, 10f, 10f);
				}
				ChineseLibrary.技能设置(unit, (GameObject[])(object)new GameObject[3]
				{
					UPool.MyPool.GetObject("xiufu118"),
					UPool.MyPool.GetObject("sho"),
					UPool.MyPool.GetObject("sho2")
				});
			}
			if (unit.Entity.Name == "UNIT_SECRET_REDJADE")
			{
				GameObject obj6 = UPool.MyPool.AddObject("xiufu19", (GameObject)SLMALoader.SDic["moves"]["Block_RedJade"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("red1", (GameObject)SLMALoader.SDic["moves"]["JumpKick_RedJade_L"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("red2", (GameObject)SLMALoader.SDic["moves"]["SpinToWin_Red Jade"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("red3", (GameObject)SLMALoader.SDic["moves"]["Move_RedJade_Tornado"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj6.transform.localScale = new Vector3(1f, 1f, 1f);
				Transform val10 = obj6.transform.Find("Sphere (1)");
				if ((Object)(object)val10 != (Object)null)
				{
					val10.localScale = new Vector3(10f, 10f, 10f);
				}
				Transform val11 = obj6.transform.Find("Sphere");
				if ((Object)(object)val11 != (Object)null)
				{
					val11.localScale = new Vector3(10f, 10f, 10f);
				}
				ChineseLibrary.技能设置(unit, (GameObject[])(object)new GameObject[4]
				{
					UPool.MyPool.GetObject("xiufu19"),
					UPool.MyPool.GetObject("red1"),
					UPool.MyPool.GetObject("red2"),
					UPool.MyPool.GetObject("red3")
				});
			}
			if (unit.Entity.Name == "UNIT_SECRET_SAMURAI_GIANT")
			{
				GameObject obj7 = UPool.MyPool.AddObject("xiufu20", (GameObject)SLMALoader.SDic["moves"]["Block_Samuraigiant"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj7.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
				Transform val12 = obj7.transform.Find("Sphere (1)");
				if ((Object)(object)val12 != (Object)null)
				{
					val12.localScale = new Vector3(10f, 10f, 10f);
				}
				Transform val13 = obj7.transform.Find("Sphere");
				if ((Object)(object)val13 != (Object)null)
				{
					val13.localScale = new Vector3(10f, 10f, 10f);
				}
				UPool.MyPool.AddObject("wip1", (GameObject)SLMALoader.SDic["moves"]["GiantFootStomp"], true, (HideFlags)52, (Sprite)null, 0, true);
				ChineseLibrary.技能设置(unit, (GameObject[])(object)new GameObject[2]
				{
					UPool.MyPool.GetObject("xiufu20"),
					UPool.MyPool.GetObject("wip1")
				});
			}
			if (unit.Entity.Name == "UNIT_FANTASYEVIL_STORMPRIEST")
			{
				ChineseLibrary.设置子弹(unit.RightWeapon, bundleMod.GetAssetBundle("my").LoadAsset<GameObject>("E_Storm_Gameplay1_VB"));
			}
			if (unit.Entity.Name == "UNIT_SECRET_ULLR")
			{
				SLMATool.UnitCost(unit, 3000);
				GameObject obj8 = UPool.MyPool.AddObject("xiufu", (GameObject)SLMALoader.SDic["weapons"]["Thrown_UllrAxe"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("霹雳2", (GameObject)SLMALoader.SDic["projectiles"]["P_AxeUllr"], true, (HideFlags)52, (Sprite)null, 0, true);
				ChineseLibrary.设置子弹(obj8, UPool.MyPool.GetObject("霹雳2"));
				unit.RightWeapon = UPool.MyPool.GetObject("xiufu");
				unit.LeftWeapon = UPool.MyPool.GetObject("xiufu");
			}
			if (unit.Entity.Name == "UNIT_LEGACY_LEG_WIZARD")
			{
				GameObject obj9 = UPool.MyPool.AddObject("xiufu2", (GameObject)SLMALoader.SDic["weapons"]["Leg_WizardStaff"], true, (HideFlags)52, (Sprite)null, 0, true);
				GameObject obj10 = UPool.MyPool.AddObject("霹雳3", (GameObject)SLMALoader.SDic["projectiles"]["E_Leg_WizardThrow_Spell"], true, (HideFlags)52, (Sprite)null, 0, true);
				UPool.MyPool.AddObject("newexps", (GameObject)SLMALoader.SDic["effects"]["E_Leg_WizardThrow_Effect"], true, (HideFlags)52, (Sprite)null, 1147116, true);
				UnitEffectBase component = UPool.MyPool.GetObject("newexps").GetComponent<UnitEffectBase>();
				obj10.GetComponentInChildren<AddTargetableEffect>().EffectPrefab = component;
				((Component)component).gameObject.AddComponent<ExplosionFixer>();
				ChineseLibrary.设置子弹(obj9, UPool.MyPool.GetObject("霹雳3"));
				unit.RightWeapon = UPool.MyPool.GetObject("xiufu2");
			}
			if (unit.Entity.Name == "UNIT_WESTERN_QUICKDRAW")
			{
				GameObject obj11 = UPool.MyPool.AddObject("xiufu3", (GameObject)SLMALoader.SDic["weapons"]["Quickdraw_Revolver_AgainstHip"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj11.GetComponentInChildren<RangeWeapon>().useSpawnDelayForEveryShot = true;
				obj11.GetComponentInChildren<RangeWeapon>().delayPerSpawn = 0f;
				obj11.GetComponentInChildren<RangeWeapon>().magSize = 5;
				unit.RightWeapon = UPool.MyPool.GetObject("xiufu3");
			}
			if (unit.Entity.Name == "UNIT_WESTERN_DEADEYE")
			{
				GameObject obj12 = UPool.MyPool.AddObject("xiufu6", (GameObject)SLMALoader.SDic["weapons"]["Winchester"], true, (HideFlags)52, (Sprite)null, 0, true);
				obj12.GetComponentInChildren<Holdable>().holdableData.lookAtTargetWhenWithin = 1000f;
				obj12.GetComponentInChildren<Holdable>().pidData.capAngle = 100f;
				unit.RightWeapon = UPool.MyPool.GetObject("xiufu6");
			}
		}

		public static void EditClothes(GameObject cloth, CharacterItem item, PropItemData data, Unit unit, int index, LandfallContentDatabase db)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			Debug.Log((object)"Hey");
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Renderer[] componentsInChildren = cloth.GetComponentsInChildren<Renderer>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].materials = (Material[])(object)new Material[1] { (Material)SLMALoader.SDic["materials"]["Glow_Neon_Green_143734"] };
				}
			}
		}

		public static void EditProjectiles(GameObject proj, ProjectileHit projhit, Unit unit, LandfallContentDatabase db)
		{
			if (unit.unitBlueprint.Entity.Name == "UNIT_FANTASYEVIL_STORMPRIEST")
			{
				proj = bundleMod.GetAssetBundle("my").LoadAsset<GameObject>("E_Storm_Gameplay_VB");
			}
		}

		public static void EditCombatMoves(GameObject move, int index, Unit unit, LandfallContentDatabase db)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Expected O, but got Unknown
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Expected O, but got Unknown
			if (unit.unitBlueprint.Entity.Name == "666" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()) && index == 2)
			{
				move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
				{
					new Keyframe(0f, 0f),
					new Keyframe(1f, 1f),
					new Keyframe(2f, 1f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f)
				});
				move.GetComponentInChildren<DodgeMove>().forceMultiplier = -1f;
			}
			if (unit.unitBlueprint.Entity.Name == "666" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()) && index == 3)
			{
				move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
				{
					new Keyframe(-1f, 1f),
					new Keyframe(1f, 1f),
					new Keyframe(5f, 4f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f)
				});
				move.GetComponentInChildren<DodgeMove>().forceMultiplier = -2f;
			}
			if (unit.unitBlueprint.Entity.Name == "666" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()) && index == 4)
			{
				move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
				{
					new Keyframe(-1f, 1f),
					new Keyframe(1f, 1f),
					new Keyframe(5f, 4f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f)
				});
			}
		}

		public static void CodeAfterSpawn(Unit unit, LandfallContentDatabase db)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Transform head = unit.data.head;
				head.localScale *= 2f;
			}
		}

		public static void Init(LandfallContentDatabase db)
		{
			com = "Bundle Mod Init";
			com = "Bundle Mod Init";
			AssetBundle val;
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("my"))
			{
				val = AssetBundle.LoadFromStream(stream);
			}
			if (Loader.BundleMode)
			{
				SLMABundleMod obj = SLMABundleMod.CreatSLMABundleMod("TestMod", "0.0.1");
				obj.AddAssetBundle("my", val);
				obj.Dev_mode = true;
				obj.LoadAssetBundle("my");
				bundleMod = obj;
			}
			MyModItems.GetInstance();
			com = "——————————Fations and Units——————————";
			com = "——————————Clothes——————————";
			com = "——————————Weapons——————————";
			com = "——————————Effects——————————";
			com = "——————————Explosions——————————";
			com = "——————————UnitBases——————————";
			com = "——————————Projectiles——————————";
			com = "——————————Moves——————————";
		}

		public static void EditWeapons(GameObject weapon, Team team, Unit unit, MeleeWeapon melee, RangeWeapon range, LandfallContentDatabase db)
		{
		}

		public static void SetMoveConditionalValue(this ConditionalEventInstance gameObject, ConditionType type, ValueType valuet, float value)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_004b: 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 references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: 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_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			bool flag = false;
			EventCondition[] conditions = gameObject.conditions;
			foreach (EventCondition val in conditions)
			{
				if (val.conditionType == type)
				{
					val.valueType = valuet;
					val.value = value;
					flag = true;
				}
			}
			if (!flag)
			{
				List<EventCondition> list = gameObject.conditions.ToList();
				list.Add(new EventCondition
				{
					conditionType = type,
					valueType = valuet,
					value = value
				});
				gameObject.conditions = list.ToArray();
			}
		}
	}
	[BepInPlugin("fixmod", "fixmod", "1.0.0")]
	internal class Loader : BaseUnityPlugin
	{
		public static bool BundleMode;

		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));
			yield return (object)new WaitForSecondsRealtime(0.3f);
			SLMALoader.GetInstance();
			LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase;
			UManager.Init(landfallContentDatabase);
			new Harmony(UManager.modname).PatchAll();
			GOSLMA.EditWeapons = ((GOSLMA.EditWeapons == null) ? new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons) : ((Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons), GOSLMA.EditWeapons)));
			GOSLMA.EditClothes = ((GOSLMA.EditClothes == null) ? new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes) : ((Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes), GOSLMA.EditClothes)));
			GOSLMA.EditCombatMoves = ((GOSLMA.EditCombatMoves == null) ? new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves) : ((Action<GameObject, int, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves), GOSLMA.EditCombatMoves)));
			GOSLMA.CodeAfterSpawn = ((GOSLMA.CodeAfterSpawn == null) ? new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn) : ((Action<Unit, LandfallContentDatabase>)Delegate.Combine(new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn), GOSLMA.CodeAfterSpawn)));
			GOSLMA.EditProjectiles = ((GOSLMA.EditProjectiles == null) ? new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles) : ((Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles), GOSLMA.EditProjectiles)));
			UnitBlueprint[] array = Resources.FindObjectsOfTypeAll<UnitBlueprint>();
			for (int i = 0; i < array.Length; i++)
			{
				UManager.EditBlueprint(array[i], landfallContentDatabase);
			}
			Debug.Log((object)("Loaded " + UManager.modname + " Successfully"));
			Debug.Log((object)(UManager.modname + "is made in SFT by FhpSlime"));
			Debug.Log((object)(UManager.modder + "wished you a pleasant trip"));
		}

		static Loader()
		{
			BundleMode = true;
		}
	}
}
public class Item : MonoBehaviour
{
	public enum kind
	{
		Weapon,
		Cloth,
		Skill,
		Unit,
		Projectile,
		Other
	}

	public string name;

	public kind Kind;
}
namespace fixmod
{
	public class MyModItems : MonoBehaviour
	{
		private static Dictionary<string, Item> items;

		private static MyModItems instance { get; set; }

		public static MyModItems GetInstance()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)instance == (Object)null)
			{
				instance = new GameObject("MyModItems").AddComponent<MyModItems>();
				Object.DontDestroyOnLoad((Object)(object)instance);
			}
			return instance;
		}

		public void AddItem(Item item)
		{
			items.Add(item.name, item);
		}

		public Item GetItem(string name)
		{
			Item value = new Item
			{
				name = null,
				Kind = Item.kind.Other
			};
			items.TryGetValue(name, out value);
			return value;
		}
	}
	public class ExplosionFixer : MonoBehaviour
	{
		private void Update()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			Team team = ((Component)this).GetComponentInParent<Unit>().data.team;
			if ((int)team == 0)
			{
				Explosion[] componentsInChildren = ((Component)this).GetComponentsInChildren<Explosion>();
				foreach (Explosion obj in componentsInChildren)
				{
					s.SetField<Explosion>(obj, "team", (object)team);
					obj.ignoreTeamMates = false;
					obj.onlyTeamMates = true;
				}
				componentsInChildren = ((Component)((Component)this).transform.GetChild(0)).GetComponentsInChildren<Explosion>();
				foreach (Explosion obj2 in componentsInChildren)
				{
					s.SetField<Explosion>(obj2, "team", (object)team);
					obj2.ignoreTeamMates = false;
					obj2.onlyTeamMates = true;
				}
			}
			else
			{
				Explosion[] componentsInChildren = ((Component)this).GetComponentsInChildren<Explosion>();
				foreach (Explosion obj3 in componentsInChildren)
				{
					s.SetField<Explosion>(obj3, "team", (object)team);
					obj3.ignoreTeamMates = true;
					obj3.onlyTeamMates = false;
				}
				componentsInChildren = ((Component)((Component)this).transform.GetChild(0)).GetComponentsInChildren<Explosion>();
				foreach (Explosion obj4 in componentsInChildren)
				{
					s.SetField<Explosion>(obj4, "team", (object)team);
					obj4.ignoreTeamMates = true;
					obj4.onlyTeamMates = false;
				}
			}
		}
	}
}
public class Example : MonoBehaviour
{
	public GameObject prefab;

	private void Start()
	{
		if ((Object)(object)prefab != (Object)null)
		{
			Transform[] componentsInChildren = prefab.GetComponentsInChildren<Transform>();
			if (componentsInChildren.Length > 1)
			{
				_ = componentsInChildren[1];
			}
		}
	}
}