Decompiled source of AbilityCreator v2.6.0
AbilityCreator.dll
Decompiled 2 weeks 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 System.Text; using BepInEx; using BitCode.Debug; using BitCode.Debug.Commands; using BitCode.Extensions; using DM; using EMPTY; using HarmonyLib; using IDK; using IDK.ExampleAbilites; using IDK.Help_Componets; using IDK.NodeScripts; using IDK.Node_Related_Scripts; using IDK.Node_Related_Scripts.connection_stuff; using Landfall.TABC; using Landfall.TABS; using Landfall.TABS.AI; using Landfall.TABS.AI.Components; using Landfall.TABS.AI.Systems; using Landfall.TABS.GameMode; using Landfall.TABS.GameState; using Landfall.TABS.UnitEditor; using Landfall.TABS.Workshop; using Landfall.TABS_Input; using LevelCreator; using MonoMod.Utils; using Newtonsoft.Json; using ProGrids; using Sirenix.Utilities; using TFBGames; using TMPro; using Unity.Entities; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("Ability Creator")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Yipe")] [assembly: AssemblyCopyright("Copyright © 2022")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3a45c3cf-230c-4310-952f-0887d4266b11")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class AbilityCreatorSavePatch : ISaveUnit { public override ExtraSerializedUnit AddData(ExtraSerializedUnit serializedUnitBlueprint, UnitBlueprint unitBlueprint) { List<NodeScene> list = new List<NodeScene>(); for (int i = 0; i < unitBlueprint.objectsToSpawnAsChildren.Length; i++) { Debug.Log((object)("Checking if abiltiy is custom :" + (object)unitBlueprint.objectsToSpawnAsChildren[i])); if (Object.op_Implicit((Object)(object)unitBlueprint.objectsToSpawnAsChildren[i].GetComponent<NodeRunner>())) { Debug.Log((object)"It is custom!"); NodeRunner component = unitBlueprint.objectsToSpawnAsChildren[i].GetComponent<NodeRunner>(); if (!list.Contains(component.nodeScene)) { list.Add(component.nodeScene); Debug.Log((object)("Added field name:" + component.nodeScene.sceneName)); string s = component.nodeScene.Jsonify((Formatting)1); string data = Convert.ToBase64String(Encoding.UTF8.GetBytes(s)); serializedUnitBlueprint.AddData(component.nodeScene.sceneName, data); Debug.Log((object)"Added Json!"); } } } return serializedUnitBlueprint; } } public static class EnumerableHelper { public static object[] ToArrayIfEnumerable(object obj) { if (obj is IEnumerable source && !(obj is string)) { return source.Cast<object>().ToArray(); } return null; } } public class NodeSceneMovement : MonoBehaviour, IDragHandler, IEventSystemHandler { public RectTransform dragRectTransform; public NodeManager nodeman; private void Awake() { nodeman = Object.FindObjectOfType<NodeManager>(); } public void OnDrag(PointerEventData eventData) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (nodeman.CanMove && (int)eventData.button == 2) { Node[] array = Object.FindObjectsOfType<Node>(); for (int i = 0; i < array.Length; i++) { RectTransform component = ((Component)array[i]).GetComponent<RectTransform>(); component.anchoredPosition += eventData.delta / 2f; } } } } public class NodeWindow : MonoBehaviour, IDragHandler, IEventSystemHandler { public RectTransform dragRectTransform; public NodeManager NodeManager => Object.FindObjectOfType<NodeManager>(); private void Awake() { } public void OnDrag(PointerEventData eventData) { //IL_000f: 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_0094: Unknown result type (might be due to invalid IL or missing references) //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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (!NodeManager.CanMove || (int)eventData.button != 0) { return; } if (NodeManager.SelectedNodes.Contains(((Component)this).GetComponent<Node>())) { for (int i = 0; i < NodeManager.SelectedNodes.Length; i++) { try { RectTransform obj = ((Component)NodeManager.SelectedNodes[i]).GetComponent<NodeWindow>().dragRectTransform; obj.anchoredPosition += eventData.delta / 2f; } catch (Exception) { } } } else { RectTransform obj2 = dragRectTransform; obj2.anchoredPosition += eventData.delta / 2f; } } } [Serializable] public class InnerListWrapper<T> : IEquatable<InnerListWrapper<T>> { public List<T> innerList = new List<T>(); public InnerListWrapper(List<T> list) { innerList = list; } public bool Equals(InnerListWrapper<T> obj) { return base.Equals(obj); } public override int GetHashCode() { return base.GetHashCode(); } public override string ToString() { return base.ToString(); } } [Serializable] public class ListOfListsWrapper<T> : IEquatable<ListOfListsWrapper<T>> { public List<InnerListWrapper<T>> listOfLists = new List<InnerListWrapper<T>>(); public bool Equals(ListOfListsWrapper<T> obj) { return base.Equals(obj); } public override int GetHashCode() { return base.GetHashCode(); } public override string ToString() { return base.ToString(); } } namespace EMPTY { public class ExtraSerializedUnit : SerializedUnitBlueprint { public List<string> extraFieldNames = new List<string>(); public List<string> extraFieldValues = new List<string>(); public void AddData(string field, string data) { if (extraFieldNames.Contains(field)) { int index = extraFieldNames.FindIndex((string n) => n == field); extraFieldNames.RemoveAt(index); extraFieldValues.RemoveAt(index); } extraFieldNames.Add(field); extraFieldValues.Add(data); } } public static class Helper { public static ExtraSerializedUnit TurnExtra(this SerializedUnitBlueprint serializedUnitBlueprint) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) return new ExtraSerializedUnit { attackSpeedMultiplier = serializedUnitBlueprint.attackSpeedMultiplier, customCost = serializedUnitBlueprint.customCost, damageMultiplier = serializedUnitBlueprint.damageMultiplier, leftProjectile = serializedUnitBlueprint.leftProjectile, m_animationMultiplier = serializedUnitBlueprint.m_animationMultiplier, m_armLimitMultiplier = serializedUnitBlueprint.m_armLimitMultiplier, m_attackDistanceCurve = serializedUnitBlueprint.m_attackDistanceCurve, m_combatMoves = serializedUnitBlueprint.m_combatMoves, m_faction = serializedUnitBlueprint.m_faction, m_fistRef = serializedUnitBlueprint.m_fistRef, m_hasRider = serializedUnitBlueprint.m_hasRider, m_health = serializedUnitBlueprint.m_health, m_holdingWithTwoHands = serializedUnitBlueprint.m_holdingWithTwoHands, m_icon = serializedUnitBlueprint.m_icon, m_id = serializedUnitBlueprint.m_id, m_leftWeapon = serializedUnitBlueprint.m_leftWeapon, m_leftWeaponData = serializedUnitBlueprint.m_leftWeaponData, m_massMultiplier = serializedUnitBlueprint.m_massMultiplier, m_movementSpeedMuiltiplier = serializedUnitBlueprint.m_movementSpeedMuiltiplier, m_movementTypes = serializedUnitBlueprint.m_movementTypes, m_name = serializedUnitBlueprint.m_name, m_propData = serializedUnitBlueprint.m_propData, m_props = serializedUnitBlueprint.m_props, m_rider = serializedUnitBlueprint.m_rider, m_rightWeapon = serializedUnitBlueprint.m_rightWeapon, m_rightWeaponData = serializedUnitBlueprint.m_rightWeaponData, m_sizeMultiplier = serializedUnitBlueprint.m_sizeMultiplier, m_stepMultiplier = serializedUnitBlueprint.m_stepMultiplier, m_targetingPriorityMultiplier = serializedUnitBlueprint.m_targetingPriorityMultiplier, m_targetingType = serializedUnitBlueprint.m_targetingType, m_turningData = serializedUnitBlueprint.m_turningData, m_turnSpeed = serializedUnitBlueprint.m_turnSpeed, m_turnSpeedCurve = serializedUnitBlueprint.m_turnSpeedCurve, m_unitBase = serializedUnitBlueprint.m_unitBase, m_weaponSeparation = serializedUnitBlueprint.m_weaponSeparation, rightProjectile = serializedUnitBlueprint.rightProjectile, unitDescription = serializedUnitBlueprint.unitDescription, useCustomCost = serializedUnitBlueprint.useCustomCost, voiceBundle = serializedUnitBlueprint.voiceBundle, voicePitch = serializedUnitBlueprint.voicePitch, voiceVolume = serializedUnitBlueprint.voiceVolume }; } } public abstract class ISaveUnit : MonoBehaviour { public ISaveUnit() { Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); } public abstract ExtraSerializedUnit AddData(ExtraSerializedUnit serializedUnitBlueprint, UnitBlueprint unitBlueprint); } [HarmonyPatch(typeof(CustomUnitHandler))] [HarmonyPatch("SaveUnit")] public class UnitEditorHarmonyPatch { private static bool Prefix(UnitBlueprint unitBlueprint, DatabaseID id = default(DatabaseID), Action refreshDoneCallback = null) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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) Debug.Log((object)"LETS GO THE METHOD HAS BEEN PATCHEDDDDDD"); try { DatabaseID val = default(DatabaseID); if (id == val) { unitBlueprint.Entity.GenerateNewID(); } else { unitBlueprint.Entity.GUID = id; } MethodInfo method = typeof(CustomUnitHandler).GetMethod("SaveIcon", (BindingFlags)(-1)); Action<Exception> action = delegate { ServiceLocator.GetService<CustomContentLoaderModIO>().QuickRefresh((WorkshopContentType)0, refreshDoneCallback); }; ContentDatabase.Instance().AddUserUnitBlueprint(unitBlueprint); val = unitBlueprint.Entity.GUID; string text = ((object)(DatabaseID)(ref val)).ToString(); string customUnitPath = UnitBlueprint.GetCustomUnitPath(text); string iconPath = CustomContentFilePaths.UnitDirectoryPath + "/" + text + "/icon.png"; UnitBlueprint obj = unitBlueprint; val = default(DatabaseID); ExtraSerializedUnit extraSerializedUnit = obj.SerializedUnit(val).TurnExtra(); ISaveUnit[] array = Object.FindObjectsOfType<ISaveUnit>(); Debug.Log((object)(array.Length + "patches to load!")); for (int i = 0; i < array.Length; i++) { extraSerializedUnit = array[i].AddData(extraSerializedUnit, unitBlueprint); Debug.Log((object)("Added patch of type:" + (object)array[i])); } string text2 = JsonUtility.ToJson((object)extraSerializedUnit, true); ServiceLocator.GetService<FileIOWrapper>().WriteAllText(customUnitPath, text2, (FileHandlingFileType)2, (Action<Exception>)delegate { method.Invoke(null, new object[3] { unitBlueprint.Entity.SpriteIcon.texture, iconPath, action }); }); GlobalSettings.SaveAbilites = false; } catch (Exception ex) { Debug.LogError((object)("Failed to Save Unit with exception " + ex)); return true; } return false; } } [HarmonyPatch(typeof(CustomContentLoaderModIO))] [HarmonyPatch("ReadUnit")] public class LoadSerializedUnitPatch { public static bool Prefix(FileInfo file, int modID, Action<LoadedCustomUnitWrapper> doneCallback) { FileIOWrapper service = ServiceLocator.GetService<FileIOWrapper>(); ContentDatabase contentDatabase = ContentDatabase.Instance(); string path = file.FullName; service.ReadAllText(path, (FileHandlingFileType)2, (Action<string, Exception>)delegate(string json, Exception readException) { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown if (string.IsNullOrEmpty(json)) { Debug.LogFormat("Failed to load: {0}", new object[1] { path }); doneCallback?.Invoke(null); } else { UnitBlueprint val; try { val = UnitBlueprint.DeserializedUnit((SerializedUnitBlueprint)(object)JsonUtility.FromJson<ExtraSerializedUnit>(json), contentDatabase.AssetLoader, contentDatabase.LandfallContentDatabase); } catch { val = UnitBlueprint.DeserializedUnit(JsonUtility.FromJson<SerializedUnitBlueprint>(json), contentDatabase.AssetLoader, contentDatabase.LandfallContentDatabase); } val.SetCustomUnit(modID, path); string iconPath = Path.Combine(file.Directory.FullName, "icon.png"); val.SetIconPath(iconPath); doneCallback?.Invoke(new LoadedCustomUnitWrapper(val, Path.GetDirectoryName(path), path, 0L)); } }); return false; } } [HarmonyPatch(typeof(UnitBlueprint))] [HarmonyPatch("DeserializedUnit")] public class UnitLoaderHarmonyPatch { private static bool Prefix(SerializedUnitBlueprint data, AssetLoader assetLoader, LandfallContentDatabase landfallContentDatabase) { try { if (data is ExtraSerializedUnit extraSerializedUnit) { _ = Main.nodeScenes; Debug.Log((object)("Extra serialized unit detected! " + data.m_name)); for (int i = 0; i < extraSerializedUnit.extraFieldNames.Count; i++) { Debug.Log((object)("Field's name: " + extraSerializedUnit.extraFieldNames[i])); byte[] bytes = Convert.FromBase64String(extraSerializedUnit.extraFieldValues[i]); string decodedText = Encoding.UTF8.GetString(bytes); SavedNodeScene savedNodeScene = Main.DeserializeAbility(decodedText); Debug.Log((object)"Deserialized ability!"); if (!Main.IsAbilityWritten(savedNodeScene) && !BundledAbilitesManager.bundledAbilities.Exists((BundledAbilitesManager.BundledAbility n) => n.abilityData == decodedText)) { BundledAbilitesManager.BundledAbility bundledAbility = BundledAbilitesManager.BundleAbility(extraSerializedUnit, savedNodeScene, decodedText); Debug.Log((object)"Bundled ability!"); Debug.Log((object)$"Adding ability {bundledAbility}"); BundledAbilitesManager.bundledAbilities.Add(bundledAbility); Main.bundledAbilitiesQueue.Add(bundledAbility); } } } } catch { } return true; } } } namespace IDK { public static class Bundle_Manager { public static GameObject Node; public static GameObject Empty; public static GameObject ConnecterTrig; public static GameObject ConnecterUnit; public static GameObject ConnecterGameObject; public static GameObject ConnectorComponent; public static GameObject ConnecterVar; public static GameObject ConnecterAnything; public static GameObject ConnecterObjectVariable; public static GameObject Popup; public static AssetBundle scenes; public static AssetBundle AbilityPrefabs; public static void Setup() { scenes = LoadBundle("IDK.Bundle__butt__Stuff.scenes"); AbilityPrefabs = LoadBundle("IDK.Bundle__butt__Stuff.ability"); Node = AbilityPrefabs.LoadAsset<GameObject>("Node"); Empty = AbilityPrefabs.LoadAsset<GameObject>("Empty"); ConnecterTrig = AbilityPrefabs.LoadAsset<GameObject>("Assets/Connecter_Trig.prefab"); ConnecterUnit = AbilityPrefabs.LoadAsset<GameObject>("Assets/Connector_Unit.prefab"); ConnecterGameObject = AbilityPrefabs.LoadAsset<GameObject>("Assets/Connector_GameObject.prefab"); ConnecterVar = AbilityPrefabs.LoadAsset<GameObject>("Assets/Connector_Variable.prefab"); ConnectorComponent = AbilityPrefabs.LoadAsset<GameObject>("Assets/Connector_Component.prefab"); ConnecterAnything = AbilityPrefabs.LoadAsset<GameObject>("Assets/Connector_Anything.prefab"); ConnecterObjectVariable = AbilityPrefabs.LoadAsset<GameObject>("Assets/Connecter_ObjectVariable.prefab"); Popup = AbilityPrefabs.LoadAsset<GameObject>("Assets/CANSAVE.prefab"); ConnecterTrig.AddComponent<NodeConnector>(); ConnecterUnit.AddComponent<NodeConnector>(); ConnecterGameObject.AddComponent<NodeConnector>(); ConnecterVar.AddComponent<NodeConnector>(); ConnectorComponent.AddComponent<NodeConnector>(); ConnecterAnything.AddComponent<NodeConnector>(); ConnecterObjectVariable.AddComponent<NodeConnector>(); } public static AssetBundle LoadBundle(string assetBundleName) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(assetBundleName); return AssetBundle.LoadFromStream(stream); } } public class BundledAbilitesManager : MonoBehaviour { public class BundledAbility : MonoBehaviour { public string unitName; public string abilityName; public Sprite sprite; public string abilityData; public override string ToString() { return unitName + " + " + abilityName; } public void Awake() { Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); } private void Start() { ((Object)((Component)this).gameObject).name = unitName + " - " + abilityName; } } public static List<BundledAbility> bundledAbilities = new List<BundledAbility>(); public static BundledAbility BundleAbility(ExtraSerializedUnit unit, SavedNodeScene savedNodeScene, string data) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) BundledAbility bundledAbility = new GameObject("Bundledability").AddComponent<BundledAbility>(); bundledAbility.abilityData = data; bundledAbility.abilityName = savedNodeScene.sceneName; bundledAbility.unitName = ((SerializedUnitBlueprint)unit).m_name; bundledAbility.sprite = Main.GetSprite(savedNodeScene); return bundledAbility; } } public class Code : GameStateListener { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<bool> <>9__3_0; public static UnityAction <>9__3_1; internal bool <SpawnButton_Internal>b__3_0() { return Object.op_Implicit((Object)(object)GameObject.Find("Quit")); } internal void <SpawnButton_Internal>b__3_1() { Main.sceneManager.EnterNodeChanger(); } } public static GameObject button; public static string commnet; public void Begin() { SceneManager.activeSceneChanged += SpawnButtonFIXXXX; } public void SpawnButtonFIXXXX(Scene s, Scene s2) { if (((Scene)(ref s2)).name == "MainMenu") { ((MonoBehaviour)this).StartCoroutine(SpawnButton_Internal()); } } public IEnumerator SpawnButton_Internal() { yield return (object)new WaitUntil((Func<bool>)(() => Object.op_Implicit((Object)(object)GameObject.Find("Quit")))); button = Object.Instantiate<GameObject>(GameObject.Find("Quit"), GameObject.Find("Quit").transform.parent); ((Object)button).name = "Ability Creator"; ((UnityEventBase)button.GetComponent<Button>().onClick).RemoveAllListeners(); Object.Destroy((Object)(object)button.GetComponentInChildren<LocalizeText>()); ((TMP_Text)((Component)button.transform.Find("Text")).GetComponent<TextMeshProUGUI>()).text = "Ability Creator"; button.transform.SetSiblingIndex(4); ButtonClickedEvent onClick = button.GetComponent<Button>().onClick; object obj = <>c.<>9__3_1; if (obj == null) { UnityAction val = delegate { Main.sceneManager.EnterNodeChanger(); }; <>c.<>9__3_1 = val; obj = (object)val; } ((UnityEvent)onClick).AddListener((UnityAction)obj); } public override void OnEnterBattleState() { } public override void OnEnterPlacementState() { } } public class DestroySelfWhenObjectDestroyed : MonoBehaviour { public GameObject obj; private void Update() { if ((Object)(object)obj == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class DontDestroyOnLoad { public Object gameObject; public DontDestroyOnLoad(Object target) { Object.DontDestroyOnLoad(target); gameObject = target; } } public class DontGetDestroyed : MonoBehaviour { } public static class ExampleManager { public static void WriteAll() { string[] manifestResourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames(); for (int i = 0; i < manifestResourceNames.Length; i++) { if (manifestResourceNames[i].EndsWith("abilityEncoded")) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(manifestResourceNames[i]); string s = new StreamReader(stream).ReadToEnd(); string @string = Encoding.UTF8.GetString(Convert.FromBase64String(s)); SavedNodeScene savedNodeScene = Main.DeserializeAbility(@string); Directory.CreateDirectory(Main.abilitespath + "/" + Main.CleanNodeName(savedNodeScene.sceneName)); File.WriteAllText(Main.GetPath(savedNodeScene), @string); } } for (int j = 0; j < manifestResourceNames.Length; j++) { if (!manifestResourceNames[j].EndsWith("png")) { continue; } using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream(manifestResourceNames[j]); using FileStream destination = new FileStream(Main.abilitespath + "/size=8Examplesize=13#00AAFFCat Lives/icon.png", FileMode.CreateNew, FileAccess.Write); stream2.CopyTo(destination); } } public static void WriteExample(string json) { NodeManager.WriteAbility(Main.DeserializeAbility(json), json); } public static void TurnIntoExample(string json, string name) { string contents = Convert.ToBase64String(Encoding.UTF8.GetBytes(json)); File.WriteAllText(Main.abilitespath + "/" + Main.CleanNodeName(name) + ".abilityEncoded", contents); } public static void TurnAllIntoExample() { for (int i = 0; i < Main.nodeScenes.Count; i++) { TurnIntoExample(Main.nodeScenes[i].Jsonify((Formatting)1), Main.nodeScenes[i].sceneName); } } } public class FixNodeSystem : MonoBehaviour { public static bool IsValid(SavedNodeScene nodeScene) { for (int i = 0; i < nodeScene.blueprints2.Count; i++) { if (!Main.nodeDatabase.ContainsKey(nodeScene.blueprints2[i])) { return false; } string[] array = nodeScene.fields2[i].Split(new string[1] { "###" }, StringSplitOptions.RemoveEmptyEntries); if (Main.nodeDatabase[nodeScene.blueprints2[i]].fields.Count != array.Length) { return false; } } return true; } } public class GlobalSettings { public static bool SaveAbilites; } public class IgnoreProjectileForTeam : MonoBehaviour { public Team team; } public class MyModalPanel : MonoBehaviour { public static bool finished = true; public static IEnumerator ShowModal(BundledAbilitesManager.BundledAbility bundledAbility) { ModalPanel modalPanel = ServiceLocator.GetService<ModalPanel>(); Button m_YesButton = modalPanel.GetField<Button>("m_YesButton"); Button m_CancelButton = modalPanel.GetField<Button>("m_CancelButton"); ((TMP_Text)((Component)m_YesButton).GetComponentInChildren<TextMeshProUGUI>()).text = "Add"; ((TMP_Text)((Component)m_CancelButton).GetComponentInChildren<TextMeshProUGUI>()).text = "Don't"; yield return (object)new WaitUntil((Func<bool>)(() => finished)); finished = false; AudioPathData val = null; AudioPathData.ValidateAndAssignPathData("UI/Unit Unlocked", ref val, (Object)null); ServiceLocator.GetService<SoundPlayer>().PlaySoundEffectNonAlloc(val, 1f, Vector3.zero, (MaterialType)0, (Transform)null, 1f); modalPanel.CallMethod("ResetButtonTexts"); modalPanel.CallMethod("ResetElementConfiguration"); NavigableTMPTextInput field = modalPanel.GetField<NavigableTMPTextInput>("m_InputField"); GameObject gameObject = ((Component)((Component)field).transform.parent).gameObject; _ = (int)modalPanel.CallMethod("OpenPanel", true); ((UnityEventBase)m_CancelButton.onClick).RemoveAllListeners(); ((UnityEvent)m_CancelButton.onClick).AddListener((UnityAction)delegate { modalPanel.CallMethod("ClosePanel", true); finished = true; }); ((UnityEventBase)m_YesButton.onClick).RemoveAllListeners(); ((UnityEvent)m_YesButton.onClick).AddListener((UnityAction)delegate { modalPanel.CallMethod("ClosePanel", true); StreamedSceneManager.AddBundledAbility(bundledAbility); finished = true; }); gameObject.SetActive(false); if ((int)PlayerActions.Instance.InputType == 0) { ((Selectable)field).Select(); } modalPanel.CallMethod("SetHeaderText", "New ability found!", new string[0]); modalPanel.CallMethod("SetQuestionText", "The unit \"" + bundledAbility.unitName + "\" has a custom ability called: \"" + bundledAbility.abilityName + "\", Do you wanna add it?", new string[0]); ((Component)m_YesButton).gameObject.SetActive(true); ((Component)m_CancelButton).gameObject.SetActive(true); modalPanel.CallMethod("SetupExplicitNavigation"); ((TMP_Text)((Component)m_YesButton).GetComponentInChildren<TextMeshProUGUI>()).text = "Add"; ((TMP_Text)((Component)m_CancelButton).GetComponentInChildren<TextMeshProUGUI>()).text = "Don't"; } } public class ObjectStorer : MonoBehaviour { public Dictionary<string, object> store = new Dictionary<string, object>(); } [HarmonyPatch(typeof(ProjectileHit))] [HarmonyPatch("Hit")] public class ProjectileHitHarmonyPatch { private static bool Prefix(ProjectileHit __instance, RaycastHit sentHit, float multiplier = 1f) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) try { return ((Component)__instance).GetComponent<IgnoreProjectileForTeam>()?.team != ((Component)((Component)((RaycastHit)(ref sentHit)).collider).transform.root).GetComponent<Unit>()?.Team; } catch { return true; } } } public class RemoveAfterSecondsObject : MonoBehaviour { public Object other; public float time; private IEnumerator Start() { yield return (object)new WaitForSeconds(time); Object.Destroy(other); } } public class KillYourself : MonoBehaviour { public GameObject other; private void Update() { if ((Object)(object)other == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class AbilityCreator { public static void Log(object log) { Console.WriteLine("Abiltiy Creator:" + log); } } public class NodeRunner : MonoBehaviour { public NodeScene nodeScene; public List<ITriggerNode> triggerNodes = new List<ITriggerNode>(); public void Begin() { nodeScene = nodeScene.CreateCopy(); for (int i = 0; i < nodeScene.everyNode.Length; i++) { nodeScene.everyNode[i].valuePools = new Dictionary<Unit, ValuePool>(); } if (Object.op_Implicit((Object)(object)((Component)((Component)this).transform.root).GetComponent<Unit>())) { ((MonoBehaviour)this).StartCoroutine(BeginInternal()); } } public IEnumerator BeginInternal() { yield return null; yield return null; SavedNode[] everyNode = nodeScene.everyNode; Unit component = ((Component)((Component)this).transform.root).GetComponent<Unit>(); SavedNode[] array = everyNode; foreach (SavedNode savedNode in array) { savedNode.nodeRunners.Add(component, this); if (!(savedNode.blueprint.nodeFunction != null)) { continue; } if (savedNode.blueprint.nodeFunction.BaseType == typeof(ITriggerNode)) { ITriggerNode triggerNode = (ITriggerNode)savedNode.InstanceFunction; triggerNode.StartFrame(savedNode, component, savedNode.connections, savedNode.fields.ToArray(), this); triggerNodes.Add(triggerNode); } if (savedNode.blueprint.nodeFunction == typeof(ReDie)) { Unit[] values = savedNode.connections.GetNode(NodeBlueprint.ConnectionType.ReciveUnit).GetValuePoolSmart(component).GetValues<Unit>(); for (int j = 0; j < values.Length; j++) { } } } } public IEnumerator TriggerConnection(SavedNode savedNode) { try { SavedNode node = savedNode.connections.GetNode(NodeBlueprint.ConnectionType.Trigger); ((MonoBehaviour)this).StartCoroutine(RunNode(node)); } catch (Exception ex) { Debug.Log((object)("(NodeRunner TriggerConnection) Something went wrong! exception:" + ex)); } yield return null; } public IEnumerator RunNode(SavedNode node) { yield return null; Debug.Log((object)("Running node " + node?.blueprint?.Name + "...")); if ((Object)(object)node == (Object)null) { Debug.Log((object)"nvm this node is null \ud83d\ude23"); yield break; } try { GetValueOfConnections(node); IBehaviorNode behaviorNode = (IBehaviorNode)node.InstanceFunction; ((MonoBehaviour)this).StartCoroutine(behaviorNode.RunNode(node, ((Component)((Component)this).transform.root).GetComponent<Unit>(), node.connections, node.fields.ToArray(), this)); } catch (Exception ex) { Debug.Log((object)("(NodeRunner RunNode) Something went wrong! exception:" + ex)); } } public void GetValueOfConnections(SavedNode savedNode) { foreach (Node.Connection connection in savedNode.connections) { try { if (!(connection?.savedNode?.blueprint?.nodeFunction == null) && !(connection.savedNode.blueprint.nodeFunction.BaseType != typeof(IValueNode))) { ((IValueNode)connection.savedNode.InstanceFunction).GetValuePool(connection.savedNode, ((Component)((Component)this).transform.root).GetComponent<Unit>(), connection.savedNode.connections, connection.savedNode.fields.ToArray()); } } catch (Exception ex) { Debug.Log((object)("(GetValueOfConnections) Something went wrong! exception:" + ex)); } } } } public class NodeRunnerFixer : MonoBehaviour { private void Awake() { ((MonoBehaviour)this).StartCoroutine(AwakeInternal()); } private IEnumerator AwakeInternal() { yield return (object)new WaitUntil((Func<bool>)(() => Object.op_Implicit((Object)(object)((Component)this).GetComponent<NodeRunner>()))); ((Component)this).GetComponent<NodeRunner>().Begin(); } } [Serializable] public class NodeScene : MonoBehaviour { public SavedNode[] everyNode; public string sceneName = ""; public string sceneDescription = ""; public string sceneImage = ""; public int id; public bool isFinal; public float zoom; public int NodeSceneIndex { get { try { if (Main.nodeScenes.FindIndex((NodeScene n) => (Object)(object)n == (Object)(object)this) != -1) { return Main.nodeScenes.FindIndex((NodeScene n) => (Object)(object)n == (Object)(object)this); } throw new Exception(); } catch (Exception) { return Main.nodeScenes.Count; } } } public string Jsonify(Formatting formatting = 1) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) SavedNodeScene savedNodeScene = SavedNodeScene.Instance(this); JsonSerializerSettings val = new JsonSerializerSettings { ReferenceLoopHandling = (ReferenceLoopHandling)1 }; return JsonConvert.SerializeObject((object)savedNodeScene, formatting, val); } public NodeScene CreateCopy() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) NodeScene nodeScene = new GameObject("Node Scene (" + sceneName + ")").AddComponent<NodeScene>(); nodeScene.everyNode = everyNode; nodeScene.id = id; nodeScene.sceneDescription = sceneDescription; nodeScene.sceneImage = sceneImage; nodeScene.sceneName = sceneName; return nodeScene; } private void OnDestroy() { if (Main.nodeScenes.Contains(this)) { Main.nodeScenes.Remove(this); } if (Object.op_Implicit((Object)(object)((Component)this).gameObject)) { Object.Destroy((Object)(object)((Component)this).gameObject); } } public void Awake() { if (Object.op_Implicit((Object)(object)((Component)this).gameObject)) { Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); } } public void Start() { if (!Main.nodeScenes.Contains(this) && isFinal) { Main.nodeScenes.Add(this); } } } [BepInPlugin("AAC", "Alter Ability Creator", "2.5.1")] public class Main : BaseUnityPlugin { public static GameObject sliceEffect; public static Dictionary<string, GameObject> explosions = new Dictionary<string, GameObject>(); public static Dictionary<string, GameObject> Effects = new Dictionary<string, GameObject>(); public static Dictionary<string, GameObject> Projectiles = new Dictionary<string, GameObject>(); public static Dictionary<string, Type> components = new Dictionary<string, Type>(); public static Dictionary<string, UnitBlueprint> units = new Dictionary<string, UnitBlueprint>(); public static Dictionary<string, Sprite> pepsis = new Dictionary<string, Sprite>(); public static Dictionary<string, GameObject> particles = new Dictionary<string, GameObject>(); public static Dictionary<string, GameObject> abilites = new Dictionary<string, GameObject>(); public static Dictionary<string, GameObject> weapons = new Dictionary<string, GameObject>(); public static List<string> sounds = new List<string>(); public static List<DatabaseID> nodeIDS = new List<DatabaseID>(); public static List<BundledAbilitesManager.BundledAbility> bundledAbilitiesQueue = new List<BundledAbilitesManager.BundledAbility>(); public static string path = GamePaths.DataPath + "/Abilty Creator"; public static string Guide = ""; public static StreamedSceneManager sceneManager; public static Dictionary<string, NodeBlueprint> nodeDatabase = new Dictionary<string, NodeBlueprint>(); public static List<NodeScene> nodeScenes = new List<NodeScene>(); public static string abilitespath = path + "/Abilites"; private void Awake() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 //IL_0035: Unknown result type (might be due to invalid IL or missing references) if ((int)Application.platform == 1) { path = GamePaths.PersistentDataPath + "/Abilty Creator"; abilitespath = path + "/Abilites"; } new Harmony("Alter.AbilityCreator").PatchAll(); Code.commnet = "Dear Code Viewer, prepare your self for the most unoptomized, evil, racist code you will ever see"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } if (!Directory.Exists(abilitespath)) { Directory.CreateDirectory(abilitespath); } ((MonoBehaviour)this).StartCoroutine(Call()); UpdateSaveManager.Handle(); string[] files = Directory.GetFiles(abilitespath); for (int i = 0; i < files.Length; i++) { Debug.Log((object)("File Extension! " + Path.GetExtension(files[i]))); if (!(Path.GetExtension(files[i]) == ".newnodescene")) { continue; } SavedNodeScene savedNodeScene = DeserializeAbility(File.ReadAllText(files[i])); if (FixNodeSystem.IsValid(savedNodeScene)) { string text = abilitespath + "/" + savedNodeScene.sceneName + "/"; if (!Directory.Exists(text)) { Directory.CreateDirectory(text); } File.Copy(files[i], text + savedNodeScene.id + ".ability"); if (!Directory.Exists(abilitespath + "/OldAbilites")) { Directory.CreateDirectory(abilitespath + "/OldAbilites"); } File.Copy(files[i], abilitespath + "/OldAbilites/" + Path.GetFileName(files[i])); File.Delete(files[i]); } } } public string GetNiceName(string name) { if (Localizer.GetLanguage((Language)0).ContainsKey(name)) { return Localizer.GetLanguage((Language)0)[name]; } name = (name.Contains("_1 Prefabs_VB") ? name.Replace("_1 Prefabs_VB", "") : (name.Contains("_1 Weapons_VB") ? name.Replace("_1 Weapons_VB", "") : name)); name = (name.Contains("_4 Moves_VB") ? name.Replace("_4 Moves_VB", "") : (name.Contains("_2 Projectiles_VB") ? name.Replace("_2 Projectiles_VB", "") : name)); name = (name.Contains("_3 Effects_VB") ? name.Replace("_3 Effects_VB", "") : (name.Contains("_0 UnitBases_VB") ? name.Replace("_0 UnitBases_VB", "") : name)); return name; } private IEnumerator Call() { yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)Object.FindObjectOfType<ServiceLocator>() != (Object)null)); yield return (object)new WaitUntil((Func<bool>)(() => ServiceLocator.GetService<ISaveLoaderService>() != null)); yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)GameObject.Find("Quit") != (Object)null)); yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)GameObject.Find("Quit").GetComponentInChildren<LocalizeText>() != (Object)null)); yield return (object)new WaitUntil((Func<bool>)(() => GameObject.Find("Quit").GetComponentInChildren<LocalizeText>().LocaleID == "BUTTON_QUIT")); sliceEffect = ContentDatabase.Instance().LandfallContentDatabase.GetCombatMove(new DatabaseID(-1, 1998224969)).GetComponent<BlockMove>().sliceEffect; Bundle_Manager.Setup(); sceneManager = new GameObject("Scene Manager").AddComponent<StreamedSceneManager>(); Object.DontDestroyOnLoad((Object)(object)sceneManager); Code code = new GameObject("Code").AddComponent<Code>(); new GameObject("AbilityCreatorSavePatch").AddComponent<AbilityCreatorSavePatch>(); Object.DontDestroyOnLoad((Object)(object)((Component)code).gameObject); code.Begin(); ((MonoBehaviour)this).StartCoroutine(code.SpawnButton_Internal()); Code.commnet = "------------------File stuff------------------------"; Explosion[] array = Resources.FindObjectsOfTypeAll<Explosion>(); string contents = ""; string text = ""; string text2 = ""; string text3 = ""; string text4 = ""; string text5 = ""; string text6 = ""; string text7 = ""; string text8 = ""; string text9 = ""; int num = 0; for (int j = 0; j < array.Length; j++) { if (!explosions.ContainsValue(((Component)((Component)array[j]).gameObject.transform.root).gameObject)) { num++; string name = ((Object)((Component)((Component)array[j]).gameObject.transform.root).gameObject).name; name = (name.Contains("_1 Prefabs_VB") ? name.Replace("_1 Prefabs_VB", "") : (name.Contains("_1 Weapons_VB") ? name.Replace("_1 Weapons_VB", "") : name)); name = (name.Contains("_4 Moves_VB") ? name.Replace("_4 Moves_VB", "") : (name.Contains("_2 Projectiles_VB") ? name.Replace("_2 Projectiles_VB", "") : name)); name = (name.Contains("_3 Effects_VB") ? name.Replace("_3 Effects_VB", "") : (name.Contains("_0 UnitBases_VB") ? name.Replace("_0 UnitBases_VB", "") : name)); while (explosions.ContainsKey(name)) { name += "+"; } explosions.Add(name, ((Component)((Component)array[j]).gameObject.transform.root).gameObject); text2 += $"\n {num} > {name}"; } } GameObject[] array2 = ContentDatabase.Instance().LandfallContentDatabase.GetWeapons().ToArray(); int num2 = 0; for (int k = 0; k < array2.Length; k++) { if (!weapons.ContainsValue(array2[k])) { num2++; string name2 = ((Object)array2[k]).name; name2 = (name2.Contains("_1 Prefabs_VB") ? name2.Replace("_1 Prefabs_VB", "") : (name2.Contains("_1 Weapons_VB") ? name2.Replace("_1 Weapons_VB", "") : name2)); name2 = (name2.Contains("_4 Moves_VB") ? name2.Replace("_4 Moves_VB", "") : (name2.Contains("_2 Projectiles_VB") ? name2.Replace("_2 Projectiles_VB", "") : name2)); name2 = (name2.Contains("_3 Effects_VB") ? name2.Replace("_3 Effects_VB", "") : (name2.Contains("_0 UnitBases_VB") ? name2.Replace("_0 UnitBases_VB", "") : name2)); while (weapons.ContainsKey(name2)) { name2 += "+"; } weapons.Add(name2, array2[k]); text9 += $"\n {num2} > {name2}"; } } File.WriteAllText(path + "/Weapons.txt", text9); File.WriteAllText(path + "/Explosions.txt", contents); List<Type> list = new List<Type>(); Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); for (int l = 0; l < assemblies.Length; l++) { try { list.AddRange(assemblies[l].GetTypes()); } catch (ReflectionTypeLoadException ex) { list.AddRange(ex.Types); } } for (int m = 0; m < list.Count; m++) { if (typeof(Component).IsAssignableFrom(list[m])) { string text10 = TypeExtensions.GetCompilableNiceFullName(list[m]); while (components.ContainsKey(text10)) { text10 += "+"; } text5 = text5 + ">" + text10 + "\n"; components.Add(text10, list[m]); } } File.WriteAllText(path + "/Components.txt", text5); SoundBankCategory[] categories = ServiceLocator.GetService<SoundPlayer>().soundBank.Categories; for (int num3 = 0; num3 < ServiceLocator.GetService<SoundPlayer>().soundBank.Categories.Length; num3++) { for (int num4 = 0; num4 < categories[num3].soundEffects.Length; num4++) { text = text + ">" + categories[num3].categoryName + "&" + categories[num3].soundEffects[num4].soundRef + "\n"; if (ServiceLocator.GetService<SoundPlayer>().soundBank.GetSoundEffect(categories[num3].categoryName + "/" + categories[num3].soundEffects[num4].soundRef) != null) { text4 = text4 + ">" + categories[num3].categoryName + "&" + categories[num3].soundEffects[num4].soundRef + "\n"; sounds.Add(categories[num3].categoryName + "&" + categories[num3].soundEffects[num4].soundRef); } } } File.WriteAllText(path + "/Sounds.txt", text4); UnitEffectBase[] array3 = Resources.FindObjectsOfTypeAll<UnitEffectBase>(); num = 0; for (int num5 = 0; num5 < array3.Length; num5++) { if (!Effects.ContainsValue(((Component)((Component)array3[num5]).gameObject.transform.root).gameObject)) { num++; string name3 = ((Object)((Component)((Component)array3[num5]).gameObject.transform.root).gameObject).name; name3 = (name3.Contains("_1 Prefabs_VB") ? name3.Replace("_1 Prefabs_VB", "") : (name3.Contains("_1 Weapons_VB") ? name3.Replace("_1 Weapons_VB", "") : name3)); name3 = (name3.Contains("_4 Moves_VB") ? name3.Replace("_4 Moves_VB", "") : (name3.Contains("_2 Projectiles_VB") ? name3.Replace("_2 Projectiles_VB", "") : name3)); name3 = (name3.Contains("_3 Effects_VB") ? name3.Replace("_3 Effects_VB", "") : (name3.Contains("_0 UnitBases_VB") ? name3.Replace("_0 UnitBases_VB", "") : name3)); while (text2.Contains(name3)) { name3 += "+"; } Effects.Add(name3, ((Component)((Component)array3[num5]).gameObject.transform.root).gameObject); text2 = text2 + "\n > " + name3; } } File.WriteAllText(path + "/Effects.txt", text2); ParticleSystem[] array4 = Resources.FindObjectsOfTypeAll<ParticleSystem>(); for (int num6 = 0; num6 < array4.Length; num6++) { string text11 = ((Object)((Component)array4[num6]).transform.root).name + "+" + ((Object)array4[num6]).name; while (particles.ContainsKey(text11)) { text11 += "+"; } particles.Add(text11, ((Component)array4[num6]).gameObject); text8 = text8 + "> " + text11 + "\n"; } File.WriteAllText(path + "/Particles.txt", text8); UnitBlueprint[] array5 = ContentDatabase.Instance().GetAllUnitBlueprints().ToArray(); Dictionary<string, string> language = Localizer.GetLanguage((Language)0); for (int num7 = 0; num7 < array5.Length; num7++) { string text12 = ((!language.ContainsKey(array5[num7].Entity.Name)) ? array5[num7].Entity.Name : language[array5[num7].Entity.Name]); while (units.ContainsKey(text12)) { text12 += "+"; } text6 = text6 + num7 + ">" + text12 + "\n"; units.Add(text12, array5[num7]); } File.WriteAllText(path + "/Units.txt", text6); List<Sprite> list2 = new List<Sprite>(); list2.AddRange(from n in ContentDatabase.Instance().GetFactionIcons() select n.Entity.LargeSpriteIcon); list2.AddRange(from n in ContentDatabase.Instance().GetAllCombatMoves() select n.GetComponent<CharacterItem>().Entity.LargeSpriteIcon); list2.AddRange(from n in ContentDatabase.Instance().GetAllUnitBlueprints() where n.IsCustomUnit select n.Entity.LargeSpriteIcon); int num8 = 0; for (int num9 = 0; num9 < list2.Count; num9++) { try { if (((Object)list2[num9]).name != string.Empty) { pepsis.Add(((Object)list2[num9]).name, list2[num9]); text7 = text7 + num8 + ">" + ((Object)list2[num9]).name + "\n"; } num8++; } catch (Exception) { } } File.WriteAllText(path + "/Sprites.txt", text7); num = 0; Projectile[] array6 = Resources.FindObjectsOfTypeAll<Projectile>(); for (int num10 = 0; num10 < array6.Length; num10++) { if (!Projectiles.ContainsValue(((Component)((Component)array6[num10]).gameObject.transform.root).gameObject)) { num++; string name4 = ((Object)((Component)((Component)array6[num10]).gameObject.transform.root).gameObject).name; name4 = (name4.Contains("_1 Prefabs_VB") ? name4.Replace("_1 Prefabs_VB", "") : (name4.Contains("_1 Weapons_VB") ? name4.Replace("_1 Weapons_VB", "") : name4)); name4 = (name4.Contains("_4 Moves_VB") ? name4.Replace("_4 Moves_VB", "") : (name4.Contains("_2 Projectiles_VB") ? name4.Replace("_2 Projectiles_VB", "") : name4)); name4 = (name4.Contains("_3 Effects_VB") ? name4.Replace("_3 Effects_VB", "") : (name4.Contains("_0 UnitBases_VB") ? name4.Replace("_0 UnitBases_VB", "") : name4)); while (text3.Contains(name4)) { name4 += "+"; } Projectiles.Add(name4, ((Component)((Component)array6[num10]).gameObject.transform.root).gameObject); text3 += $"\n {num} > {name4}"; } } File.WriteAllText(path + "/Projectiles.txt", text3); Code.commnet = "------------------INIT------------------------"; CreateNodeBlueprint("BATTLE_BEGIN", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.grey, "When Battle Begins", "Triggers", longfield: false, typeof(WhenBattleBegins)); CreateNodeBlueprint("UNIT_SPAWN", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.grey, "When unit spawns", "Triggers", longfield: false, typeof(WhenUnitSpawned)); CreateNewNodeBlueprint("ENDBATTLE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "stupidDumbassNode", isDropdown = true, dropDowns = new string[2] { "Win", "Lose" } } }, typeof(EndBattle), NodeBlueprint.Type.Function, Color.white, "End battle", "Misc"); CreateNewNodeBlueprint("GETMAXUNITHEALTH", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveVariable }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "valueType", isDropdown = true, dropDowns = new string[2] { "Normal", "Precentage" } } }, typeof(GetMaxUnitHealth), NodeBlueprint.Type.Function, Color.white, "Get max unit health", "Data"); CreateNewNodeBlueprint("GETUNITHEALTH", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveVariable }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "valueType", isDropdown = true, dropDowns = new string[2] { "Normal", "Precentage" } } }, typeof(GetUnitHealth), NodeBlueprint.Type.Function, Color.white, "Get unit health", "Data"); CreateNewNodeBlueprint("SETUNITHEALTH", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.Trigger }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("value", (ContentType)3), new NodeBlueprint.Field { name = "valueType", isDropdown = true, dropDowns = new string[5] { "Set", "Add", "Set (%)", "Add (%)", "Multiply" } } }, typeof(SetUnitHealth), NodeBlueprint.Type.Function, Color.white, "Set unit health", "Data"); CreateNewNodeBlueprint("SETUNITDAMAGE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.Trigger }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("value", (ContentType)3), new NodeBlueprint.Field { name = "valueType", isDropdown = true, dropDowns = new string[5] { "Set", "Add", "Set (%)", "Add (%)", "Multiply" } } }, typeof(SetUnitDamage), NodeBlueprint.Type.Function, Color.white, "Set unit damage", "Data"); CreateNewNodeBlueprint("SETUNITCOOLDOWN", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.Trigger }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("value", (ContentType)3), new NodeBlueprint.Field { name = "valueType", isDropdown = true, dropDowns = new string[5] { "Set", "Add", "Set (%)", "Add (%)", "Multiply" } } }, typeof(SetUnitDamage), NodeBlueprint.Type.Function, Color.white, "Set unit cooldown", "Data"); CreateNewNodeBlueprint("QUICKBUFF", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.Trigger }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("length", (ContentType)3), new NodeBlueprint.Field("amount", (ContentType)3), new NodeBlueprint.Field { name = "mode", isDropdown = true, dropDowns = new string[5] { "All", "Heal only", "Increase damage", "Speed up", "Speed up attacks" } } }, typeof(QuickBuff), NodeBlueprint.Type.Function, Color.white, "Quick buff", "Data"); CreateNodeBlueprint("LOG", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.ReciveVariable }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.white, "Log variable", "Variables", longfield: false, typeof(LogVariable)); CreateNodeBlueprint("LOGANY", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.ReciveAnything }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.white, "Log anything", "Gameobjects", longfield: false, typeof(LogAnything)); CreateNewNodeBlueprint("ABILITYACTVIATE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Delay", (ContentType)3), new NodeBlueprint.Field("Range", (ContentType)3) }, typeof(WhenAbilityTriggered), NodeBlueprint.Type.Input, Color.grey, "When ability triggered...", "Triggers"); CreateNewNodeBlueprint("UNITWASATTACKED", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Delay", (ContentType)3), new NodeBlueprint.Field("Range", (ContentType)3) }, typeof(UnitWasAttacked), NodeBlueprint.Type.Input, Color.grey, "When unit gets attacked...", "Triggers"); CreateNodeBlueprint("INTERVAL", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger }, new Dictionary<string, ContentType> { { "Interval", (ContentType)3 } }, NodeBlueprint.Type.Input, Color.grey, "Do Every...", "Triggers", longfield: false, typeof(DoEveryNode)); CreateNodeBlueprint("WHENUNITDIE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Input, Color.grey, "When Unit Dies...", "Triggers", longfield: false, typeof(WhenUnitDies)); CreateNodeBlueprint("WHENUNITDAMAGED", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Input, Color.grey, "When unit damaged...", "Triggers", longfield: false, typeof(WhenUnitDamaged)); CreateNodeBlueprint("WHENUNITATTACKS", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Input, Color.grey, "When unit attacks...", "Triggers", longfield: false, typeof(WhenUnitAttacks)); CreateNewNodeBlueprint("PROJECTILERANGE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Range", (ContentType)3), new NodeBlueprint.Field("Block Power", (ContentType)3) }, typeof(WhenProjectileEntersRange), NodeBlueprint.Type.Input, Color.grey, "When projectile in range...", "Triggers"); CreateNodeBlueprint("IS_BATTLE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.grey, "Run if in battle state", "Control", longfield: false, typeof(IsBattleState)); CreateNodeBlueprint("IS_DEAD", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.grey, "Run if unit is dead", "Control", longfield: false, typeof(IsDead)); CreateNodeBlueprint("IS_NOTDEAD", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.grey, "Run if unit is alive", "Control", longfield: false, typeof(IsAlive)); CreateNodeBlueprint("PAUSE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered }, new Dictionary<string, ContentType> { { "Seconds", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.grey, "Do after pause", "Control", longfield: false, typeof(PauseNode)); CreateNodeBlueprint("REAPET", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered }, new Dictionary<string, ContentType> { { "Times", (ContentType)2 }, { "Delay", (ContentType)3 } }, NodeBlueprint.Type.Input, Color.grey, "Repeat", "Control", longfield: false, typeof(ReapetNode)); CreateNodeBlueprint("REAPETVAR", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveVariable }, new Dictionary<string, ContentType> { { "Delay", (ContentType)3 } }, NodeBlueprint.Type.Input, Color.grey, "Repeat for variable", "Control", longfield: false, typeof(ReapetVarNode)); CreateNewNodeBlueprint("FOREACH", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveAnything }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Delay", (ContentType)3), new NodeBlueprint.Field("filter", (ContentType)0) { isDropdown = true, dropDowns = new string[4] { "All", "Gameobjects only", "Units only", "Components only" } } }, typeof(ForEachNode), NodeBlueprint.Type.Input, Color.grey, "Repeat for each value", "Control"); CreateNewNodeBlueprint("FILTER", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveAnything }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("filter", (ContentType)0) { isDropdown = true, dropDowns = new string[4] { "Gameobjects only", "Units only", "Components only", "Other" } } }, typeof(FilterNode), NodeBlueprint.Type.Input, Color.grey, "Filter values", "Control"); CreateNodeBlueprint("NEWOBJ", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveGameObject }, new Dictionary<string, ContentType> { { "Object name", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.green, "Create gameObject", "Gameobjects", longfield: false, typeof(CreateGameobject)); CreateNodeBlueprint("ENEMY", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "Enemy unit", "Units", longfield: false, typeof(EnemyNode)); CreateNodeBlueprint("SELF", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "Self unit", "Units", longfield: false, typeof(SelfNode)); CreateNodeBlueprint("EXPSENSIVETEAMMATE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "Most expensive teammate of unit", "Units", longfield: false, typeof(MostExspensiveTeamMateUnit)); CreateNodeBlueprint("EXPSENSIVEENEMY", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "Most expensive enemy of unit", "Units", longfield: false, typeof(MostExspensiveEnemy)); CreateNodeBlueprint("ALLTEAM", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "All units of same team", "Units", longfield: false, typeof(AllTeam)); CreateNodeBlueprint("ALLOTHERTEAM", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "All units of other team", "Units", longfield: false, typeof(AllOtherTeam)); CreateNodeBlueprint("GETUNIT", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveUnit, NodeBlueprint.ConnectionType.ReciveGameObject }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "Get unit from gameobject", "Unit Tools", longfield: false, typeof(GetUnitFromGameobject)); CreateNodeBlueprint("TEAMMATE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveUnit, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.green, "Closest team mate of unit", "Unit Tools", longfield: false, typeof(ClosestTeamMateUnit)); CreateNodeBlueprint("FREAZE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType> { { "Length", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.magenta, "freeze unit for", "Unit Tools", longfield: false, typeof(FreezeNode)); CreateNewNodeBlueprint("GAMEOBJ", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "BodyPart", isDropdown = true, dropDowns = new string[16] { "Root", "Head", "Torso", "Hip", "Right Arm", "Left Arm", "Right Hand", "Left Hand", "Right Knee", "Left Knee", "Right Foot", "Left Foot", "Mesh", "Both Foots", "Both Hands", "All" } } }, typeof(GetGameobject), NodeBlueprint.Type.Function, Color.green, "Get body part of unit", "Unit Tools"); CreateNewNodeBlueprint("CLOTH", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "Cloth", isDropdown = true, dropDowns = new string[6] { "All", "Head", "Torso", "Arms", "Pants", "Shoes" } } }, typeof(GetClothes), NodeBlueprint.Type.Function, Color.green, "Get clothes of unit", "Unit Tools"); CreateNewNodeBlueprint("ABILITIES", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field>(), typeof(GetAbilites), NodeBlueprint.Type.Function, Color.green, "Get abilites of unit", "Unit Tools"); CreateNewNodeBlueprint("GETWEAPON", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "WEAPON", isDropdown = true, dropDowns = new string[3] { "Both", "Left Weapon", "Right Weapon" } } }, typeof(GetWeapon), NodeBlueprint.Type.Function, Color.green, "Get weapon of unit", "Weapons"); CreateNewNodeBlueprint("SETFIST", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new List<NodeBlueprint.Field>(), typeof(SetFistNode), NodeBlueprint.Type.Function, Color.green, "Make unit use fists", "Weapons"); CreateNewNodeBlueprint("GETEYE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field>(), typeof(GetEye), NodeBlueprint.Type.Function, Color.green, "Get eyes of unit", "Unit Tools"); CreateNewNodeBlueprint("GETWEAPONGLOBAL", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Weapon name", (ContentType)0) { fieldType = NodeBlueprint.Field.FieldType.Weapon } }, typeof(GetWeaponOfName), NodeBlueprint.Type.Function, Color.magenta, "Get weapon of name", "Weapons"); CreateNewNodeBlueprint("DEAL_DAMAGE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Damage", (ContentType)3), new NodeBlueprint.Field { name = "Type", isDropdown = true, dropDowns = new string[2] { "Normal", "Precentage" } } }, typeof(Deal_Damage), NodeBlueprint.Type.Function, Color.red, "Deal Damage", "Unit Tools"); CreateNodeBlueprint("DIE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.red, "Kill", "Unit Tools", longfield: false, typeof(DieNode)); CreateNodeBlueprint("REVIVE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.red, "Revive unit", "Unit Tools", longfield: false, typeof(ReDie)); CreateNewNodeBlueprint("REVIVEFIXER", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "WillBeRevived", isDropdown = true, dropDowns = new string[2] { "Will be revived", "Wont be revived" } } }, typeof(SetWillBeRevived), NodeBlueprint.Type.Function, Color.red, "Set will be revived", "Unit Tools"); CreateNodeBlueprint("SWAPTEAM", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.red, "Swap unit's team", "Unit Tools", longfield: false, typeof(SwapTeam)); CreateNewNodeBlueprint("SPAWNPROJ", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Projectile", (ContentType)0) { fieldType = NodeBlueprint.Field.FieldType.Projectile }, new NodeBlueprint.Field("Spread", (ContentType)3), new NodeBlueprint.Field("Team", (ContentType)3) { isDropdown = true, dropDowns = new string[3] { "Both teams", "Other team only", "Same team only" } } }, typeof(SpawnProjectileNode), NodeBlueprint.Type.Function, Color.red, "Spawn projectile", "Projectiles"); CreateNewNodeBlueprint("PARRYPROJECTILE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "PlaySliceEffect", isDropdown = true, dropDowns = new string[2] { "Play Slice", "Don't" } }, new NodeBlueprint.Field { name = "Reflect", isDropdown = true, dropDowns = new string[2] { "Reflect", "Don't" } } }, typeof(ParryProjectile), NodeBlueprint.Type.Function, Color.red, "Parry projectile", "Projectiles"); CreateNewNodeBlueprint("PLAYSLICE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field>(), typeof(PlaySlice), NodeBlueprint.Type.Function, Color.red, "Play slice effect", "Projectiles"); CreateNewNodeBlueprint("EXPLOSION", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "Explosion name", contentType = (ContentType)0, fieldType = NodeBlueprint.Field.FieldType.Explosion }, new NodeBlueprint.Field("Damage", (ContentType)3), new NodeBlueprint.Field { isDropdown = true, dropDowns = new string[2] { "My team", "Other team" }, name = "Team" } }, typeof(SpawnExplosionNode), NodeBlueprint.Type.Function, Color.red, "Summon Explosion", "Misc"); CreateNewNodeBlueprint("PARTICLE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Particle name", (ContentType)0) { fieldType = NodeBlueprint.Field.FieldType.Particle }, new NodeBlueprint.Field("Size", (ContentType)3), new NodeBlueprint.Field("Loop", (ContentType)0) { isDropdown = true, dropDowns = new string[2] { "Loop", "Don't" } }, new NodeBlueprint.Field("Speed", (ContentType)3), new NodeBlueprint.Field("Length", (ContentType)3), new NodeBlueprint.Field("Follow", (ContentType)3) { isDropdown = true, dropDowns = new string[2] { "Follow", "Don't" } } }, typeof(SpawnParticleNode), NodeBlueprint.Type.Function, Color.red, "Spawn particle", "Misc"); CreateNewNodeBlueprint("ADDEFFECT", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Effect", (ContentType)0) { fieldType = NodeBlueprint.Field.FieldType.Effect } }, typeof(AddEffectNode), NodeBlueprint.Type.Function, Color.red, "Add Effect to unit", "Unit Tools"); CreateNodeBlueprint("STUNWEAPONS", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType> { { "Time", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.red, "Stun weapons for unit", "Weapons", longfield: false, typeof(StunWeaponsNode)); CreateNewNodeBlueprint("LETGO", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "WhichHand", isDropdown = true, dropDowns = new string[3] { "Both", "Right hand", "Left hand" } } }, typeof(LetGoNode), NodeBlueprint.Type.Function, Color.red, "Let go of stuff at hand", "Unit Tools"); CreateNewNodeBlueprint("SETWEAPON", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "WhichHand", isDropdown = true, dropDowns = new string[3] { "Both", "Right", "Left" } } }, typeof(SetWeaponNode), NodeBlueprint.Type.Function, Color.red, "Set unit's weapon", "Weapons"); CreateNewNodeBlueprint("SPAWNUNIT", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveUnit }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("unit", (ContentType)0) { fieldType = NodeBlueprint.Field.FieldType.Unit }, new NodeBlueprint.Field { name = "Team", isDropdown = true, dropDowns = new string[2] { "My Team", "Other Team" } } }, typeof(SpawnUnitNode), NodeBlueprint.Type.Function, Color.red, "Spawn unit at gameobject", "Units"); CreateNodeBlueprint("ALLABS", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.magenta, "Play all abilites", "Unit Tools", longfield: false, typeof(PlayAllAbilites)); CreateNodeBlueprint("IMMUNE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType> { { "Length", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.magenta, "Make Immune for", "Unit Tools", longfield: false, typeof(MakeUnitImmune)); CreateNodeBlueprint("TOGGLEPROPS", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit }, new Dictionary<string, ContentType> { { "From", (ContentType)2 }, { "To", (ContentType)2 } }, NodeBlueprint.Type.Function, Color.magenta, "Toggle Props at indexs", "Unit Tools", longfield: false, typeof(ToggleProps)); CreateNewNodeBlueprint("ADDPROPS", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "cloth", isDropdown = true, dropDowns = new string[2] { "Clothes", "Abilites" } } }, typeof(AddProps), NodeBlueprint.Type.Function, Color.magenta, "Add clothes/abilites to unit", "Unit Tools"); CreateNodeBlueprint("ADDFORCE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new Dictionary<string, ContentType> { { "Forward", (ContentType)3 }, { "Upwareds", (ContentType)3 }, { "Sideway", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.magenta, "Add force to gameobject", "Gameobjects", longfield: false, typeof(AddForceNode)); CreateNodeBlueprint("ADDFORCEGLOBAL", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new Dictionary<string, ContentType> { { "X", (ContentType)3 }, { "Y", (ContentType)3 }, { "Z", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.magenta, "Add global force to gameobject", "Gameobjects", longfield: false, typeof(AddGlobalForceNode)); CreateNewNodeBlueprint("PLAYSOUND", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("SoundRef", (ContentType)0) { fieldType = NodeBlueprint.Field.FieldType.Sound }, new NodeBlueprint.Field("Volume", (ContentType)3), new NodeBlueprint.Field("Pitch", (ContentType)3) }, typeof(PlaySoundNode), NodeBlueprint.Type.Function, Color.magenta, "Play sound at gameobject position", "Gameobjects"); CreateNewNodeBlueprint("GOTOUNIT", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.ReciveUnit }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "IDKME", isDropdown = true, dropDowns = new string[3] { "Both", "Position only", "Rotation only" } }, new NodeBlueprint.Field { name = "BodyPart", isDropdown = true, dropDowns = new string[10] { "Head", "Torso", "Right Arm", "Left Arm", "Right Hand", "Left Hand", "Right Knee", "Left Knee", "Right Foot", "Left Foot" } } }, typeof(GoToUnitNode), NodeBlueprint.Type.Function, Color.magenta, "Teleport gameobject to unit", "Gameobjects"); CreateNewNodeBlueprint("ROTATETOUNIT", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.ReciveUnit }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "BodyPart", isDropdown = true, dropDowns = new string[10] { "Head", "Torso", "Right Arm", "Left Arm", "Right Hand", "Left Hand", "Right Knee", "Left Knee", "Right Foot", "Left Foot" } } }, typeof(RotateTowardsNode), NodeBlueprint.Type.Function, Color.magenta, "Rotate gameobject towards unit", "Gameobjects"); CreateNewNodeBlueprint("GETDISTANCE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveVariable }, new List<NodeBlueprint.Field>(), typeof(GetDistanceFrom), NodeBlueprint.Type.Function, Color.magenta, "Get distance from unit to gameobject", "Gameobjects"); CreateNewNodeBlueprint("TRANSFORMPOS", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("x", (ContentType)3), new NodeBlueprint.Field("y", (ContentType)3), new NodeBlueprint.Field("z", (ContentType)3), new NodeBlueprint.Field { name = "TransformType", isDropdown = true, dropDowns = new string[2] { "Global", "Local" } }, new NodeBlueprint.Field { name = "TransformTypeOther", isDropdown = true, dropDowns = new string[2] { "Add", "Set" } } }, typeof(TransformPositionNode), NodeBlueprint.Type.Function, Color.yellow, "Modify position of gameobj", "Animations"); CreateNodeBlueprint("TRANSFORMSCALE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new Dictionary<string, ContentType> { { "x", (ContentType)3 }, { "y", (ContentType)3 }, { "z", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.yellow, "Change scale of gameobj", "Animations", longfield: false, typeof(TransformScaleNode)); CreateNewNodeBlueprint("TRANSFORMROT", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("x", (ContentType)3), new NodeBlueprint.Field("y", (ContentType)3), new NodeBlueprint.Field("z", (ContentType)3), new NodeBlueprint.Field { name = "TransformType", isDropdown = true, dropDowns = new string[2] { "Global", "Local" } }, new NodeBlueprint.Field { name = "TransformTypeOther", isDropdown = true, dropDowns = new string[2] { "Add", "Set" } } }, typeof(TransformRotationNode), NodeBlueprint.Type.Function, Color.yellow, "Modify rotation of gameobj", "Animations"); CreateNewNodeBlueprint("COLOR", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("red", (ContentType)3), new NodeBlueprint.Field("green", (ContentType)3), new NodeBlueprint.Field("blue", (ContentType)3), new NodeBlueprint.Field("alpha", (ContentType)3), new NodeBlueprint.Field("index", (ContentType)2), new NodeBlueprint.Field { name = "Color children", isDropdown = true, dropDowns = new string[2] { "Color children", "Don't" } }, new NodeBlueprint.Field { name = "SetOrMod", isDropdown = true, dropDowns = new string[2] { "Set", "Change" } } }, typeof(ColorObjectNode), NodeBlueprint.Type.Function, Color.yellow, "Color object", "Gameobjects"); CreateNewNodeBlueprint("COLORHSV", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Hue", (ContentType)3), new NodeBlueprint.Field("Saturation", (ContentType)3), new NodeBlueprint.Field("Value", (ContentType)3), new NodeBlueprint.Field("alpha", (ContentType)3), new NodeBlueprint.Field("index", (ContentType)2), new NodeBlueprint.Field { name = "Color children", isDropdown = true, dropDowns = new string[2] { "Color children", "Don't" } }, new NodeBlueprint.Field { name = "SetOrMod", isDropdown = true, dropDowns = new string[2] { "Set", "Change" } } }, typeof(ColorObjectNodeHSV), NodeBlueprint.Type.Function, Color.yellow, "Color object (HSV)", "Gameobjects"); CreateNodeBlueprint("DESTROY", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.yellow, "Destroy", "Gameobjects", longfield: false, typeof(DestroyNode)); CreateNodeBlueprint("CREATEFUNC", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger }, new Dictionary<string, ContentType> { { "Function name", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.yellow, "Create function", "Functions", longfield: false, typeof(CreateFunctionNode)); CreateNodeBlueprint("RUNFUNC", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.Trigger }, new Dictionary<string, ContentType> { { "Function name", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.yellow, "Run function", "Functions", longfield: false, typeof(RunFunctionNode)); CreateNodeBlueprint("ADDONHITACTION", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveGameObject }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.yellow, "Add projectile hit action ", "Projectiles", longfield: false, typeof(AddProjectileOnHitAction)); CreateNodeBlueprint("ADDONCOLLISIONACTION", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveGameObject }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.yellow, "Add collision enter action ", "Gameobjects", longfield: false, typeof(AddOnCollisionAction)); CreateNodeBlueprint("ADDCOMP", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveComponent }, new Dictionary<string, ContentType> { { "Component name", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.yellow, "Add Component to gameObj", "Gameobjects", longfield: false, typeof(AddComponentNode)); CreateNewNodeBlueprint("GETCOMP", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveComponent }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Component name", (ContentType)0), new NodeBlueprint.Field { name = "Max", isDropdown = true, dropDowns = new string[2] { "First", "All" } }, new NodeBlueprint.Field { name = "SearchChildren", isDropdown = true, dropDowns = new string[2] { "Search for children also", "Don't" } } }, typeof(GetComponentNode), NodeBlueprint.Type.Function, Color.yellow, "Get Component from gameObj", "Gameobjects"); CreateNodeBlueprint("SetField", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveAnything }, new Dictionary<string, ContentType> { { "Field name", (ContentType)0 }, { "Value", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.yellow, "Set Field for gameObj", "Gameobjects", longfield: false, typeof(SetFieldNode)); CreateNodeBlueprint("GETFIELD", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveAnything }, new Dictionary<string, ContentType> { { "Field name", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.yellow, "Get Field for gameObj", "Gameobjects", longfield: false, typeof(GetFieldNode)); CreateNodeBlueprint("INVOKE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveAnything }, new Dictionary<string, ContentType> { { "Method name", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.yellow, "Invoke Method From Component", "Gameobjects", longfield: false, typeof(InvokeMethodNode)); CreateNodeBlueprint("DUPE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveAnything }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.yellow, "Duplicate object", "Gameobjects", longfield: false, typeof(Duplicate)); CreateNewNodeBlueprint("SETACTIVE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveGameObject }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field { name = "banana", isDropdown = true, dropDowns = new string[3] { "Toggle", "False", "True" } } }, typeof(SetActive), NodeBlueprint.Type.Function, Color.yellow, "Set Active", "Gameobjects"); CreateNodeBlueprint("VARCREATE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveVariable }, new Dictionary<string, ContentType> { { "variable name", (ContentType)0 } }, NodeBlueprint.Type.Function, Color.white, "Get variable", "Variables", longfield: false, typeof(CreateVariableNode)); CreateNodeBlueprint("VARADD", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveVariable }, new Dictionary<string, ContentType> { { "value", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.white, "Change variable by", "Variables", longfield: false, typeof(ChangeVariableBy)); CreateNodeBlueprint("VARSET", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveVariable }, new Dictionary<string, ContentType> { { "value", (ContentType)3 } }, NodeBlueprint.Type.Function, Color.white, "Set variable to", "Variables", longfield: false, typeof(SetVariableTo)); CreateNewNodeBlueprint("VARIF", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveVariable, NodeBlueprint.ConnectionType.Trigger }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("value", (ContentType)3), new NodeBlueprint.Field { name = "Operator", isDropdown = true, dropDowns = new string[5] { "=", ">", "<", "<=", ">=" } } }, typeof(IfVariableNode), NodeBlueprint.Type.Function, Color.white, "If variable", "Variables"); CreateNewNodeBlueprint("RANDOM", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveVariable }, new List<NodeBlueprint.Field> { new NodeBlueprint.Field("Min Value", (ContentType)2), new NodeBlueprint.Field("Max Value", (ContentType)2), new NodeBlueprint.Field { name = "TypeTarTarTart", isDropdown = true, dropDowns = new string[2] { "Static", "Dyanamic" } } }, typeof(RandomNode), NodeBlueprint.Type.Function, Color.white, "Choose Random", "Variables"); CreateNodeBlueprint("OBJECTVARCREATE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.GiveObjectVariable }, new Dictionary<string, ContentType> { { "variable name", (ContentType)0 } }, NodeBlueprint.Type.Function, new Color(0.2f, 0.2f, 0.8f), "Get object variable", "Object Variables", longfield: false, typeof(CreateObjectVariableNode)); CreateNodeBlueprint("OBJECTVARSET", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveObjectVariable, NodeBlueprint.ConnectionType.ReciveAnything }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, new Color(0.2f, 0.2f, 0.8f), "Store object in object variable", "Object Variables", longfield: false, typeof(SetObjectVariableTo)); CreateNodeBlueprint("OBJECTVARCLEAR", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.Trigger, NodeBlueprint.ConnectionType.Triggered, NodeBlueprint.ConnectionType.ReciveObjectVariable }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, new Color(0.2f, 0.2f, 0.8f), "Clear object variable", "Object Variables", longfield: false, typeof(ClearObjectVariable)); CreateNodeBlueprint("OBJECTVARIABLEVALUE", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveObjectVariable, NodeBlueprint.ConnectionType.GiveAnything }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, new Color(0.2f, 0.2f, 0.8f), "Get value of object variable", "Object Variables", longfield: false, typeof(GetValueOfObjectVariableNode)); CreateNodeBlueprint("CONVERTOBJ", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveGameObject, NodeBlueprint.ConnectionType.GiveAnything }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.black, "Convert gameobject to anything", "Convert", longfield: false, typeof(ConvertObj)); CreateNodeBlueprint("CONVERTUNIT", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveUnit, NodeBlueprint.ConnectionType.GiveAnything }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.black, "Convert unit to anything", "Convert", longfield: false, typeof(ConvertUnit)); CreateNodeBlueprint("CONVERTCOMP", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveComponent, NodeBlueprint.ConnectionType.GiveAnything }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.black, "Convert component to anything", "Convert", longfield: false, typeof(ConvertComp)); CreateNodeBlueprint("CONVERTOBJ2", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveGameObject }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.black, "Convert anything to gameobject", "Convert", longfield: false, typeof(AnythingToObj)); CreateNodeBlueprint("CONVERTUNIT2", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveUnit }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.black, "Convert anything to unit", "Convert", longfield: false, typeof(AnythingToUnit)); CreateNodeBlueprint("CONVERTCOMP2", new List<NodeBlueprint.ConnectionType> { NodeBlueprint.ConnectionType.ReciveAnything, NodeBlueprint.ConnectionType.GiveComponent }, new Dictionary<string, ContentType>(), NodeBlueprint.Type.Function, Color.black, "Convert anything to component", "Convert", longfield: false, typeof(ConvertComp2)); string[] directories = Directory.GetDirectories(abilitespath); for (int num11 = 0; num11 < directories.Length; num11++) { string[] files = Directory.GetFiles(directories[num11]); foreach (string text13 in files) { if (!(Path.GetExtension(text13) != ".ability")) { AddAbility(DeserializeAbility(File.ReadAllText(text13)).SavedNodeSceneToNodeScene()); } } } Code.commnet = "------------------Ability------------------------"; yield return (object)new WaitUntil((Func<bool>)(() => TABSSceneManager.IsInMainMenuScene())); yield return (object)new WaitForSecondsRealtime(3f); yield return (object)new WaitForEndOfFrame(); for (int i = 0; i < bundledAbilitiesQueue.Count; i++) { yield return MyModalPanel.ShowModal(bundledAbilitiesQueue[i]); } } public static GameObject CreateAbility(NodeScene nodeScene, bool isFinal = false) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) if (!nodeScenes.Contains(nodeScene)) { nodeScenes.Add(nodeScene); } GameObject val = new GameObject(nodeScene.sceneName); if (isFinal) { ((Object)val).hideFlags = (HideFlags)61; } SpecialAbility obj = val.AddComponent<SpecialAbility>(); obj.SetField("m_entity", (object)new DatabaseEntity((WorkshopContentType)5) { GUID = new DatabaseID { m_ID = nodeScene.id, m_modID = -2 }, Name = nodeScene.sceneName }); val.AddComponent<NodeRunner>().nodeScene = nodeScene; nodeScene.isFinal = isFinal; val.AddComponent<NodeRunnerFixer>(); val.AddComponent<DodgeMove>(); val.AddComponent<ConditionalEvent>(); val.AddComponent<GoToBodyPart>().targetPart = (TargetPart)1; val.AddComponent<OnlyRunWhenAddedToUnit>(); ((CharacterItem)obj).Entity.SetSpriteIcon(GetSprite(nodeScene)); return val; } public static void AddAbility(NodeScene nodeScene) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) try { GameObject val = CreateAbility(nodeScene, isFinal: true); SpecialAbility component = val.GetComponent<SpecialAbility>(); SavedNodeSceneStorer.gameobjs.Add(val); nodeIDS.Add(((CharacterItem)component).Entity.GUID); LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase; AssetLoader assetLoader = ContentDatabase.Instance().AssetLoader; Dictionary<DatabaseID, Object> field = assetLoader.GetField<Dictionary<DatabaseID, Object>>("m_nonStreamableAssets"); Dictionary<DatabaseID, GameObject> field2 = landfallContentDatabase.GetField<Dictionary<DatabaseID, GameObject>>("m_combatMoves"); if (!field.ContainsKey(((CharacterItem)component).Entity.GUID)) { field.Add(((CharacterItem)component).Entity.GUID, (Object)(object)val); } else { field[((CharacterItem)component).Entity.GUID] = (Object)(object)val; } if (!field2.ContainsKey(((CharacterItem)component).Entity.GUID)) { field2.Add(((CharacterItem)component).Entity.GUID, val); } else { field2[((CharacterItem)component).Entity.GUID] = val; } landfallContentDatabase.SetField("m_combatMoves", field2); assetLoader.SetField("m_nonStreamableAssets", field); ((CharacterItem)component).tags.Add(new Tag((TagType)0, "Custom Abilites")); if (abilites.ContainsKey(val.GetComponent<NodeRunner>().nodeScene.sceneName)) { abilites.Remove(val.GetComponent<NodeRunner>().nodeScene.sceneName); } abilites.Add(val.GetComponent<NodeRunner>().nodeScene.sceneName, val); } catch { } } private void CreateNodeBlueprint(string key, List<NodeBlueprint.ConnectionType> connectionsTypes, Dictionary<string, ContentType> fields, NodeBlueprint.Type type, Color color, string name, string Tab, bool longfield = false, Type node = null) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) if (nodeDatabase.ContainsKey(key)) { key += "+"; } List<NodeBlueprint.Field> list = new List<NodeBlueprint.Field>(); KeyValuePair<string, ContentType>[] array = fields.ToArray(); for (int i = 0; i < array.Length; i++) { list.Add(new NodeBlueprint.Fi