Decompiled source of MoveEditor v2.1.6
Move Editor.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
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 HarmonyLib; using Landfall.TABS; using Landfall.TABS.GameState; using Landfall.TABS.Services; using Landfall.TABS.UnitEditor; using Landfall.TABS.Workshop; using Move_Editor; using Move_Editor.Script; using TFBGames; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("MoveEditor")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("by FhpSlime")] [assembly: AssemblyCopyright("Copyright © 2021")] [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("2.1.6.0")] [module: UnverifiableCode] namespace Move_Editor { [BepInPlugin("org.bepinex.plugins.MoveEditor", "MoveEditor", "1.0.0")] public class EditorStart : BaseUnityPlugin { public static MoveEditor moveeditor; private void Awake() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //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 references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown GameObject val = new GameObject(); ((Object)val).name = "Editor-plugins"; ((Object)val).hideFlags = (HideFlags)52; moveeditor = val.AddComponent<MoveEditor>(); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("moveeditor")) { AssetBundle.LoadFromStream(stream); } GameObject val2 = new GameObject { name = "Loader", hideFlags = (HideFlags)61 }; val2.AddComponent<MoveLoader>(); Object.DontDestroyOnLoad((Object)(object)val); Object.DontDestroyOnLoad((Object)val2); } } public class ReaderTexttoJson { public Dictionary<string, string> json; public ReaderTexttoJson(StreamReader streamReader) { json = new Dictionary<string, string>(); while (!streamReader.EndOfStream) { string[] array = streamReader.ReadLine().Split(new char[1] { '=' }); json.Add(array[0].Split(new char[1] { '"' })[1], array[1]); } } } public class MoveEditor : MonoBehaviour { public static string EditorPath; public static string MovePath; public static string IconPath; public static string[] allmoves; public static Dictionary<string, GameObject> permoves; public static Dictionary<string, GameObject> perObjects; public static string[] allicons; public static GameObject pool; public static Dictionary<string, UnitBlueprint> perunits; public static List<GameObject> moves; public List<ReaderTexttoJson> readers = new List<ReaderTexttoJson>(); public bool secondread; private static void CheckPath(string path) { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } } private void Awake() { ((MonoBehaviour)this).StartCoroutine(GetEnumerator()); } private void SpawnPer() { //IL_0167: Unknown result type (might be due to invalid IL or missing references) SpecialAbility[] array = Resources.FindObjectsOfTypeAll<SpecialAbility>(); foreach (SpecialAbility val in array) { if (!permoves.ContainsKey(((CharacterItem)val).Entity.Name) && ((CharacterItem)val).Entity.Name != "") { permoves.Add(((CharacterItem)val).Entity.Name, ((Component)val).gameObject); } } Explosion[] array2 = Resources.FindObjectsOfTypeAll<Explosion>(); foreach (Explosion val2 in array2) { if (!perObjects.ContainsKey(((Object)((Component)val2).gameObject).name) && ((Object)((Component)val2).gameObject).name != "") { perObjects.Add(((Object)((Component)val2).gameObject).name, ((Component)val2).gameObject); } } string text = Path.Combine(Paths.PluginPath, "PerObjects"); CheckPath(text); if (!File.Exists(Path.Combine(text, "perMoves.txt"))) { StreamWriter streamWriter = File.CreateText(Path.Combine(text, "perMoves.txt")); foreach (KeyValuePair<string, GameObject> permove in permoves) { GameObject value = permove.Value; string key = permove.Key; streamWriter.WriteLine(permoves.Values.ToList().IndexOf(value)); streamWriter.WriteLine(key); streamWriter.WriteLine(((CharacterItem)value.GetComponentInChildren<SpecialAbility>()).Entity.GUID.m_ID); if (Object.op_Implicit((Object)(object)value.GetComponentInChildren<SpawnObject>())) { streamWriter.WriteLine("CanUsePerObjectSpawn:true"); } if (Object.op_Implicit((Object)(object)value.GetComponentInChildren<UnitSpawner>())) { streamWriter.WriteLine("CanUsePerUnitSpawn:true"); } if (Object.op_Implicit((Object)(object)value.GetComponentInChildren<DodgeMove>())) { streamWriter.WriteLine("CanUsePerDodgeForce:true"); } streamWriter.WriteLine(""); } } if (File.Exists(Path.Combine(text, "perObjects.txt"))) { return; } StreamWriter streamWriter2 = File.CreateText(Path.Combine(text, "perObjects.txt")); foreach (KeyValuePair<string, GameObject> perObject in perObjects) { GameObject value2 = perObject.Value; string key2 = perObject.Key; streamWriter2.WriteLine(perObjects.Values.ToList().IndexOf(value2)); streamWriter2.WriteLine(key2); streamWriter2.WriteLine(""); } } public void ReaderStart() { for (int i = 0; i < allmoves.Length; i++) { new List<string>(); StreamReader streamReader = new StreamReader(allmoves[i]); ReaderTexttoJson move = new ReaderTexttoJson(streamReader); streamReader.Close(); ReadMove(move); } secondread = true; ServiceLocator.GetService<CustomContentLoaderModIO>().QuickRefresh((WorkshopContentType)0, (Action)null); for (int j = 0; j < readers.Count; j++) { ReadMove(readers[j]); } } public void ReadMove(ReaderTexttoJson move) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_08f5: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)pool == (Object)null) { pool = new GameObject { name = "pool", hideFlags = (HideFlags)52 }; Object.DontDestroyOnLoad((Object)(object)pool); pool.SetActive(false); } if (moves == null) { moves = new List<GameObject>(); } string value = ""; string value2 = ""; string value3 = ""; string value4 = ""; string value5 = ""; string value6 = ""; string value7 = ""; string value8 = ""; string value9 = ""; string value10 = ""; string value11 = ""; string value12 = "True"; string value13 = "True"; move.json.TryGetValue("Name", out value); EditorTools.Warning(value); move.json.TryGetValue("ModID", out value4); EditorTools.Warning(value4); move.json.TryGetValue("ID", out value5); EditorTools.Warning(value5); move.json.TryGetValue("PerMove", out value2); EditorTools.Warning(value2); move.json.TryGetValue("PerSpawn", out value3); EditorTools.Warning(value3); move.json.TryGetValue("PerForce", out value6); EditorTools.Warning(value6); move.json.TryGetValue("PerUnitId", out value7); EditorTools.Warning(value7); move.json.TryGetValue("Color", out value8); EditorTools.Warning(value8); move.json.TryGetValue("CD", out value9); EditorTools.Warning(value9); move.json.TryGetValue("Damage", out value10); EditorTools.Warning(value10); move.json.TryGetValue("SC", out value11); EditorTools.Warning(value11); move.json.TryGetValue("SetColor?", out value12); EditorTools.Warning(value12); if (move.json.ContainsKey("UseParticle?")) { move.json.TryGetValue("UseParticle?", out value13); EditorTools.Warning(value13); } GameObject value14 = new GameObject(); permoves.TryGetValue(value2, out value14); if ((Object)(object)value14 == (Object)null) { return; } GameObject val = Object.Instantiate<GameObject>(value14, pool.transform); val.transform.SetParent(pool.transform); val.SetHideFlags<GameObject>((HideFlags)52); ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.Name = value; int result = 1; int result2 = 114514; int.TryParse(value4, out result); int.TryParse(value5, out result2); ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID = new DatabaseID(result, result2); ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.SpriteIcon = GetSprite(value); EditorTools.SetField<CharacterItem>(val.GetComponentInChildren<CharacterItem>(), "m_showInEditor", true); EditorTools.Warning((bool)val.GetComponentInChildren<CharacterItem>().GetField<CharacterItem>("m_showInEditor")); if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<UnitSpawner>()) && !secondread) { readers.Add(move); return; } ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag> { new Tag { tagType = (TagType)0, value = "Custom" } }; Color white = Color.white; if (value8 != "" && value8 != null && (value12 == "" || bool.Parse(value12))) { string[] array = value8.Split(new char[1] { ',' }); ((Color)(ref white))..ctor(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); if (array.Length == 4) { ((Color)(ref white))..ctor(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]), float.Parse(array[3])); } val.SetColor(white, bool.Parse(value13)); } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren = val.GetComponentsInChildren<SpawnObject>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (value3 != null && perObjects.ContainsKey(value3)) { componentsInChildren[i].objectToSpawn = perObjects[value3]; } } } if (value11 != "" && Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddScreensShake>())) { AddScreensShake[] componentsInChildren2 = val.GetComponentsInChildren<AddScreensShake>(); for (int j = 0; j < componentsInChildren2.Length; j++) { componentsInChildren2[j].amount = float.Parse(value11); } } if (value10 != "" && (Object.op_Implicit((Object)(object)val.GetComponentInChildren<Explosion>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddObjectEffect>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<CollisionWeapon>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<ExplosionAddEffect>()))) { if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren3 = val.GetComponentsInChildren<Explosion>(); for (int k = 0; k < componentsInChildren3.Length; k++) { componentsInChildren3[k].damage = float.Parse(value10); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren4 = val.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val2 in componentsInChildren4) { val2.objectToSpawn = Object.Instantiate<GameObject>(val2.objectToSpawn, pool.transform); val2.objectToSpawn.SetColor(white, bool.Parse(value13)); if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren5 = val2.objectToSpawn.GetComponentsInChildren<Explosion>(); for (int m = 0; m < componentsInChildren5.Length; m++) { componentsInChildren5[m].damage = float.Parse(value10); } } if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = val2.objectToSpawn.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj in componentsInChildren6) { obj.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj.EffectPrefab, pool.transform); obj.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj.EffectPrefab).gameObject.SetColor(white, bool.Parse(value13)); } } if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<AddObjectEffect>())) { AddObjectEffect[] componentsInChildren7 = val2.objectToSpawn.GetComponentsInChildren<AddObjectEffect>(); foreach (AddObjectEffect obj2 in componentsInChildren7) { obj2.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj2.EffectPrefab, pool.transform); obj2.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj2.EffectPrefab).gameObject.SetColor(white, bool.Parse(value13)); } } } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddObjectEffect>())) { AddObjectEffect[] componentsInChildren7 = val.GetComponentsInChildren<AddObjectEffect>(); foreach (AddObjectEffect obj3 in componentsInChildren7) { obj3.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj3.EffectPrefab, pool.transform); obj3.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj3.EffectPrefab).gameObject.SetColor(white, bool.Parse(value13)); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<CollisionWeapon>())) { CollisionWeapon[] componentsInChildren8 = val.GetComponentsInChildren<CollisionWeapon>(); for (int num = 0; num < componentsInChildren8.Length; num++) { componentsInChildren8[num].damage = float.Parse(value10); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = val.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj4 in componentsInChildren6) { obj4.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj4.EffectPrefab, pool.transform); obj4.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj4).gameObject.SetColor(white, bool.Parse(value13)); } } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<DodgeMove>()) && value6 != "" && value6 != null) { DodgeMove[] componentsInChildren9 = val.GetComponentsInChildren<DodgeMove>(); for (int num2 = 0; num2 < componentsInChildren9.Length; num2++) { componentsInChildren9[num2].forceMultiplier = float.Parse(value6); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<UnitSpawner>()) && value7 != "" && value7 != null) { UnitSpawner[] componentsInChildren10 = val.GetComponentsInChildren<UnitSpawner>(); for (int num3 = 0; num3 < componentsInChildren10.Length; num3++) { UnitBlueprint value15 = componentsInChildren10[num3].unitBlueprint; perunits.TryGetValue(value7, out value15); componentsInChildren10[num3].unitBlueprint = value15; } } if (value9 != null && value9 != "") { ConditionalEvent[] componentsInChildren11 = val.GetComponentsInChildren<ConditionalEvent>(); for (int num4 = 0; num4 < componentsInChildren11.Length; num4++) { ConditionalEventInstance[] events = componentsInChildren11[num4].events; for (int num5 = 0; num5 < events.Length; num5++) { EventCondition[] conditions = events[num5].conditions; foreach (EventCondition val3 in conditions) { if ((int)val3.conditionType == 0) { val3.counter = float.Parse(value9); val3.value = float.Parse(value9); val3.valueType = (ValueType)1; val3.cooldownRange = float.Parse(value9); val3.extraRandomCooldown = 0f; } } } } } EditorTools.Error(ContentDatabase.Instance().LandfallContentDatabase.GetField<LandfallContentDatabase>("m_combatMoves")); Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)ContentDatabase.Instance().LandfallContentDatabase.GetField<LandfallContentDatabase>("m_combatMoves"); dictionary.Add(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID, val); EditorTools.SetField<LandfallContentDatabase>(ContentDatabase.Instance().LandfallContentDatabase, "m_combatMoves", dictionary); Dictionary<DatabaseID, Object> dictionary2 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader); dictionary2.Add(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID, (Object)(object)val); typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary2); moves.Add(val); } static MoveEditor() { permoves = new Dictionary<string, GameObject>(); perObjects = new Dictionary<string, GameObject>(); perunits = new Dictionary<string, UnitBlueprint>(); } private Sprite GetSprite(string name) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) string text = ""; if (allicons != null) { string[] array = allicons; foreach (string text2 in array) { if (text2.Contains(name)) { text = text2; } } } if (text == "") { return null; } FileStream fileStream = new FileStream(Path.Combine(IconPath, text), FileMode.Open); byte[] array2 = new byte[fileStream.Length]; fileStream.Read(array2, 0, array2.Length); fileStream.Close(); Texture2D val = new Texture2D(64, 64); ImageConversion.LoadImage(val, array2); return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f)); } private IEnumerator GetEnumerator() { 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 WaitForSeconds(0.6f); SpecialAbility[] array = Resources.FindObjectsOfTypeAll<SpecialAbility>(); foreach (SpecialAbility val in array) { string text = ((CharacterItem)val).Entity.Name; if (permoves.ContainsKey(text)) { while (permoves.ContainsKey(text)) { text += "-"; DatabaseEntity entity = ((CharacterItem)val).Entity; entity.Name += "-"; } } permoves.Add(text, ((Component)val).gameObject); } Explosion[] array2 = Resources.FindObjectsOfTypeAll<Explosion>(); foreach (Explosion val2 in array2) { string text2 = ((Object)((Component)val2).gameObject).name; if (perObjects.ContainsKey(text2)) { while (perObjects.ContainsKey(text2)) { text2 += "-"; GameObject gameObject = ((Component)val2).gameObject; ((Object)gameObject).name = ((Object)gameObject).name + "-"; } } perObjects.Add(text2, ((Component)val2).gameObject); } GameObject[] array3 = Resources.FindObjectsOfTypeAll<GameObject>(); foreach (GameObject val3 in array3) { if (!Object.op_Implicit((Object)(object)val3.GetComponentInChildren<SpawnObject>())) { continue; } SpawnObject[] componentsInChildren = val3.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val4 in componentsInChildren) { if (Object.op_Implicit((Object)(object)val4.objectToSpawn) && !string.IsNullOrEmpty(((Object)val4.objectToSpawn).name)) { string name = ((Object)val4.objectToSpawn).name; if (!perObjects.ContainsKey(name)) { perObjects.Add(name, val4.objectToSpawn); } } } } UnitBlueprint[] array4 = Resources.FindObjectsOfTypeAll<UnitBlueprint>(); foreach (UnitBlueprint val5 in array4) { string text3 = val5.Entity.Name; if (perunits.ContainsKey(text3)) { while (perunits.ContainsKey(text3)) { text3 += "-"; } } perunits.Add(text3, val5); } EditorPath = Path.Combine(Paths.PluginPath, "Moves"); MovePath = Path.Combine(EditorPath, "MyMoves"); IconPath = Path.Combine(EditorPath, "Icons"); CheckPath(EditorPath); CheckPath(MovePath); CheckPath(IconPath); allmoves = Directory.GetFiles(MovePath, "*.move"); allicons = Directory.GetFiles(IconPath); ReaderStart(); } public GameObject ReadMoveCanlog(ReaderTexttoJson move) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: 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_08c8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)pool == (Object)null) { pool = new GameObject { name = "pool", hideFlags = (HideFlags)52 }; Object.DontDestroyOnLoad((Object)(object)pool); pool.SetActive(false); } string value = ""; string value2 = ""; string value3 = ""; string value4 = ""; string value5 = ""; string value6 = ""; string value7 = ""; string value8 = ""; string value9 = ""; string value10 = ""; string value11 = ""; string value12 = "True"; string value13 = "True"; move.json.TryGetValue("Name", out value); EditorTools.Warning(value); move.json.TryGetValue("ModID", out value4); EditorTools.Warning(value4); move.json.TryGetValue("ID", out value5); EditorTools.Warning(value5); move.json.TryGetValue("PerMove", out value2); EditorTools.Warning(value2); move.json.TryGetValue("PerSpawn", out value3); EditorTools.Warning(value3); move.json.TryGetValue("PerForce", out value6); EditorTools.Warning(value6); move.json.TryGetValue("PerUnitId", out value7); EditorTools.Warning(value7); move.json.TryGetValue("Color", out value8); EditorTools.Warning(value8); move.json.TryGetValue("CD", out value9); EditorTools.Warning(value9); move.json.TryGetValue("Damage", out value10); EditorTools.Warning(value10); move.json.TryGetValue("SC", out value11); EditorTools.Warning(value11); move.json.TryGetValue("SetColor?", out value12); EditorTools.Warning(value12); if (move.json.ContainsKey("UseParticle?")) { move.json.TryGetValue("UseParticle?", out value13); EditorTools.Warning(value13); } GameObject value14 = new GameObject(); permoves.TryGetValue(value2, out value14); if ((Object)(object)value14 == (Object)null) { return null; } GameObject val = Object.Instantiate<GameObject>(value14, pool.transform); val.transform.SetParent(pool.transform); val.SetHideFlags<GameObject>((HideFlags)52); ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.Name = value; int result = 1; int result2 = 114514; int.TryParse(value4, out result); int.TryParse(value5, out result2); ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID = new DatabaseID(result, result2); ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.SpriteIcon = GetSprite(value); EditorTools.SetField<CharacterItem>(val.GetComponentInChildren<CharacterItem>(), "m_showInEditor", true); val.GetComponentInChildren<CharacterItem>().tags = new List<Tag> { new Tag { tagType = (TagType)0, value = "Custom" } }; Color white = Color.white; if (value8 != "" && value8 != null && (value12 == "" || bool.Parse(value12))) { string[] array = value8.Split(new char[1] { ',' }); ((Color)(ref white))..ctor(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])); if (array.Length == 4) { ((Color)(ref white))..ctor(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]), float.Parse(array[3])); } val.SetColor(white, bool.Parse(value13)); } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren = val.GetComponentsInChildren<SpawnObject>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (value3 != null && perObjects.ContainsKey(value3)) { componentsInChildren[i].objectToSpawn = perObjects[value3]; } } } if (value11 != "" && Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddScreensShake>())) { AddScreensShake[] componentsInChildren2 = val.GetComponentsInChildren<AddScreensShake>(); for (int j = 0; j < componentsInChildren2.Length; j++) { componentsInChildren2[j].amount = float.Parse(value11); } } if (value10 != "" && (Object.op_Implicit((Object)(object)val.GetComponentInChildren<Explosion>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddObjectEffect>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<CollisionWeapon>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<ExplosionAddEffect>()))) { if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren3 = val.GetComponentsInChildren<Explosion>(); for (int k = 0; k < componentsInChildren3.Length; k++) { componentsInChildren3[k].damage = float.Parse(value10); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren4 = val.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val2 in componentsInChildren4) { val2.objectToSpawn = Object.Instantiate<GameObject>(val2.objectToSpawn, pool.transform); val2.objectToSpawn.SetColor(white, bool.Parse(value13)); if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren5 = val2.objectToSpawn.GetComponentsInChildren<Explosion>(); for (int m = 0; m < componentsInChildren5.Length; m++) { componentsInChildren5[m].damage = float.Parse(value10); } } if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = val2.objectToSpawn.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj in componentsInChildren6) { obj.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj.EffectPrefab, pool.transform); obj.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj.EffectPrefab).gameObject.SetColor(white, bool.Parse(value13)); } } if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<AddObjectEffect>())) { AddObjectEffect[] componentsInChildren7 = val2.objectToSpawn.GetComponentsInChildren<AddObjectEffect>(); foreach (AddObjectEffect obj2 in componentsInChildren7) { obj2.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj2.EffectPrefab, pool.transform); obj2.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj2.EffectPrefab).gameObject.SetColor(white, bool.Parse(value13)); } } } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddObjectEffect>())) { AddObjectEffect[] componentsInChildren7 = val.GetComponentsInChildren<AddObjectEffect>(); foreach (AddObjectEffect obj3 in componentsInChildren7) { obj3.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj3.EffectPrefab, pool.transform); obj3.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj3.EffectPrefab).gameObject.SetColor(white, bool.Parse(value13)); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<CollisionWeapon>())) { CollisionWeapon[] componentsInChildren8 = val.GetComponentsInChildren<CollisionWeapon>(); for (int num = 0; num < componentsInChildren8.Length; num++) { componentsInChildren8[num].damage = float.Parse(value10); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = val.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj4 in componentsInChildren6) { obj4.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj4.EffectPrefab, pool.transform); obj4.EffectPrefab.damageMultiplier = float.Parse(value10); ((Component)obj4).gameObject.SetColor(white, bool.Parse(value13)); } } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<DodgeMove>()) && value6 != "" && value6 != null) { DodgeMove[] componentsInChildren9 = val.GetComponentsInChildren<DodgeMove>(); for (int num2 = 0; num2 < componentsInChildren9.Length; num2++) { componentsInChildren9[num2].forceMultiplier = float.Parse(value6); } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<UnitSpawner>()) && value7 != "" && value7 != null) { UnitSpawner[] componentsInChildren10 = val.GetComponentsInChildren<UnitSpawner>(); for (int num3 = 0; num3 < componentsInChildren10.Length; num3++) { UnitBlueprint value15 = componentsInChildren10[num3].unitBlueprint; perunits.TryGetValue(value7, out value15); componentsInChildren10[num3].unitBlueprint = value15; } } if (value9 != null && value9 != "") { ConditionalEvent[] componentsInChildren11 = val.GetComponentsInChildren<ConditionalEvent>(); for (int num4 = 0; num4 < componentsInChildren11.Length; num4++) { ConditionalEventInstance[] events = componentsInChildren11[num4].events; for (int num5 = 0; num5 < events.Length; num5++) { EventCondition[] conditions = events[num5].conditions; foreach (EventCondition val3 in conditions) { if ((int)val3.conditionType == 0) { val3.counter = float.Parse(value9); val3.value = float.Parse(value9); val3.valueType = (ValueType)1; val3.cooldownRange = float.Parse(value9); val3.extraRandomCooldown = 0f; } } } } } Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)ContentDatabase.Instance().LandfallContentDatabase.GetField<LandfallContentDatabase>("m_combatMoves"); dictionary.Add(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID, val); EditorTools.SetField<LandfallContentDatabase>(ContentDatabase.Instance().LandfallContentDatabase, "m_combatMoves", dictionary); Dictionary<DatabaseID, Object> dictionary2 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader); dictionary2.Add(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID, (Object)(object)val); typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary2); moves.Add(val); return val; } } public static class EditorTools { public static T SetField<T>(T self, string name, object value) where T : class { FieldInfo field = typeof(T).GetField(name, (BindingFlags)(-1)); if (field != null) { field.SetValue(self, value); } return self; } public static void Log(object v) { Debug.Log((object)("[MoveEditor:FhpSlime]" + v)); } public static void Warning(object v) { Debug.LogWarning((object)("[MoveEditor:FhpSlime]" + v)); } public static void Error(object v) { Debug.LogError((object)("[MoveEditor:FhpSlime]" + v)); } public static T SetHideFlags<T>(this T obj, HideFlags flags = 52) where T : Object { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ((Object)obj).hideFlags = flags; return obj; } public static Transform SetHideFlagsChildren(this Transform tf, HideFlags flags = 52) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)tf).gameObject != (Object)null) { ((Component)tf).gameObject.SetHideFlags<GameObject>(flags); } if (tf.childCount > 0) { for (int i = 0; i < tf.childCount; i++) { tf.GetChild(i).SetHideFlagsChildren(flags); } } return tf; } public static object InvokeMethod<T>(this T self, string name, object[] parameters) where T : class { MethodInfo methodInfo = AccessTools.Method(typeof(T), name, (Type[])null, (Type[])null); object result = null; if (methodInfo != null && methodInfo.ReturnType != typeof(void)) { result = methodInfo.Invoke(self, parameters); } return result; } public static void SetColor(this GameObject gameObject, Color color, bool par) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Shader.Find("Standard")); val.SetOverrideTag("RenderType", "Transparent"); val.SetFloat("_Mode", 3f); val.SetInt("_SrcBlend", 5); val.SetInt("_DstBlend", 10); val.EnableKeyword("_ALPHABLEND_ON"); val.color = color; val.renderQueue = 3000; Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(); foreach (Renderer val2 in componentsInChildren) { List<Material> list = new List<Material>(); Material[] materials = val2.materials; for (int j = 0; j < materials.Length; j++) { _ = materials[j]; list.Add(val); } val2.materials = list.ToArray(); } ParticleSystemRenderer[] componentsInChildren2 = gameObject.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val3 in componentsInChildren2) { if (!par) { ((Renderer)val3).enabled = false; } List<Material> list2 = new List<Material>(); Material[] materials = ((Renderer)val3).materials; for (int j = 0; j < materials.Length; j++) { _ = materials[j]; list2.Add(val); } ((Renderer)val3).materials = list2.ToArray(); } } } public static class Tool { public static object GetField<T>(this T self, string name) where T : class { FieldInfo field = typeof(T).GetField(name, (BindingFlags)(-1)); if (field != null) { return field.GetValue(self); } return null; } public static T SetField<T>(this T self, string name, object value) where T : class { FieldInfo field = typeof(T).GetField(name, (BindingFlags)(-1)); if (field != null) { field.SetValue(self, value); } return self; } } } public class MoveLoader : MonoBehaviour { [Serializable] [CompilerGenerated] private sealed class <>c__1 { public static readonly <>c__1 <>9 = new <>c__1(); public static UnityAction <>9__0_0; internal void <SceneLoaded>b__0_0() { TABSSceneManager.LoadScene("MoveEditor", false); ServiceLocator.GetService<ITimeService>().SetState(1f, 0.358f, true); ServiceLocator.GetService<GameStateManager>().EnterNoneState(); } } public GameObject UI; public MoveLoader() { SceneManager.sceneLoaded += SceneLoaded; } public void SceneLoaded(Scene scene, LoadSceneMode loadSceneMode) { //IL_0016: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Expected O, but got Unknown if (((Scene)(ref scene)).name.Contains("MoveEditor")) { MoveEditorCore moveEditorCore = new GameObject { name = "MoveEditorCore", hideFlags = (HideFlags)61 }.AddComponent<MoveEditorCore>(); moveEditorCore.Init(); List<UnitBlueprint> list = new List<UnitBlueprint>(ContentDatabase.Instance().LandfallContentDatabase.GetUnitBlueprints()); Unit componentInChildren = list[0].Spawn(new Vector3(moveEditorCore.RU.transform.position.x, moveEditorCore.RU.transform.position.y, moveEditorCore.RU.transform.position.z), moveEditorCore.RU.transform.rotation, (Team)0, 1f, (UnitPoolInfo?)null)[0].GetComponentInChildren<Unit>(); Unit componentInChildren2 = list[0].Spawn(new Vector3(moveEditorCore.BU.transform.position.x, moveEditorCore.BU.transform.position.y, moveEditorCore.BU.transform.position.z), moveEditorCore.BU.transform.rotation, (Team)1, 1f, (UnitPoolInfo?)null)[0].GetComponentInChildren<Unit>(); ((Component)componentInChildren).gameObject.transform.SetParent(moveEditorCore.RU.transform); componentInChildren.data.maxHealth = float.MaxValue; componentInChildren.data.health = float.MaxValue; ((Component)componentInChildren).gameObject.AddComponent<MovePlayUnit>(); ((Component)componentInChildren2).gameObject.transform.SetParent(moveEditorCore.BU.transform); componentInChildren2.data.maxHealth = float.MaxValue; componentInChildren2.data.health = float.MaxValue; ((Component)componentInChildren2).gameObject.AddComponent<MovePlayUnit>(); Renderer[] componentsInChildren = ((Component)componentInChildren).gameObject.GetComponentsInChildren<Renderer>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].enabled = false; } componentsInChildren = ((Component)componentInChildren2).gameObject.GetComponentsInChildren<Renderer>(); for (int j = 0; j < componentsInChildren.Length; j++) { componentsInChildren[j].enabled = false; } for (float num = 1f; num > 0f; num -= Time.deltaTime) { } Rigidbody[] allRigs = componentInChildren.data.allRigs.AllRigs; for (int k = 0; k < allRigs.Length; k++) { allRigs[k].isKinematic = true; } allRigs = componentInChildren2.data.allRigs.AllRigs; for (int l = 0; l < allRigs.Length; l++) { allRigs[l].isKinematic = true; } } if (!((Scene)(ref scene)).name.ToLower().Contains("menu")) { return; } GameObject val = GameObject.Find("Canvas"); if (!((Object)(object)val != (Object)null)) { return; } Button[] componentsInChildren2 = val.GetComponentsInChildren<Button>(); foreach (Button val2 in componentsInChildren2) { if (!(((Object)((Component)val2).gameObject).name == "Quit") || !((Object)(object)GameObject.Find("Move Editor") == (Object)null)) { continue; } GameObject obj = Object.Instantiate<GameObject>(((Component)val2).gameObject); ((Object)obj).name = "Move Editor"; obj.transform.parent = ((Component)val2).transform.parent; obj.transform.SetSiblingIndex(((Component)val2).transform.GetSiblingIndex()); TextMeshProUGUI component = ((Component)obj.transform.GetChild(0)).GetComponent<TextMeshProUGUI>(); ((Component)component).GetComponent<LocalizeText>().LocaleID = "Move Editor"; Object.DestroyImmediate((Object)(object)((Component)component).GetComponent<LocalizeText>()); Object.DestroyImmediate((Object)(object)((Component)component).GetComponent<MainMenuQuitGame>()); ((UnityEventBase)obj.GetComponent<Button>().onClick).RemoveAllListeners(); ButtonClickedEvent onClick = obj.GetComponent<Button>().onClick; object obj2 = <>c__1.<>9__0_0; if (obj2 == null) { UnityAction val3 = delegate { TABSSceneManager.LoadScene("MoveEditor", false); ServiceLocator.GetService<ITimeService>().SetState(1f, 0.358f, true); ServiceLocator.GetService<GameStateManager>().EnterNoneState(); }; <>c__1.<>9__0_0 = val3; obj2 = (object)val3; } ((UnityEvent)onClick).AddListener((UnityAction)obj2); } } public T DeepCopyOf<T>(T self, T from) where T : class { FieldInfo[] fields = typeof(T).GetFields((BindingFlags)(-1)); foreach (FieldInfo fieldInfo in fields) { try { fieldInfo.SetValue(self, fieldInfo.GetValue(from)); } catch { Debug.Log((object)"[MoveEditor] Couldn't DeepCopy a field... :("); } } PropertyInfo[] properties = typeof(T).GetProperties((BindingFlags)(-1)); foreach (PropertyInfo propertyInfo in properties) { if (propertyInfo.CanWrite && propertyInfo.CanRead) { try { propertyInfo.SetValue(self, propertyInfo.GetValue(from)); } catch { Debug.Log((object)"[MoveEditor] Couldn't DeepCopy a property... :("); } } } return self; } } public class MoveEditorCore : MonoBehaviour { [Serializable] [CompilerGenerated] private sealed class <>c__53 { public static readonly <>c__53 <>9 = new <>c__53(); public static UnityAction <>9__0_3; public static UnityAction <>9__0_4; public static UnityAction <>9__0_5; internal void <Init>b__0_3() { string movePath = MoveEditor.MovePath; Process.Start("explorer.exe", movePath); } internal void <Init>b__0_4() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)ContentDatabase.Instance().LandfallContentDatabase.GetField<LandfallContentDatabase>("m_combatMoves"); List<DatabaseID> list = new List<DatabaseID>(); int count = MoveEditor.moves.Count; int num = 0; for (int i = 0; i < count; i++) { GameObject val = MoveEditor.moves[i - num]; EditorTools.Log("Get:" + ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.Name); if (!list.Contains(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID)) { list.Add(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID); if (dictionary.ContainsKey(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID)) { EditorTools.Log("Find:" + ((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.Name); dictionary.Remove(((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).Entity.GUID); MoveEditor.moves.Remove(val); Object.Destroy((Object)(object)val); num++; } } } EditorTools.SetField<LandfallContentDatabase>(ContentDatabase.Instance().LandfallContentDatabase, "m_combatMoves", dictionary); EditorStart.moveeditor.ReaderStart(); } internal void <Init>b__0_5() { TABSSceneManager.LoadMainMenu(); } } public GameObject Save; public GameObject Exit; public GameObject PerUnit; public GameObject PerMove; public GameObject PerMoveSearch; public GameObject PerObejcettoSpawn; public GameObject PerObejcettoSpawnSearch; public GameObject CD; public GameObject setColor; public GameObject ScreenSh; public GameObject RGB; public GameObject Force; public GameObject ID; public GameObject Damage; public static bool start; public GameObject ForceBox; public GameObject ForceBoxPoint; public GameObject PlayButton; public GameObject DeletButton; public GameObject Name; public GameObject ModID; public GameObject RU; public GameObject BU; public Dictionary<string, string> laukey; public GameObject ShowK; public GameObject PerUnitSearch; public GameObject UseParticle; public GameObject CheckMove; public GameObject ReLoad; public void Init() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Expected O, but got Unknown //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Expected O, but got Unknown //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Expected O, but got Unknown laukey = Localizer.GetLanguage((Language)typeof(Localizer).GetField("m_locale", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)); Name = GameObject.Find("Canvas/Name"); Save = GameObject.Find("Canvas/Save"); Exit = GameObject.Find("Canvas/Exit"); PerMove = GameObject.Find("Canvas/Per Move"); PerMoveSearch = GameObject.Find("Canvas/search"); PerObejcettoSpawn = GameObject.Find("Canvas/PerEx"); SetShow(PerObejcettoSpawn, this, MoveEditor_ShowOn.Type.PerObjectSpawn); PerObejcettoSpawnSearch = GameObject.Find("Canvas/search (1)"); SetShow(PerObejcettoSpawnSearch, this, MoveEditor_ShowOn.Type.PerObjectSpawn); SetShow(GameObject.Find("Canvas/Text (3)"), this, MoveEditor_ShowOn.Type.PerObjectSpawn); PerUnit = GameObject.Find("Canvas/PerUnits"); PerUnitSearch = GameObject.Find("Canvas/search (2)"); SetShow(PerUnit, this, MoveEditor_ShowOn.Type.PerUnitSpawn); SetShow(PerUnitSearch, this, MoveEditor_ShowOn.Type.PerUnitSpawn); SetShow(GameObject.Find("Canvas/Text (4)"), this, MoveEditor_ShowOn.Type.PerUnitSpawn); RGB = GameObject.Find("Canvas/RGB"); setColor = GameObject.Find("Canvas/SetColor?"); CD = GameObject.Find("Canvas/CD"); ScreenSh = GameObject.Find("Canvas/SC"); SetShow(ScreenSh, this, MoveEditor_ShowOn.Type.Screen); SetShow(GameObject.Find("Canvas/Text (8)"), this, MoveEditor_ShowOn.Type.Screen); ModID = GameObject.Find("Canvas/ModId"); ID = GameObject.Find("Canvas/ID"); Damage = GameObject.Find("Canvas/Damage"); Force = GameObject.Find("Canvas/PDF"); SetShow(Force, this, MoveEditor_ShowOn.Type.Force); SetShow(GameObject.Find("Canvas/Text (5)"), this, MoveEditor_ShowOn.Type.Force); ShowK = GameObject.Find("Canvas/InFormationShow"); UseParticle = GameObject.Find("Canvas/UseParticle"); ForceBox = GameObject.Find("ForceBox"); ForceBoxPoint = GameObject.Find("ForceBoxPoint"); PlayButton = GameObject.Find("Canvas/Play"); DeletButton = GameObject.Find("Canvas/Delet"); CheckMove = GameObject.Find("Canvas/CheckMove"); ReLoad = GameObject.Find("Canvas/ReLoad"); RU = GameObject.Find("RU"); BU = GameObject.Find("BU"); RGB.AddComponent<Colors>(); PerMove.AddComponent<PerMoves>().editorCore = this; PerObejcettoSpawn.AddComponent<PerObjects>().editorCore = this; PerMoveSearch.AddComponent<SearchMove>().dropdownper = PerMove; ((UnityEvent<string>)(object)PerMoveSearch.GetComponentInChildren<InputField>().onValueChange).AddListener((UnityAction<string>)delegate(string value) { PerMoveSearch.GetComponentInChildren<SearchMove>().OnVc(value); }); ((UnityEvent<string>)(object)PerObejcettoSpawnSearch.GetComponentInChildren<InputField>().onValueChange).AddListener((UnityAction<string>)delegate(string value) { PerObejcettoSpawnSearch.GetComponentInChildren<SearchObject>().OnVc(value); }); PerObejcettoSpawnSearch.AddComponent<SearchObject>().dropdownper = PerObejcettoSpawn; PerUnit.AddComponent<PerUnits>().editorCore = this; PerUnitSearch.AddComponent<SearchUnit>().dropdownper = PerUnit; ((UnityEvent<string>)(object)PerUnitSearch.GetComponentInChildren<InputField>().onValueChange).AddListener((UnityAction<string>)delegate(string value) { PerUnitSearch.GetComponentInChildren<SearchUnit>().OnVc(value); }); ButtonClickedEvent onClick = CheckMove.GetComponentInChildren<Button>().onClick; object obj = <>c__53.<>9__0_3; if (obj == null) { UnityAction val = delegate { string movePath = MoveEditor.MovePath; Process.Start("explorer.exe", movePath); }; <>c__53.<>9__0_3 = val; obj = (object)val; } ((UnityEvent)onClick).AddListener((UnityAction)obj); ButtonClickedEvent onClick2 = ReLoad.GetComponentInChildren<Button>().onClick; object obj2 = <>c__53.<>9__0_4; if (obj2 == null) { UnityAction val2 = delegate { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)ContentDatabase.Instance().LandfallContentDatabase.GetField<LandfallContentDatabase>("m_combatMoves"); List<DatabaseID> list = new List<DatabaseID>(); int count = MoveEditor.moves.Count; int num = 0; for (int i = 0; i < count; i++) { GameObject val4 = MoveEditor.moves[i - num]; EditorTools.Log("Get:" + ((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.Name); if (!list.Contains(((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.GUID)) { list.Add(((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.GUID); if (dictionary.ContainsKey(((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.GUID)) { EditorTools.Log("Find:" + ((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.Name); dictionary.Remove(((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.GUID); MoveEditor.moves.Remove(val4); Object.Destroy((Object)(object)val4); num++; } } } EditorTools.SetField<LandfallContentDatabase>(ContentDatabase.Instance().LandfallContentDatabase, "m_combatMoves", dictionary); EditorStart.moveeditor.ReaderStart(); }; <>c__53.<>9__0_4 = val2; obj2 = (object)val2; } ((UnityEvent)onClick2).AddListener((UnityAction)obj2); ForceBox.AddComponent<Rigidbody>(); Save.AddComponent<Save>().editorCore = this; PlayButton.AddComponent<Play>().editorCore = this; DeletButton.AddComponent<Delet>().editorCore = this; ShowK.AddComponent<ShowMove>().editorCore = this; ButtonClickedEvent onClick3 = Exit.GetComponentInChildren<Button>().onClick; object obj3 = <>c__53.<>9__0_5; if (obj3 == null) { UnityAction val3 = delegate { TABSSceneManager.LoadMainMenu(); }; <>c__53.<>9__0_5 = val3; obj3 = (object)val3; } ((UnityEvent)onClick3).AddListener((UnityAction)obj3); } static MoveEditorCore() { } public static void SetShow(GameObject canva, MoveEditorCore core, MoveEditor_ShowOn.Type type) { MoveEditor_ShowOn moveEditor_ShowOn = canva.AddComponent<MoveEditor_ShowOn>(); moveEditor_ShowOn.editorCore = core; moveEditor_ShowOn.type = type; } } namespace Move_Editor.Script { public class Colors : MonoBehaviour { public GameObject R; public GameObject G; public GameObject B; public GameObject A; private void Start() { R = ((Component)((Component)this).transform.GetChild(0)).gameObject; G = ((Component)((Component)this).transform.GetChild(1)).gameObject; B = ((Component)((Component)this).transform.GetChild(2)).gameObject; A = ((Component)((Component)this).transform.GetChild(3)).gameObject; } private void Update() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) if (R.GetComponentInChildren<InputField>().text != "" && G.GetComponentInChildren<InputField>().text != "" && B.GetComponentInChildren<InputField>().text != "" && A.GetComponentInChildren<InputField>().text != "") { float result = 1f; float result2 = 1f; float result3 = 1f; float result4 = 1f; float.TryParse(R.GetComponentInChildren<InputField>().text, out result); float.TryParse(G.GetComponentInChildren<InputField>().text, out result2); float.TryParse(B.GetComponentInChildren<InputField>().text, out result3); float.TryParse(A.GetComponentInChildren<InputField>().text, out result4); ((Graphic)((Component)this).GetComponentInChildren<Image>()).color = new Color(result, result2, result3, result4); } } } public class PerMoves : MonoBehaviour { public Dictionary<string, GameObject> permoves = new Dictionary<string, GameObject>(); public MoveEditorCore editorCore; public void Start() { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown SpecialAbility[] array = Resources.FindObjectsOfTypeAll<SpecialAbility>(); foreach (SpecialAbility val in array) { if (permoves.ContainsKey(((CharacterItem)val).Entity.Name) || !(((CharacterItem)val).Entity.Name != "") || !MoveEditor.permoves.ContainsValue(((Component)val).gameObject)) { continue; } string text = ((CharacterItem)val).Entity.Name; if (editorCore.laukey.ContainsKey(text)) { text = editorCore.laukey[text]; } if (permoves.ContainsKey(text)) { while (permoves.ContainsKey(text)) { text += "-"; } } permoves.Add(text, ((Component)val).gameObject); ((Component)this).GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = text, image = ((CharacterItem)val).Entity.SpriteIcon }); } ((UnityEvent<int>)(object)((Component)this).GetComponentInChildren<Dropdown>().onValueChanged).AddListener((UnityAction<int>)delegate(int index) { OnVc(index); }); } private void OnVc(int index) { Debug.Log((object)index); GameObject val = ((Component)this).GetComponentInChildren<PerMoves>().permoves[((Component)this).GetComponentInChildren<Dropdown>().options[index].text]; if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>()) && Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>().objectToSpawn) && editorCore.PerObejcettoSpawn.GetComponentInChildren<PerObjects>().perobjects.ContainsKey(((Object)val.GetComponentInChildren<SpawnObject>().objectToSpawn).name)) { Debug.Log((object)((Object)val.GetComponentInChildren<SpawnObject>().objectToSpawn).name); editorCore.PerObejcettoSpawnSearch.GetComponentInChildren<InputField>().text = ""; editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value = editorCore.PerObejcettoSpawn.GetComponentInChildren<PerObjects>().perobjects.Keys.ToList().IndexOf(((Object)val.GetComponentInChildren<SpawnObject>().objectToSpawn).name); } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<UnitSpawner>()) && Object.op_Implicit((Object)(object)val.GetComponentInChildren<UnitSpawner>().unitBlueprint) && PerUnits.units.ContainsValue(val.GetComponentInChildren<UnitSpawner>().unitBlueprint)) { Debug.Log((object)PerUnits.units.ToList()[PerUnits.units.Values.ToList().IndexOf(val.GetComponentInChildren<UnitSpawner>().unitBlueprint)].Key); editorCore.PerUnitSearch.GetComponentInChildren<InputField>().text = ""; editorCore.PerUnit.GetComponentInChildren<Dropdown>().value = PerUnits.units.Keys.ToList().IndexOf(PerUnits.units.ToList()[PerUnits.units.Values.ToList().IndexOf(val.GetComponentInChildren<UnitSpawner>().unitBlueprint)].Key); } } } public class PerObjects : MonoBehaviour { public Dictionary<string, GameObject> perobjects = new Dictionary<string, GameObject>(); public MoveEditorCore editorCore; public void Start() { //IL_009e: 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_00af: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown Explosion[] array = Resources.FindObjectsOfTypeAll<Explosion>(); foreach (Explosion val in array) { if (!MoveEditor.perObjects.ContainsValue(((Component)val).gameObject)) { continue; } string text = ((Object)((Component)val).gameObject).name; if (editorCore.laukey.ContainsKey(text)) { text = editorCore.laukey[text]; } if (perobjects.ContainsKey(text)) { while (perobjects.ContainsKey(text)) { text += "-"; } } perobjects.Add(text, ((Component)val).gameObject); ((Component)this).GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = text }); } GameObject[] array2 = Resources.FindObjectsOfTypeAll<GameObject>(); foreach (GameObject val2 in array2) { if (!Object.op_Implicit((Object)(object)val2.GetComponentInChildren<SpawnObject>())) { continue; } SpawnObject[] componentsInChildren = val2.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val3 in componentsInChildren) { if (Object.op_Implicit((Object)(object)val3.objectToSpawn) && !string.IsNullOrEmpty(((Object)val3.objectToSpawn).name)) { string text2 = ((Object)val3.objectToSpawn).name; if (editorCore.laukey.ContainsKey(text2)) { text2 = editorCore.laukey[text2]; } Debug.Log((object)text2); if (!perobjects.ContainsKey(text2) && MoveEditor.perObjects.ContainsValue(val3.objectToSpawn)) { perobjects.Add(text2, val3.objectToSpawn); ((Component)this).GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = text2 }); } } } } } } public class PerUnits : MonoBehaviour { public static Dictionary<string, UnitBlueprint> units; public MoveEditorCore editorCore; public void Start() { //IL_0091: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown UnitBlueprint[] array = Resources.FindObjectsOfTypeAll<UnitBlueprint>(); foreach (UnitBlueprint val in array) { if (!MoveEditor.perunits.ContainsValue(val)) { continue; } string text = val.Entity.Name; if (editorCore.laukey.ContainsKey(text)) { text = editorCore.laukey[text]; } if (units.ContainsKey(text)) { while (units.ContainsKey(text)) { text += "-"; } } units.Add(text, val); ((Component)this).GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = text, image = val.Entity.SpriteIcon }); } } static PerUnits() { units = new Dictionary<string, UnitBlueprint>(); } } public class Save : MonoBehaviour { public MoveEditorCore editorCore; public void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((UnityEvent)((Component)this).GetComponentInChildren<Button>().onClick).AddListener((UnityAction)delegate { SaveMove(); }); } public void SaveMove() { //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_0771: 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) if (!Directory.Exists(Paths.PluginPath + "\\Moves")) { Directory.CreateDirectory(Paths.PluginPath + "\\Moves"); } if (!Directory.Exists(Paths.PluginPath + "\\Moves\\MyMoves")) { Directory.CreateDirectory(Paths.PluginPath + "\\Moves\\MyMoves"); } StreamWriter streamWriter = File.CreateText(Paths.PluginPath + "\\Moves\\MyMoves\\" + editorCore.Name.GetComponentInChildren<InputField>().text + ".move"); Debug.Log((object)("CreateText:" + editorCore.Name.GetComponentInChildren<InputField>().text + ".move")); if (editorCore.Name.GetComponentInChildren<InputField>().text != null) { streamWriter.WriteLine("\"Name\"=" + editorCore.Name.GetComponentInChildren<InputField>().text); Debug.Log((object)("SetName:" + editorCore.Name.GetComponentInChildren<InputField>().text)); } if (editorCore.ModID.GetComponentInChildren<InputField>().text != null) { streamWriter.WriteLine("\"ModID\"=" + editorCore.ModID.GetComponentInChildren<InputField>().text); Debug.Log((object)("SetModID:" + editorCore.ModID.GetComponentInChildren<InputField>().text)); } if (editorCore.ID.GetComponentInChildren<InputField>().text != null) { streamWriter.WriteLine("\"ID\"=" + editorCore.ID.GetComponentInChildren<InputField>().text); Debug.Log((object)("SetID:" + editorCore.ID.GetComponentInChildren<InputField>().text)); } if (editorCore.PerMove.GetComponentInChildren<Dropdown>().options[editorCore.PerMove.GetComponentInChildren<Dropdown>().value].text != null) { streamWriter.WriteLine("\"PerMove\"=" + ((CharacterItem)editorCore.PerMove.GetComponentInChildren<PerMoves>().permoves[editorCore.PerMove.GetComponentInChildren<Dropdown>().options[editorCore.PerMove.GetComponentInChildren<Dropdown>().value].text].GetComponentInChildren<SpecialAbility>()).Entity.Name); Debug.Log((object)("SetPerMove:" + ((CharacterItem)editorCore.PerMove.GetComponentInChildren<PerMoves>().permoves[editorCore.PerMove.GetComponentInChildren<Dropdown>().options[editorCore.PerMove.GetComponentInChildren<Dropdown>().value].text].GetComponentInChildren<SpecialAbility>()).Entity.Name)); } if (editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().options[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value].text != null) { streamWriter.WriteLine("\"PerSpawn\"=" + ((Object)editorCore.PerObejcettoSpawn.GetComponentInChildren<PerObjects>().perobjects[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().options[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value].text].gameObject).name); Debug.Log((object)("SetPerSpawn:" + editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().options[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value].text)); } if (editorCore.PerUnit.GetComponentInChildren<Dropdown>().options[editorCore.PerUnit.GetComponentInChildren<Dropdown>().value].text != null) { streamWriter.WriteLine("\"PerUnitId\"=" + PerUnits.units[editorCore.PerUnit.GetComponentInChildren<Dropdown>().options[editorCore.PerUnit.GetComponentInChildren<Dropdown>().value].text].Entity.Name); Debug.Log((object)("SetPerUnitId:" + PerUnits.units[editorCore.PerUnit.GetComponentInChildren<Dropdown>().options[editorCore.PerUnit.GetComponentInChildren<Dropdown>().value].text].Entity.Name)); } if (editorCore.Force.GetComponentInChildren<InputField>().text != null) { streamWriter.WriteLine("\"PerForce\"=" + editorCore.Force.GetComponentInChildren<InputField>().text); Debug.Log((object)("SetPerForce:" + editorCore.Force.GetComponentInChildren<InputField>().text)); } if (editorCore.CD.GetComponentInChildren<InputField>().text != null) { streamWriter.WriteLine("\"CD\"=" + editorCore.CD.GetComponentInChildren<InputField>().text); Debug.Log((object)("SetCD:" + editorCore.CD.GetComponentInChildren<InputField>().text)); } if (editorCore.Damage.GetComponentInChildren<InputField>().text != null) { streamWriter.WriteLine("\"Damage\"=" + editorCore.Damage.GetComponentInChildren<InputField>().text); Debug.Log((object)("SetDamage:" + editorCore.Damage.GetComponentInChildren<InputField>().text)); } if (editorCore.ScreenSh.GetComponentInChildren<InputField>().text != null) { streamWriter.WriteLine("\"SC\"=" + editorCore.ScreenSh.GetComponentInChildren<InputField>().text); Debug.Log((object)("SetSC:" + editorCore.ScreenSh.GetComponentInChildren<InputField>().text)); } streamWriter.WriteLine("\"SetColor?\"=" + editorCore.setColor.GetComponentInChildren<Toggle>().isOn); streamWriter.WriteLine("\"UseParticle?\"=" + editorCore.UseParticle.GetComponentInChildren<Toggle>().isOn); Debug.Log((object)("SetColor?:" + editorCore.setColor.GetComponentInChildren<Toggle>().isOn)); if (editorCore.setColor.GetComponentInChildren<Toggle>().isOn) { string[] array = new string[8] { "\"Color\"=", null, null, null, null, null, null, null }; int num = 1; Color color = ((Graphic)editorCore.RGB.GetComponent<Image>()).color; array[num] = color.r.ToString(); array[2] = ","; int num2 = 3; array[num2] = color.g.ToString(); array[4] = ","; int num3 = 5; array[num3] = color.b.ToString(); array[6] = ","; array[7] = color.a.ToString(); streamWriter.WriteLine(string.Concat(array)); Color color2 = ((Graphic)editorCore.RGB.GetComponent<Image>()).color; Debug.Log((object)("SetColor:" + ((object)(Color)(ref color2)).ToString())); } streamWriter.Close(); editorCore.ShowK.GetComponentInChildren<ShowMove>().Log("<color=green>Write Move Successfully!</color>\n"); if (Object.op_Implicit((Object)(object)EditorStart.moveeditor.ReadMoveCanlog(new ReaderTexttoJson(new StreamReader(Paths.PluginPath + "\\Moves\\MyMoves\\" + editorCore.Name.GetComponentInChildren<InputField>().text + ".move"))))) { editorCore.ShowK.GetComponentInChildren<ShowMove>().Log("<color=green>Read Move Successfully!</color>\n"); } else { editorCore.ShowK.GetComponentInChildren<ShowMove>().Log("<color=red>[Error]Can't Find the Per Move :(</color>\n"); } Debug.Log((object)"Save and Read Successfully !"); } } public class SearchObject : MonoBehaviour { public GameObject dropdownper; public void OnVc(string value) { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown List<string> list = new List<string>(); foreach (string key in dropdownper.GetComponentInChildren<PerObjects>().perobjects.Keys) { if (key.ToUpper().Contains(value.ToUpper())) { list.Add(key); } } dropdownper.gameObject.GetComponentInChildren<Dropdown>().options.Clear(); if (value == "") { foreach (string key2 in dropdownper.GetComponentInChildren<PerObjects>().perobjects.Keys) { dropdownper.gameObject.GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = key2 }); } } if (list.Count == 0) { ((Component)dropdownper.transform.GetChild(0)).GetComponent<Text>().text = ""; return; } dropdownper.gameObject.GetComponentInChildren<Dropdown>().value = dropdownper.GetComponentInChildren<PerObjects>().perobjects.Keys.ToList().IndexOf(list[0]); ((Component)dropdownper.transform.GetChild(0)).GetComponent<Text>().text = list[0]; foreach (string item in list) { dropdownper.gameObject.GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = item }); } } } public class SearchMove : MonoBehaviour { public GameObject dropdownper; public void OnVc(string value) { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown List<string> list = new List<string>(); foreach (string key in dropdownper.GetComponentInChildren<PerMoves>().permoves.Keys) { if (key.ToUpper().Contains(value.ToUpper())) { list.Add(key); } } dropdownper.gameObject.GetComponentInChildren<Dropdown>().options.Clear(); if (value == "") { foreach (string key2 in dropdownper.GetComponentInChildren<PerMoves>().permoves.Keys) { dropdownper.gameObject.GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = key2 }); } } if (list.Count == 0) { ((Component)dropdownper.transform.GetChild(0)).GetComponent<Text>().text = ""; return; } dropdownper.gameObject.GetComponentInChildren<Dropdown>().value = dropdownper.GetComponentInChildren<PerMoves>().permoves.Keys.ToList().IndexOf(list[0]); ((Component)dropdownper.transform.GetChild(0)).GetComponent<Text>().text = list[0]; foreach (string item in list) { dropdownper.gameObject.GetComponentInChildren<Dropdown>().options.Add(new OptionData { text = item }); } } } public class Play : MonoBehaviour { public MoveEditorCore editorCore; public static GameObject GetMove(MoveEditorCore core, GameObject gameObject2) { //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Expected O, but got Unknown //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Expected O, but got Unknown //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_0a21: Unknown result type (might be due to invalid IL or missing references) string text = ""; string text2 = ""; string text3 = ""; string text4 = ""; string text5 = ""; string text6 = ""; string text7 = ""; string text8 = ""; if (core.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value >= 0) { text5 = core.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().options[core.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value].text; EditorTools.Warning(text5); } if (core.Force.GetComponentInChildren<InputField>().text != null) { text6 = core.Force.GetComponentInChildren<InputField>().text; EditorTools.Warning(text6); } if (core.PerUnit.GetComponentInChildren<Dropdown>().value >= 0) { text = core.PerUnit.GetComponentInChildren<Dropdown>().options[core.PerUnit.GetComponentInChildren<Dropdown>().value].text; EditorTools.Warning(text); } text4 = core.setColor.GetComponentInChildren<Toggle>().isOn.ToString(); EditorTools.Warning(text4); if (core.setColor.GetComponentInChildren<Toggle>().isOn) { string[] array = new string[5]; int num = 0; array[num] = ((Graphic)core.RGB.GetComponentInChildren<Image>()).color.r.ToString(); array[1] = ","; int num2 = 2; array[num2] = ((Graphic)core.RGB.GetComponentInChildren<Image>()).color.g.ToString(); array[3] = ","; int num3 = 4; array[num3] = ((Graphic)core.RGB.GetComponentInChildren<Image>()).color.b.ToString(); text2 = string.Concat(array); EditorTools.Warning(text2); } if (core.CD.GetComponentInChildren<InputField>().text != null) { text3 = core.CD.GetComponentInChildren<InputField>().text; EditorTools.Warning(text3); } if (core.Damage.GetComponentInChildren<InputField>().text != null) { text7 = core.Damage.GetComponentInChildren<InputField>().text; EditorTools.Warning(text7); } if (core.ScreenSh.GetComponentInChildren<InputField>().text != null) { text8 = core.ScreenSh.GetComponentInChildren<InputField>().text; EditorTools.Warning(text8); } gameObject2.SetHideFlags<GameObject>((HideFlags)52); if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren = gameObject2.GetComponentsInChildren<SpawnObject>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (text5 != null && MoveEditor.perObjects.ContainsKey(text5)) { componentsInChildren[i].objectToSpawn = MoveEditor.perObjects[text5]; } } } if (text8 != "" && Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<AddScreensShake>())) { AddScreensShake[] componentsInChildren2 = gameObject2.GetComponentsInChildren<AddScreensShake>(); for (int j = 0; j < componentsInChildren2.Length; j++) { componentsInChildren2[j].amount = float.Parse(text8); } } if (text7 != "" && (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<Explosion>()) || Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<SpawnObject>()) || Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<AddObjectEffect>()) || Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<CollisionWeapon>()) || Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<ExplosionAddEffect>()))) { if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren3 = gameObject2.GetComponentsInChildren<Explosion>(); for (int k = 0; k < componentsInChildren3.Length; k++) { componentsInChildren3[k].damage = float.Parse(text7); } } if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren4 = gameObject2.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val in componentsInChildren4) { val.objectToSpawn = Object.Instantiate<GameObject>(val.objectToSpawn, MoveEditor.pool.transform); if (Object.op_Implicit((Object)(object)val.objectToSpawn.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren5 = val.objectToSpawn.GetComponentsInChildren<Explosion>(); for (int m = 0; m < componentsInChildren5.Length; m++) { componentsInChildren5[m].damage = float.Parse(text7); } } if (Object.op_Implicit((Object)(object)val.objectToSpawn.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = val.objectToSpawn.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj in componentsInChildren6) { obj.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj.EffectPrefab, MoveEditor.pool.transform); obj.EffectPrefab.damageMultiplier = float.Parse(text7); } } } } if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<CollisionWeapon>())) { CollisionWeapon[] componentsInChildren7 = gameObject2.GetComponentsInChildren<CollisionWeapon>(); for (int num4 = 0; num4 < componentsInChildren7.Length; num4++) { componentsInChildren7[num4].damage = float.Parse(text7); } } if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = gameObject2.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj2 in componentsInChildren6) { obj2.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj2.EffectPrefab, MoveEditor.pool.transform); obj2.EffectPrefab.damageMultiplier = float.Parse(text7); } } } if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<DodgeMove>()) && text6 != "" && text6 != null) { DodgeMove[] componentsInChildren8 = gameObject2.GetComponentsInChildren<DodgeMove>(); for (int num5 = 0; num5 < componentsInChildren8.Length; num5++) { componentsInChildren8[num5].forceMultiplier = float.Parse(text6); } } if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<UnitSpawner>()) && text != "" && text != null) { UnitSpawner[] componentsInChildren9 = gameObject2.GetComponentsInChildren<UnitSpawner>(); for (int num6 = 0; num6 < componentsInChildren9.Length; num6++) { UnitBlueprint unitBlueprint = componentsInChildren9[num6].unitBlueprint; foreach (UnitBlueprint unit in LandfallUnitDatabase.GetDatabase().UnitList) { UnitBlueprint val2 = unit; if (val2.Entity.GUID.m_ID == int.Parse(text) && val2.Entity.GUID.m_modID == -2) { unitBlueprint = val2; } } componentsInChildren9[num6].unitBlueprint = unitBlueprint; } } if (text2 != "" && text2 != null && (text4 == "" || bool.Parse(text4))) { string[] array2 = text2.Split(new char[1] { ',' }); Color color = default(Color); ((Color)(ref color))..ctor(float.Parse(array2[0]), float.Parse(array2[1]), float.Parse(array2[2])); Material val3 = new Material(Shader.Find("Standard")); val3.color = color; val3.renderQueue = 3000; Renderer[] componentsInChildren10 = gameObject2.GetComponentsInChildren<Renderer>(); foreach (Renderer val4 in componentsInChildren10) { List<Material> list = new List<Material>(); Material[] materials = val4.materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list.Add(val3); } val4.materials = list.ToArray(); } ParticleSystemRenderer[] componentsInChildren11 = gameObject2.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val5 in componentsInChildren11) { if (!core.UseParticle.GetComponentInChildren<Toggle>().isOn) { ((Renderer)val5).enabled = false; } List<Material> list2 = new List<Material>(); Material[] materials = ((Renderer)val5).materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list2.Add(val3); } ((Renderer)val5).materials = list2.ToArray(); } if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren4 = gameObject2.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val6 in componentsInChildren4) { componentsInChildren10 = val6.objectToSpawn.GetComponentsInChildren<Renderer>(); foreach (Renderer val7 in componentsInChildren10) { List<Material> list3 = new List<Material>(); Material[] materials = val7.materials; for (int num7 = 0; num7 < materials.Length; num7++) { _ = materials[num7]; list3.Add(val3); } val7.materials = list3.ToArray(); } componentsInChildren11 = val6.objectToSpawn.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val8 in componentsInChildren11) { if (!core.UseParticle.GetComponentInChildren<Toggle>().isOn) { ((Renderer)val8).enabled = false; } List<Material> list4 = new List<Material>(); Material[] materials = ((Renderer)val8).materials; for (int num7 = 0; num7 < materials.Length; num7++) { _ = materials[num7]; list4.Add(val3); } ((Renderer)val8).materials = list4.ToArray(); } } } if (Object.op_Implicit((Object)(object)gameObject2.GetComponentInChildren<AddObjectEffect>())) { AddObjectEffect[] componentsInChildren12 = gameObject2.GetComponentsInChildren<AddObjectEffect>(); for (int num8 = 0; num8 < componentsInChildren12.Length; num8++) { GameObject gameObject3 = ((Component)componentsInChildren12[num8].EffectPrefab).gameObject; componentsInChildren10 = gameObject3.GetComponentsInChildren<Renderer>(); foreach (Renderer val9 in componentsInChildren10) { List<Material> list5 = new List<Material>(); Material[] materials = val9.materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list5.Add(val3); } val9.materials = list5.ToArray(); } componentsInChildren11 = gameObject3.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val10 in componentsInChildren11) { if (!core.UseParticle.GetComponentInChildren<Toggle>().isOn) { ((Renderer)val10).enabled = false; } List<Material> list6 = new List<Material>(); Material[] materials = ((Renderer)val10).materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list6.Add(val3); } ((Renderer)val10).materials = list6.ToArray(); } } } if (text3 != null && text3 != "") { ConditionalEvent[] componentsInChildren13 = gameObject2.GetComponentsInChildren<ConditionalEvent>(); for (int num9 = 0; num9 < componentsInChildren13.Length; num9++) { ConditionalEventInstance[] events = componentsInChildren13[num9].events; for (int num10 = 0; num10 < events.Length; num10++) { EventCondition[] conditions = events[num10].conditions; foreach (EventCondition val11 in conditions) { if ((int)val11.conditionType == 0) { val11.counter = float.Parse(text3); val11.value = float.Parse(text3); val11.valueType = (ValueType)1; val11.cooldownRange = float.Parse(text3); val11.extraRandomCooldown = 0f; } } } } } } return gameObject2; } public void PlayMove() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_0714: Unknown result type (might be due to invalid IL or missing references) //IL_0719: Unknown result type (might be due to invalid IL or missing references) //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Expected O, but got Unknown //IL_0777: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_0b3b: Unknown result type (might be due to invalid IL or missing references) //IL_0b57: Unknown result type (might be due to invalid IL or missing references) float result = 1f; float.TryParse(editorCore.Force.GetComponentInChildren<InputField>().text, out result); _ = editorCore.PerMove.GetComponentInChildren<Dropdown>().options[editorCore.PerMove.GetComponentInChildren<Dropdown>().value].text; editorCore.ForceBox.GetComponentInChildren<Rigidbody>().AddForce(editorCore.ForceBox.transform.up * result * 1200f, (ForceMode)5); if (!((Object)(object)editorCore.PerObejcettoSpawn.GetComponentInChildren<PerObjects>().perobjects[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().options[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value].text] != (Object)null)) { return; } ((Component)editorCore.RU.transform.GetChild(0)).GetComponentInChildren<Unit>().data.targetData = ((Component)editorCore.BU.transform.GetChild(0)).GetComponentInChildren<Unit>().data; GameObject val = Object.Instantiate<GameObject>(editorCore.PerMove.GetComponentInChildren<PerMoves>().permoves[editorCore.PerMove.GetComponentInChildren<Dropdown>().options[editorCore.PerMove.GetComponentInChildren<Dropdown>().value].text], editorCore.RU.transform.GetChild(0).position, editorCore.RU.transform.GetChild(0).rotation, editorCore.RU.transform.GetChild(0)); val.SetHideFlags<GameObject>((HideFlags)52); if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren = val.GetComponentsInChildren<SpawnObject>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].objectToSpawn = editorCore.PerObejcettoSpawn.GetComponentInChildren<PerObjects>().perobjects[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().options[editorCore.PerObejcettoSpawn.GetComponentInChildren<Dropdown>().value].text]; } } if (editorCore.ScreenSh.GetComponentInChildren<InputField>().text != "" && Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddScreensShake>())) { float result2 = 1f; float.TryParse(editorCore.ScreenSh.GetComponentInChildren<InputField>().text, out result2); AddScreensShake[] componentsInChildren2 = val.GetComponentsInChildren<AddScreensShake>(); for (int j = 0; j < componentsInChildren2.Length; j++) { componentsInChildren2[j].amount = result2; } } if (editorCore.Damage.GetComponentInChildren<InputField>().text != "" && (Object.op_Implicit((Object)(object)val.GetComponentInChildren<Explosion>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddObjectEffect>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<CollisionWeapon>()) || Object.op_Implicit((Object)(object)val.GetComponentInChildren<ExplosionAddEffect>()))) { float result3 = 100f; float.TryParse(editorCore.Damage.GetComponentInChildren<InputField>().text, out result3); if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren3 = val.GetComponentsInChildren<Explosion>(); for (int k = 0; k < componentsInChildren3.Length; k++) { componentsInChildren3[k].damage = result3; } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren4 = val.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val2 in componentsInChildren4) { val2.objectToSpawn = Object.Instantiate<GameObject>(val2.objectToSpawn, MoveEditor.pool.transform); if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<Explosion>())) { Explosion[] componentsInChildren5 = val2.objectToSpawn.GetComponentsInChildren<Explosion>(); for (int m = 0; m < componentsInChildren5.Length; m++) { componentsInChildren5[m].damage = result3; } } val2.objectToSpawn.SetColor(((Graphic)editorCore.RGB.GetComponentInChildren<Image>()).color, editorCore.UseParticle.GetComponentInChildren<Toggle>().isOn); if (Object.op_Implicit((Object)(object)val2.objectToSpawn.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = val2.objectToSpawn.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj in componentsInChildren6) { obj.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj.EffectPrefab, MoveEditor.pool.transform); obj.EffectPrefab.damageMultiplier = result3; ((Component)obj.EffectPrefab).gameObject.SetColor(((Graphic)editorCore.RGB.GetComponentInChildren<Image>()).color, editorCore.UseParticle.GetComponentInChildren<Toggle>().isOn); } } } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<CollisionWeapon>())) { CollisionWeapon[] componentsInChildren7 = val.GetComponentsInChildren<CollisionWeapon>(); for (int num = 0; num < componentsInChildren7.Length; num++) { componentsInChildren7[num].damage = result3; } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<ExplosionAddEffect>())) { ExplosionAddEffect[] componentsInChildren6 = val.GetComponentsInChildren<ExplosionAddEffect>(); foreach (ExplosionAddEffect obj2 in componentsInChildren6) { obj2.EffectPrefab = Object.Instantiate<UnitEffectBase>(obj2.EffectPrefab, MoveEditor.pool.transform); obj2.EffectPrefab.damageMultiplier = result3; ((Component)obj2.EffectPrefab).gameObject.SetColor(((Graphic)editorCore.RGB.GetComponentInChildren<Image>()).color, editorCore.UseParticle.GetComponentInChildren<Toggle>().isOn); } } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<DodgeMove>()) && editorCore.Force.GetComponentInChildren<InputField>().text != "") { float result4 = 1f; float.TryParse(editorCore.Force.GetComponentInChildren<InputField>().text, out result4); DodgeMove[] componentsInChildren8 = val.GetComponentsInChildren<DodgeMove>(); for (int num2 = 0; num2 < componentsInChildren8.Length; num2++) { componentsInChildren8[num2].forceMultiplier = result4; } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<UnitSpawner>()) && (Object)(object)PerUnits.units[editorCore.PerUnit.GetComponentInChildren<Dropdown>().options[editorCore.PerUnit.GetComponentInChildren<Dropdown>().value].text] != (Object)null) { UnitSpawner[] componentsInChildren9 = val.GetComponentsInChildren<UnitSpawner>(); for (int num3 = 0; num3 < componentsInChildren9.Length; num3++) { componentsInChildren9[num3].unitBlueprint = PerUnits.units[editorCore.PerUnit.GetComponentInChildren<Dropdown>().options[editorCore.PerUnit.GetComponentInChildren<Dropdown>().value].text]; } } if (editorCore.setColor.GetComponentInChildren<Toggle>().isOn) { Color color = ((Graphic)editorCore.RGB.GetComponentInChildren<Image>()).color; Material val3 = new Material(Shader.Find("Standard")); val3.SetOverrideTag("RenderType", "Transparent"); val3.SetFloat("_Mode", 3f); val3.SetInt("_SrcBlend", 5); val3.SetInt("_DstBlend", 10); val3.EnableKeyword("_ALPHABLEND_ON"); val3.color = color; val3.renderQueue = 3000; Renderer[] componentsInChildren10 = val.GetComponentsInChildren<Renderer>(); foreach (Renderer val4 in componentsInChildren10) { List<Material> list = new List<Material>(); Material[] materials = val4.materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list.Add(val3); } val4.materials = list.ToArray(); } ParticleSystemRenderer[] componentsInChildren11 = val.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val5 in componentsInChildren11) { if (!editorCore.UseParticle.GetComponentInChildren<Toggle>().isOn) { ((Renderer)val5).enabled = false; } List<Material> list2 = new List<Material>(); Material[] materials = ((Renderer)val5).materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list2.Add(val3); } ((Renderer)val5).materials = list2.ToArray(); } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<SpawnObject>())) { SpawnObject[] componentsInChildren4 = val.GetComponentsInChildren<SpawnObject>(); foreach (SpawnObject val6 in componentsInChildren4) { componentsInChildren10 = val6.objectToSpawn.GetComponentsInChildren<Renderer>(); foreach (Renderer val7 in componentsInChildren10) { List<Material> list3 = new List<Material>(); Material[] materials = val7.materials; for (int num4 = 0; num4 < materials.Length; num4++) { _ = materials[num4]; list3.Add(val3); } val7.materials = list3.ToArray(); } componentsInChildren11 = val6.objectToSpawn.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val8 in componentsInChildren11) { if (!editorCore.UseParticle.GetComponentInChildren<Toggle>().isOn) { ((Renderer)val8).enabled = false; } List<Material> list4 = new List<Material>(); Material[] materials = ((Renderer)val8).materials; for (int num4 = 0; num4 < materials.Length; num4++) { _ = materials[num4]; list4.Add(val3); } ((Renderer)val8).materials = list4.ToArray(); } } } if (Object.op_Implicit((Object)(object)val.GetComponentInChildren<AddObjectEffect>())) { AddObjectEffect[] componentsInChildren12 = val.GetComponentsInChildren<AddObjectEffect>(); for (int num5 = 0; num5 < componentsInChildren12.Length; num5++) { GameObject gameObject = ((Component)componentsInChildren12[num5].EffectPrefab).gameObject; componentsInChildren10 = gameObject.GetComponentsInChildren<Renderer>(); foreach (Renderer val9 in componentsInChildren10) { List<Material> list5 = new List<Material>(); Material[] materials = val9.materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list5.Add(val3); } val9.materials = list5.ToArray(); } componentsInChildren11 = gameObject.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val10 in componentsInChildren11) { if (!editorCore.UseParticle.GetComponentInChildren<Toggle>().isOn) { ((Renderer)val10).enabled = false; } List<Material> list6 = new List<Material>(); Material[] materials = ((Renderer)val10).materials; for (int n = 0; n < materials.Length; n++) { _ = materials[n]; list6.Add(val3); } ((Renderer)val10).materials = list6.ToArray(); } } } if (editorCore.CD.GetComponentInChildren<InputField>().text != "") { float result5 = 10f; float.TryParse(editorCore.CD.GetComponentInChildren<InputField>().text, out result5); ConditionalEvent[] componentsInChildren13 = val.GetComponentsInChildren<ConditionalEvent>(); for (int num6 = 0; num6 < componentsInChildren13.Length; num6++) { ConditionalEventInstance[] events = componentsInChildren13[num6].events; for (int num7 = 0; num7 < events.Length; num7++) { EventCondition[] conditions = events[num7].conditions; foreach (EventCondition val11 in conditions) { if ((int)val11.conditionType == 0) { val11.counter = result5; val11.value = result5; val11.valueType = (ValueType)1; } } } } } } ConditionalEvent[] componentsInChildren14 = val.GetComponentsInChildren<ConditionalEvent>(); foreach (ConditionalEvent obj3 in componentsInChildren14) { obj3.DoMovesAndContinuousEvent(obj3.NetworkId); } } public void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((UnityEvent)((Component)this).GetComponentInChildren<Button>().onClick).AddListener((UnityAction)delegate { PlayMove(); }); } } public class Delet : MonoBehaviour { public MoveEditorCore editorCore; public void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown ((UnityEvent)((Component)this).GetComponentInChildren<Button>().onClick).AddListener((UnityAction)delegate { DeletMove(); }); } public void DeletMove() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result t