Decompiled source of Intreasting Units v1.0.0
IU.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using BepInEx; using BitCode.Debug.Commands; using DM; using FhpSLib; using HarmonyLib; using IU; using Landfall.TABS; using Landfall.TABS.AI.Systems; using Landfall.TABS.GameMode; using Landfall.TABS.GameState; using Landfall.TABS.UnitEditor; using Landfall.TABS.UnitPlacement; using Landfall.TABS.Workshop; using SLMA; using TFBGames; using TMPro; using Unity.Entities; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("IU")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("made in SFT by mimimi")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3a45c3cf-230c-4310-952f-0887d4266a22")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [HarmonyPatch(typeof(Unit), "SetHighlight")] internal class CustomOutlinePatch { [HarmonyPostfix] public static void Postfix(Unit __instance, ref Color highlightColor) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)__instance).GetComponentInChildren<HighlightColor>() != (Object)null) { IHighlight val = (IHighlight)OtherLibrary.GetField<Unit>(__instance, "m_highlighter"); val.BeginHighlight(); val.SetHighlightColor(((Component)__instance).GetComponentInChildren<HighlightColor>().color); } } } public class Item : MonoBehaviour { public enum kind { Weapon, Cloth, Skill, Unit, Projectile, Other } public string name; public kind Kind; } namespace IU; public class AlwaysSethighlight : MonoBehaviour { public Color color; private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((Component)this).GetComponent<Unit>().SetHighlight(color); } } public class CurseofBinding : MonoBehaviour { private Unit unit; private Transform[] childern; public int iterations; public bool alreadydead = false; private void Awake() { alreadydead = false; unit = ((Component)this).gameObject.GetComponent<Unit>(); childern = ((Component)unit).gameObject.GetComponentsInChildren<Transform>(); ((MonoBehaviour)this).StartCoroutine(LaggyEvents()); } private void Update() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Invalid comparison between Unknown and I4 //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Invalid comparison between Unknown and I4 //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Invalid comparison between Unknown and I4 //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Invalid comparison between Unknown and I4 ((Component)unit.data.torso).GetComponent<Rigidbody>().AddForce(new Vector3(0f, -20f, 0f), (ForceMode)2); unit.data.muscleControl = 0f; unit.data.ragdollControl = 0f; if (iterations >= 0) { if (unit.data.health == float.PositiveInfinity && !Object.op_Implicit((Object)(object)((Component)unit).gameObject.GetComponentInChildren<Immortality>())) { unit.data.health = 9999999f; } unit.data.health = unit.data.health - unit.data.maxHealth / 10f * unit.unitBlueprint.healthMultiplier; iterations--; } if (!(unit.data.health <= 0f) || alreadydead) { return; } GameModeService service = ServiceLocator.GetService<GameModeService>(); ((Component)((Component)this).GetComponent<Unit>()).GetComponentInChildren<DataHandler>().Dead = true; alreadydead = true; service.CurrentGameMode.WinConditionPropagator.OnUnitDied(unit); TeamSystem orCreateManager = World.Active.GetOrCreateManager<TeamSystem>(); if ((int)((Component)this).GetComponent<Unit>().Team == 0) { GooglyEye[] array = Object.FindObjectsOfType<GooglyEye>(); foreach (GooglyEye val in array) { if ((Object)(object)((Component)((Component)val).transform.root).GetComponent<Unit>() != (Object)null && (int)((Component)((Component)val).transform.root).GetComponent<Unit>().Team == 0) { val.Die(); } } int num = 0; foreach (Unit teamUnit in orCreateManager.GetTeamUnits((Team)0)) { if (!teamUnit.data.Dead) { num++; } } if (num <= 1) { service.CurrentGameMode.OnWinnerDecided((Team)1, "Not Even Close"); service.CurrentGameMode.DecideWinner((Team)1, "Not Even Close"); } } if ((int)((Component)this).GetComponent<Unit>().Team == 1) { GooglyEye[] array2 = Object.FindObjectsOfType<GooglyEye>(); foreach (GooglyEye val2 in array2) { if ((Object)(object)((Component)((Component)val2).transform.root).GetComponent<Unit>() != (Object)null && (int)((Component)((Component)val2).transform.root).GetComponent<Unit>().Team == 1) { val2.Die(); } } int num2 = 0; foreach (Unit teamUnit2 in orCreateManager.GetTeamUnits((Team)1)) { if (!teamUnit2.data.Dead) { num2++; } } if (num2 <= 1) { service.CurrentGameMode.OnWinnerDecided((Team)0, "Not Even Close"); service.CurrentGameMode.DecideWinner((Team)0, "Not Even Close"); } } alreadydead = true; } private IEnumerator LaggyEvents() { yield return (object)new WaitForSecondsRealtime(1f); SpecialAbility[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<SpecialAbility>(); foreach (SpecialAbility s in componentsInChildren) { Object.Destroy((Object)(object)s); } ((MonoBehaviour)this).StartCoroutine(LaggyEvents()); } } public class Move_DemonRage : MonoBehaviour { public GameObject sliceeffect; public GaryListner gl; public bool IsEnraged; private void Awake() { sliceeffect = Loader.SliceEffect; } private IEnumerator loop() { yield return (object)new WaitForSeconds(7f); IsEnraged = true; yield return (object)new WaitForSeconds(2f); IsEnraged = false; ((MonoBehaviour)this).StartCoroutine(loop()); } private IEnumerator slowloop() { if (IsEnraged) { Unit[] array = Object.FindObjectsOfType<Unit>(); foreach (Unit u in array) { if (u.Team != ((Component)this).gameObject.GetComponent<Unit>().Team) { PlayBlood(u.data.head, sliceeffect); PlayBlood(u.data.legRight, sliceeffect); PlayBlood(u.data.legLeft, sliceeffect); PlayBlood(u.data.leftHand, sliceeffect); PlayBlood(u.data.rightHand, sliceeffect); PlaySlice(u.data.head, sliceeffect); PlaySlice(u.data.legRight, sliceeffect); PlaySlice(u.data.legLeft, sliceeffect); PlaySlice(u.data.leftHand, sliceeffect); PlaySlice(u.data.rightHand, sliceeffect); Transform transform = ((Component)u.data.head).transform; transform.localScale *= 0f; Transform transform2 = ((Component)u.data.legRight).transform; transform2.localScale *= 0f; Transform transform3 = ((Component)u.data.legLeft).transform; transform3.localScale *= 0f; Transform transform4 = ((Component)u.data.leftHand).transform; transform4.localScale *= 0f; Transform transform5 = ((Component)u.data.rightHand).transform; transform5.localScale *= 0f; Transform transform6 = ((Component)u.data.footLeft).transform; transform6.localScale *= 0f; Transform transform7 = ((Component)u.data.footRight).transform; transform7.localScale *= 0f; Transform transform8 = ((Component)u.data.leftArm).transform; transform8.localScale *= 0f; Transform transform9 = ((Component)u.data.rightArm).transform; transform9.localScale *= 0f; if ((Object)(object)u.data.weaponHandler.rightWeapon != (Object)null) { Transform transform10 = ((Component)u.data.weaponHandler.rightWeapon).transform; transform10.localScale *= 0f; } if ((Object)(object)u.data.weaponHandler.leftWeapon != (Object)null) { Transform transform11 = ((Component)u.data.weaponHandler.leftWeapon).transform; transform11.localScale *= 0f; } u.holdingHandler.LetGoOfAll(); u.data.ragdollControl = -1f; u.data.muscleControl = -1f; SpecialAbility[] componentsInChildren = ((Component)u).gameObject.GetComponentsInChildren<SpecialAbility>(); foreach (SpecialAbility s in componentsInChildren) { Object.Destroy((Object)(object)((Component)s).gameObject); } } } } yield return (object)new WaitForSeconds(0.2f); ((MonoBehaviour)this).StartCoroutine(slowloop()); } public IEnumerator Startrage() { ((MonoBehaviour)this).StartCoroutine(loop()); ((MonoBehaviour)this).StartCoroutine(slowloop()); ShootParticle(); yield return null; } private void Update() { if (!IsEnraged) { } } private void ShootParticle() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(Loader.InfiniteParticle); val.transform.position = ((Component)this).GetComponent<Unit>().data.head.position; val.AddComponent<Rigidbody>().AddForce(0f, 7f, 0f, (ForceMode)2); val.GetComponent<Rigidbody>().useGravity = false; val.GetComponent<Rigidbody>().freezeRotation = true; ((Renderer)val.GetComponent<MeshRenderer>()).material = GarySetups.Fastmat(Color.black); InfiniteParticle infiniteParticle = val.AddComponent<InfiniteParticle>(); infiniteParticle.me = ((Component)this).GetComponent<Unit>(); val.AddComponent<DestroySelfWhenUnitDestroyed>().unit = ((Component)this).GetComponent<Unit>(); gl.ip = infiniteParticle; } private void PlaySlice(Transform tr, GameObject sliceEffect) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(sliceEffect, (Transform)null); Transform transform = val.transform; transform.localScale *= 2f; val.transform.position = tr.position; val.transform.rotation = tr.rotation; Transform transform2 = val.transform; Vector3 one = Vector3.one; float num = Random.Range(0, 720); transform2.RotateAround(tr.position, one, num); CodeAnimation component = val.GetComponent<CodeAnimation>(); if (component != null) { component.PlayIn(); } val.AddComponent<RemoveAfterSeconds>().seconds = 0.5f; } private void PlayBlood(Transform tr, GameObject sliceEffect) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(Loader.Blood, (Transform)null); val.transform.position = ((Component)tr).transform.position; val.AddComponent<RemoveAfterSeconds>().seconds = 1f; } } public class DestroySelfWhenUnitDestroyed : MonoBehaviour { public Unit unit; private void Update() { if ((Object)(object)unit == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class FlameThrower : MonoBehaviour { public enum Modes { Active, Stop } public RangeWeapon rangeWeapon; public bool STOP; public float More = 0f; public Modes CurrentMode; private void Awake() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown rangeWeapon = ((Component)this).GetComponent<RangeWeapon>(); rangeWeapon.shootEvent.AddListener((UnityAction)delegate { Increase(); }); ParticleSystem[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { if (((Object)((Component)val).gameObject).name == "Fire (1)") { val.emissionRate = 400f; } } } private void Increase() { More += 1f; if (More > 5f) { More = 5f; } } private void Update() { if (More >= 0f && CurrentMode == Modes.Stop) { SetActive(); More -= Time.deltaTime; ParticleSystem[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { if (((Object)((Component)val).gameObject).name == "Fire (1)") { val.Play(); } } } else { Stop(); } } private void SetActive() { CurrentMode = Modes.Active; ParticleSystem[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { if (((Object)((Component)val).gameObject).name == "Fire (1)") { val.Play(); } } DelayEvent[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren<DelayEvent>(); foreach (DelayEvent val2 in componentsInChildren2) { if (((Object)((Component)val2).gameObject).name == "SetActive") { val2.Go(); } } } private void Stop() { CurrentMode = Modes.Stop; ParticleSystem[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem val in componentsInChildren) { if (((Object)((Component)val).gameObject).name == "Fire (1)") { val.Stop(); } } DelayEvent[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren<DelayEvent>(); foreach (DelayEvent val2 in componentsInChildren2) { if (((Object)((Component)val2).gameObject).name == "Disable") { val2.Go(); } } } } public class GarySetups : MonoBehaviour { public static Material Fastmat(Color color, bool isParticle = false) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) Material val; if (!isParticle) { val = new Material(Shader.Find("Standard")); } else { try { val = new Material(Shader.Find("Particles/Standard Surface")); } catch (Exception) { val = new Material(Shader.Find("Particles/StandardSurface")); } } val.color = color; val.SetFloat("_Glossiness", 0f); return val; } public static void TurnParticleblack(ParticleSystemRenderer p) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) int num = 0; Material[] materials = ((Renderer)p).materials; foreach (Material val in materials) { ((Renderer)p).materials[num] = Fastmat(Color.white); num++; } } public static async Task GaryFlames(GameObject weaopon1) { await Task.Delay(50); Transform ObjectTransform = weaopon1.transform.Find("ObjectTransform"); Transform LongName = ObjectTransform.Find("p_Fireball_1 Prefabs_VB(Clone)"); Transform Mid = LongName.Find("Mid"); Transform Fire_Idle = Mid.Find("Fire_Idle"); Transform Fire_Trail = Mid.Find("Fire_Trail"); Transform Fire_Explo = Mid.Find("Fire_Explo"); ((Renderer)((Component)Fire_Idle).GetComponent<ParticleSystemRenderer>()).material = new Material(Shader.Find("Unlit/Color")); TurnParticleblack(((Component)Fire_Idle).GetComponent<ParticleSystemRenderer>()); ((Object)Fire_Idle).name = "Blck_fire_Idle"; ((Renderer)((Component)Fire_Trail).GetComponent<ParticleSystemRenderer>()).material = new Material(Shader.Find("Unlit/Color")); TurnParticleblack(((Component)Fire_Trail).GetComponent<ParticleSystemRenderer>()); ((Object)Fire_Trail).name = "Blck_fire_Trail"; ((Renderer)((Component)Fire_Explo).GetComponent<ParticleSystemRenderer>()).material = new Material(Shader.Find("Unlit/Color")); TurnParticleblack(((Component)Fire_Explo).GetComponent<ParticleSystemRenderer>()); ((Object)Fire_Explo).name = "Blck_fire_Explo"; } public static void MakeNotWeapon(GameObject temp) { Object.Destroy((Object)(object)temp.GetComponentInChildren<GOSLMA>()); Object.Destroy((Object)(object)temp.GetComponentInChildren<MeleeWeapon>()); Object.Destroy((Object)(object)temp.GetComponentInChildren<Weapon>()); Object.Destroy((Object)(object)temp.GetComponentInChildren<WeaponItem>()); Object.Destroy((Object)(object)temp.GetComponentInChildren<WeaponForceAnimation>()); Object.Destroy((Object)(object)temp.GetComponentInChildren<Cost>()); } } public class Gaurdian_Angel : MonoBehaviour { public Team TargetTeam; private void Awake() { } private void Update() { } } public class GaryListner : MonoBehaviour { public InfiniteParticle ip; public Move_DemonRage DR; } public class HighlightColor : MonoBehaviour { public Color color; private void Awake() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((Component)this).GetComponent<Unit>().SetHighlight(color); } } public class Immortality : MonoBehaviour { public bool CanBeDestroyed = true; public GameObject GaurdianAngel; private void Awake() { GameModeService service = ServiceLocator.GetService<GameModeService>(); ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>().data.maxHealth = float.PositiveInfinity; ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>().data.health = float.PositiveInfinity; } } public class InfiniteParticle : MonoBehaviour { private bool ismad = false; public LineRenderer LineRenderer; public Unit Target; public Unit me; public bool alreadydead; private void Awake() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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) LineRenderer = ((Component)this).gameObject.AddComponent<LineRenderer>(); ((Renderer)LineRenderer).material = new Material(Shader.Find("Sprites/Default")); for (int i = 0; i < ((Renderer)LineRenderer).materials.Length; i++) { ((Renderer)LineRenderer).materials[i] = GarySetups.Fastmat(Color.black); } LineRenderer.startColor = Color.black; LineRenderer.endColor = Color.black; LineRenderer.startWidth = 0f; LineRenderer.endWidth = 0.8f; LineRenderer.positionCount = 2; } public IEnumerator StartShoot() { ((MonoBehaviour)this).StartCoroutine(loop()); yield return null; } private IEnumerator loop() { yield return (object)new WaitForSeconds(0.3f); ((Component)this).GetComponent<Rigidbody>().velocity = Vector3.zero; yield return (object)new WaitForSeconds(1.7f); if ((Object)(object)me.data.targetData != (Object)null && !me.data.targetData.Dead) { Target = me.data.targetData.unit; } ((MonoBehaviour)this).StartCoroutine(loop()); } private void Update() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Target == (Object)null) { LineRenderer.SetPosition(1, ((Component)this).transform.position); return; } LineRenderer.GetPosition(0); if (true) { LineRenderer.SetPosition(0, ((Component)this).transform.position); } LineRenderer.GetPosition(1); if (true) { LineRenderer.SetPosition(1, Target.data.head.position); } if (Target.data.health == float.PositiveInfinity) { Target.data.health = 1000f; ismad = true; } if (ismad) { DataHandler data = Target.data; data.health -= Target.data.maxHealth / 2f * Time.deltaTime; } else { DataHandler data2 = Target.data; data2.health -= Target.data.maxHealth / 10f * Time.deltaTime; } if (!(Target.data.health <= 0f)) { return; } GameModeService service = ServiceLocator.GetService<GameModeService>(); if (service != null) { BaseGameMode currentGameMode = service.CurrentGameMode; bool? obj; if (currentGameMode == null) { obj = null; } else { VerticalCurtainController curtainController = currentGameMode.CurtainController; obj = ((curtainController != null) ? new bool?(curtainController.AreCurtainsClosed) : null); } if (obj == false) { ((Component)me.data.weaponHandler.rightWeapon).GetComponent<MeleeWeapon>().swingEvent.Invoke(); } } } } public class Jotaro : MonoBehaviour { public float Time = 7f; public float Time2 = 12f; public bool IstimeStoped = false; public List<Unit> DamageQue = new List<Unit>(); public Unit me; public void awake() { ((MonoBehaviour)this).StartCoroutine(SpawnStarPlatiunim()); ((MonoBehaviour)this).StartCoroutine(loop2()); } private IEnumerator loop2() { yield return (object)new WaitForSeconds(Time2); ((MonoBehaviour)this).StartCoroutine(StopTime()); ((MonoBehaviour)this).StartCoroutine(loop2()); } private IEnumerator SpawnStarPlatiunim() { GameObject Starplatinum = Object.Instantiate<GameObject>(Loader.StarPlatinum); yield return (object)new WaitUntil((Func<bool>)(() => WaitTellMainrig(me.data))); Starplatinum.transform.position = ((Component)me.data.mainRig).transform.position + ((Component)me.data.mainRig).transform.forward * 1.5f; Starplatinum.transform.rotation = Quaternion.identity; Transform transform = Starplatinum.transform; transform.localScale *= 0.5f; Starplatinum.transform.Find("Scaler").rotation = Loader.offest; Transform obj = Starplatinum.transform.Find("Scaler"); obj.localScale *= 1.3f; GoInfrontofUnitEnemy go = Starplatinum.AddComponent<GoInfrontofUnitEnemy>(); go.Jotaro = me; Starplatinum.AddComponent<ContinuesPunchs>(); Starplatinum.AddComponent<DestroySelfWhenUnitDestroyed>().unit = me; Object.Destroy((Object)(object)Starplatinum.GetComponent<RemoveAfterSeconds>()); Transform[] bones = Starplatinum.GetComponentInChildren<SkinnedMeshRenderer>().bones; foreach (Transform t in bones) { CopyPositionRelativeTo a = ((Component)t).gameObject.AddComponent<CopyPositionRelativeTo>(); Transform[] boneTransforms = ((Component)me).GetComponent<UnitRig>().boneTransforms; foreach (Transform t2 in boneTransforms) { if (((Object)t).name == ((Object)t2).name && ((Object)t).name != "M_Torso") { a.target = t2; } } a.relativeTarget = me.data.torso.Find("M_Torso"); a.relativeTo = Starplatinum.transform.Find("Scaler").Find("Armature").Find("M_Torso"); } } private bool WaitTellMainrig(DataHandler dataHandler) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) bool flag = false; try { Transform transform = ((Component)dataHandler.mainRig).transform; transform.position += Vector3.zero; return true; } catch (SystemException) { return false; } } private IEnumerator StopTime() { float oldfloat = 1f; float oldfloat2 = 1f; IstimeStoped = true; Unit[] array = Object.FindObjectsOfType<Unit>(); foreach (Unit u in array) { if ((Object)(object)u != (Object)(object)((Component)this).GetComponent<Unit>()) { u.FreezeBody(); try { oldfloat = ((Component)u).GetComponentInChildren<StepHandler>().multiplier; ((Component)u).GetComponentInChildren<StepHandler>().multiplier = 0f; oldfloat2 = ((Component)u).GetComponentInChildren<AnimationHandler>().multiplier; ((Component)u).GetComponentInChildren<AnimationHandler>().multiplier = 0f; } catch (Exception) { } } } yield return (object)new WaitForSeconds(6f); IstimeStoped = false; Unit[] array2 = Object.FindObjectsOfType<Unit>(); foreach (Unit u2 in array2) { if ((Object)(object)u2 != (Object)(object)((Component)this).GetComponent<Unit>()) { try { u2.UnfreezeBody(); ((Component)u2).GetComponentInChildren<AnimationHandler>().multiplier = oldfloat2; ((Component)u2).GetComponentInChildren<StepHandler>().multiplier = oldfloat; } catch (Exception) { } } } foreach (Unit u3 in DamageQue) { if ((Object)(object)u3 != (Object)null) { ((Damagable)u3.data.healthHandler).TakeDamage(5f, Vector3.zero, (Unit)null, (DamageType)0); u3.data.mainRig.AddForce(((Component)u3.data.mainRig).transform.forward * -30f, (ForceMode)1); } } } } public class GoInfrontofUnitEnemy : MonoBehaviour { public bool Attack = false; public Unit Jotaro; public Transform target; public float speed = 0.5f; public Vector3 posnoY = default(Vector3); public Quaternion offset = new Quaternion(0f, 0f, 0f, 0f); private void FixedUpdate() { //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Jotaro.data.targetMainRig != (Object)null) { if (!((Component)Jotaro).gameObject.GetComponent<Jotaro>().IstimeStoped) { if (Vector3.Distance(((Component)Jotaro.data.targetMainRig).transform.position, ((Component)Jotaro.data.mainRig).transform.position) < 7f) { ((Component)this).GetComponent<ContinuesPunchs>().Stoppunchs = false; target = ((Component)Jotaro.data.targetMainRig).transform; Vector3 val = target.position + target.forward * 2.4f; ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, val, speed); posnoY = new Vector3(target.position.x, ((Component)this).transform.position.y, target.position.z); ((Component)this).transform.LookAt(posnoY); } else { ((Component)this).GetComponent<ContinuesPunchs>().Stoppunchs = true; target = ((Component)Jotaro.data.mainRig).transform; Vector3 val2 = target.position + target.forward * -2f; ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, val2, speed); posnoY = new Vector3(target.position.x, ((Component)this).transform.position.y, target.position.z); ((Component)this).transform.LookAt(posnoY); } } } else { ((Component)this).GetComponent<ContinuesPunchs>().Stoppunchs = true; target = ((Component)Jotaro.data.mainRig).transform; Vector3 val3 = target.position + target.forward * -2f; ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, val3, speed); posnoY = new Vector3(target.position.x, ((Component)this).transform.position.y, target.position.z); ((Component)this).transform.LookAt(posnoY); } } } public class ContinuesPunchs : MonoBehaviour { public int Gridx = 6; public int Gridy = 6; public bool Stoppunchs = false; public bool isplayingsound = false; private List<GameObject> allhands = new List<GameObject>(); private IEnumerator loop() { if (!Stoppunchs) { GameObject punch = Object.Instantiate<GameObject>(Loader.SPPunch); punch.transform.localPosition = ((Component)this).transform.localPosition + ((Component)this).transform.forward; punch.transform.parent = ((Component)this).transform; punch.AddComponent<RemoveAfterSeconds>().seconds = 0.025f; punch.AddComponent<HitOnTrigger>().jotaro = ((Component)((Component)this).GetComponent<GoInfrontofUnitEnemy>().Jotaro).GetComponent<Jotaro>(); for (int x = 1; x < Gridx; x++) { for (int y = 1; y < Gridy; y++) { if (!Stoppunchs) { GameObject a = Object.Instantiate<GameObject>(punch, ((Component)this).transform); a.transform.localPosition = punch.transform.localPosition; a.transform.Find("TabsUnit.002"); Transform transform = a.transform; transform.localPosition -= a.transform.forward * -4.5f * (Random.Range(0f, 100f) / 100f); if (x <= 0) { Transform transform2 = a.transform; transform2.localPosition -= punch.transform.right * ((float)x - 2.5f) * (Random.Range(30f, 120f) / 100f); } if (x >= 0) { Transform transform3 = a.transform; transform3.localPosition += punch.transform.right * ((float)x - 2.5f) * (Random.Range(30f, 120f) / 100f); } if (y <= 0) { Transform transform4 = a.transform; transform4.localPosition -= punch.transform.up * ((float)y - 2.5f) * (Random.Range(30f, 120f) / 100f); } if (y >= 0) { Transform transform5 = a.transform; transform5.localPosition += punch.transform.up * ((float)y - 2.5f) * (Random.Range(30f, 120f) / 100f); } allhands.Add(a); } } } punch.transform.LookAt(((Component)this).GetComponent<GoInfrontofUnitEnemy>().posnoY); foreach (GameObject g in allhands) { g.transform.rotation = punch.transform.rotation; } allhands.Clear(); } yield return (object)new WaitForSeconds(0.025f); ((MonoBehaviour)this).StartCoroutine(loop()); } private void Awake() { ((MonoBehaviour)this).StartCoroutine(loop()); } private void PlaySound() { ((Component)this).gameObject.AddComponent<AudioSource>().clip = Loader.clip2; ((Component)this).gameObject.GetComponent<AudioSource>().playOnAwake = false; ((Component)this).gameObject.GetComponent<AudioSource>().loop = true; ((Component)this).gameObject.GetComponent<AudioSource>().volume = 0.6f; ((Component)this).gameObject.GetComponent<AudioSource>().Play(); } private void StopSound() { try { Object.Destroy((Object)(object)((Component)this).gameObject.GetComponent<AudioClip>()); } catch (SystemException) { } } private void FixedUpdate() { if (Stoppunchs && isplayingsound) { StopSound(); isplayingsound = false; } if (!Stoppunchs && !isplayingsound) { PlaySound(); isplayingsound = true; } } } public class HitOnTrigger : MonoBehaviour { public Jotaro jotaro; public void OnCollisionEnter(Collision collision) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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) try { Unit component = ((Component)collision.transform.root).GetComponent<Unit>(); if (!((Object)(object)component == (Object)(object)((Component)jotaro).GetComponent<Unit>())) { if (!jotaro.IstimeStoped) { ((Damagable)component.data.healthHandler).TakeDamage(4f, ((Component)component.data.mainRig).transform.forward * -0.5f, (Unit)null, (DamageType)2); } else { jotaro.DamageQue.Add(component); } component.data.mainRig.AddForce(((Component)component.data.mainRig).transform.forward * -60f, (ForceMode)1); } } catch (Exception) { } } } public class StopStarPlatinuim : MonoBehaviour { private void Awake() { ((MonoBehaviour)this).StartCoroutine(StopStarplat()); } private IEnumerator StopStarplat() { yield return (object)new WaitForSeconds(3f); ((Component)this).GetComponent<ContinuesPunchs>().Stoppunchs = true; AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>(); foreach (AudioSource AS in componentsInChildren) { AS.volume /= 4f; } AudioSource a = ((Component)this).gameObject.AddComponent<AudioSource>(); a.clip = Loader.clip3; a.playOnAwake = false; a.Play(); yield return (object)new WaitForSeconds(Loader.clip3.length); Object.Destroy((Object)(object)GameObject.Find("LastOra")); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class CopyPositionRelativeTo : MonoBehaviour { public Transform target; public Transform relativeTarget; public Transform relativeTo; private void Update() { //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) if (!((Component)((Component)this).transform.root).GetComponent<ContinuesPunchs>().Stoppunchs) { if (((Object)((Component)this).transform).name == "M_Arm_Left" || ((Object)((Component)this).transform).name == "M_Elbow_Left" || ((Object)((Component)this).transform).name == "M_Elbow_Right" || ((Object)((Component)this).transform).name == "M_Arm_Right") { ((Component)this).transform.localScale = Vector3.zero; } return; } if (((Object)((Component)this).transform).name == "M_Arm_Left" || ((Object)((Component)this).transform).name == "M_Elbow_Left" || ((Object)((Component)this).transform).name == "M_Elbow_Right" || ((Object)((Component)this).transform).name == "M_Arm_Right") { ((Component)this).transform.localScale = Vector3.one; } if (!((Object)(object)target == (Object)null) && !((Object)(object)relativeTarget == (Object)null) && !((Object)(object)relativeTo == (Object)null)) { Vector3 val = relativeTarget.position - target.position; ((Component)this).transform.position = relativeTo.position - val; ((Component)this).transform.rotation = target.rotation; } } } [BepInPlugin("IntreastingUnits", "IntreastingUnits", "1.0.0")] internal class Loader : BaseUnityPlugin { public static AssetBundle Bundle; public static AssetBundle Bundle2; public static GameObject GooglyEye; public static GameObject NexusSpray; public static GameObject UnitImortal; public static GameObject LightingEffect; public static GameObject Sentry; public static GameObject Storm; public static GameObject SliceEffect; public static GameObject Tree; public static GameObject Flamethrower; public static GameObject CleaNBase; public static MyModItems modItems; public static GameObject NexusUnlock; public static GameObject Blood; public static GameObject InfiniteParticle; public static GameObject SignOftheVoid; public static GameObject JKHat; public static GameObject JKVest; public static GameObject SPPunch; public static GameObject StarPlatinum; public static GameObject StormHeraldEffect; public static GameObject otulinecube; public static GameObject UnAttackableglobal; public static GameObject Unkillable; public static GameObject UnlockGary; public static GameObject UnlockJotaroKujo; public static GameObject UnlockDeforester; public static GameObject UnlockChestDude; public static GameObject ChestProjectilleExplosion; public static ISaveLoaderService service; public static Sprite garyicon; public static Sprite flamethrowericon; public static Sprite Stiormicon; public static Sprite TreeGuyicon; public static Sprite ChestGuyicon; public static Sprite JotaroKujoIcon; public static Material GARYmat; public static VoiceBundle Jotarosounds; public static VoiceBundle Garysounds; public static AudioClip clip2; public static AudioClip clip3; public static AudioClip Garyclip1; public static AudioClip Garyclip2; public static AudioClip Garyclip3; public static AudioClip ProjectileExplo; public static Quaternion offest = new Quaternion(1f, 0f, 0f, 7f); private void Awake() { ((MonoBehaviour)this).StartCoroutine("call"); } public static AssetBundle LoadBundle(string assetBundleName) { string[] manifestResourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames(); foreach (string text in manifestResourceNames) { } using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(assetBundleName); AssetBundle val = AssetBundle.LoadFromStream(stream); string[] allAssetNames = val.GetAllAssetNames(); foreach (string text2 in allAssetNames) { } return val; } private IEnumerator call() { Bundle2 = LoadBundle("I_U.tree"); JKHat = Bundle2.LoadAsset<GameObject>("Assets/CP_MiscJKHAT.prefab"); JKVest = Bundle2.LoadAsset<GameObject>("Assets/Jotaro Kujo Vest.prefab"); MakeAbShowinUCAsProp(JKHat, ContentDatabase.Instance().LandfallContentDatabase); MakeAbShowinUCAsProp(JKVest, ContentDatabase.Instance().LandfallContentDatabase); yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)Object.FindObjectOfType<ServiceLocator>() != (Object)null)); yield return (object)new WaitUntil((Func<bool>)(() => ServiceLocator.GetService<ISaveLoaderService>() != null)); yield return (object)new WaitForSecondsRealtime(0.3f); GameObject[] array2 = Resources.FindObjectsOfTypeAll<GameObject>(); foreach (GameObject g in array2) { if (((Object)g.gameObject).name == "GooglyEye") { GooglyEye = g.gameObject; } if (((Object)g.gameObject).name == "E_Storm_Thor") { Storm = g.gameObject; } } Bundle = LoadBundle("I_U.sds.s"); NexusUnlock = Bundle2.LoadAsset<GameObject>("Assets/NexusUnlock.prefab"); UnitImortal = Bundle2.LoadAsset<GameObject>("Assets/GARY.prefab"); InfiniteParticle = Bundle2.LoadAsset<GameObject>("Assets/InfiniteParticle.prefab"); SignOftheVoid = Bundle2.LoadAsset<GameObject>("Assets/InfiniteParticle.prefab"); garyicon = Bundle2.LoadAsset<Sprite>("Assets/GARYicon.png"); flamethrowericon = Bundle2.LoadAsset<Sprite>("Assets/Flame Thrower.png"); Stiormicon = Bundle2.LoadAsset<Sprite>("Assets/Storm Herald.png"); TreeGuyicon = Bundle2.LoadAsset<Sprite>("Assets/tree.png"); ChestGuyicon = Bundle2.LoadAsset<Sprite>("Assets/chest guy.png"); JotaroKujoIcon = Bundle2.LoadAsset<Sprite>("Assets/Jotaro Kujo Unit.png"); GARYmat = Bundle2.LoadAsset<Material>("Assets/Void.mat"); SPPunch = Bundle2.LoadAsset<GameObject>("Assets/Glove SPfbx.prefab"); StarPlatinum = Bundle2.LoadAsset<GameObject>("Assets/Star Platinum.prefab"); UnlockChestDude = Bundle2.LoadAsset<GameObject>("Assets/Chest Dude Unlock.prefab"); UnlockDeforester = Bundle2.LoadAsset<GameObject>("Assets/Deforster Unlock.prefab"); UnlockJotaroKujo = Bundle2.LoadAsset<GameObject>("Assets/Jotaro Unlock 4.prefab"); UnlockGary = Bundle2.LoadAsset<GameObject>("Assets/GaryUnlock.prefab"); StormHeraldEffect = Bundle2.LoadAsset<GameObject>("Assets/Storm herald Effects.prefab"); clip2 = Bundle2.LoadAsset<AudioClip>("Assets/oraora.mp3"); clip3 = Bundle2.LoadAsset<AudioClip>("Assets/finalora.mp3"); Garyclip1 = Bundle2.LoadAsset<AudioClip>("Assets/GarySound1.mp3"); ProjectileExplo = Bundle2.LoadAsset<AudioClip>("Assets/Projectile Destruction.mp3"); otulinecube = Bundle2.LoadAsset<GameObject>("Assets/Outlined.prefab"); ChestProjectilleExplosion = Bundle2.LoadAsset<GameObject>("Assets/Projectile Explosion.prefab"); Garyclip2 = Bundle2.LoadAsset<AudioClip>("Assets/GarySound2.mp3"); Garyclip3 = Bundle2.LoadAsset<AudioClip>("Assets/GarySound3.mp3"); SliceEffect = Bundle2.LoadAsset<GameObject>("Assets/E_Slice.prefab"); Blood = Bundle2.LoadAsset<GameObject>("Assets/Blood.prefab"); LightingEffect = Bundle2.LoadAsset<GameObject>("Assets/ShockEffect.prefab"); Sentry = Bundle2.LoadAsset<GameObject>("Assets/FixedSentry.prefab"); GameObject b = Bundle2.LoadAsset<GameObject>("Assets/ChestGuy.prefab"); b.AddComponent<GOSLMA>(); Dictionary<DatabaseID, GameObject> objdict2 = (Dictionary<DatabaseID, GameObject>)typeof(LandfallContentDatabase).GetField("m_unitBases", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().LandfallContentDatabase); objdict2.Add(new DatabaseID(551721487, -2), b); CleaNBase = b; SLMALoader.GetInstance(); LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase; UManager.Init(landfallContentDatabase); modItems = MyModItems.GetInstance(); setupsettings(); GameObject SecretUnlockSpawner = new GameObject("SecretUnlockSpawner"); Object.DontDestroyOnLoad((Object)(object)SecretUnlockSpawner); SecretUnlockSpawner.AddComponent<SecretUnlockSpawnerComp>(); new Harmony(UManager.modname).PatchAll(); GOSLMA.EditWeapons = ((GOSLMA.EditWeapons == null) ? new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons) : ((Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons), GOSLMA.EditWeapons))); GOSLMA.EditClothes = ((GOSLMA.EditClothes == null) ? new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes) : ((Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes), GOSLMA.EditClothes))); GOSLMA.EditCombatMoves = ((GOSLMA.EditCombatMoves == null) ? new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves) : ((Action<GameObject, int, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves), GOSLMA.EditCombatMoves))); GOSLMA.CodeAfterSpawn = ((GOSLMA.CodeAfterSpawn == null) ? new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn) : ((Action<Unit, LandfallContentDatabase>)Delegate.Combine(new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn), GOSLMA.CodeAfterSpawn))); GOSLMA.EditProjectiles = ((GOSLMA.EditProjectiles == null) ? new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles) : ((Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles), GOSLMA.EditProjectiles))); UnitBlueprint[] array = Resources.FindObjectsOfTypeAll<UnitBlueprint>(); for (int i2 = 0; i2 < array.Length; i2++) { UManager.EditBlueprint(array[i2], landfallContentDatabase); } Dictionary<int, UnitBlueprint> fac = new Dictionary<int, UnitBlueprint>(); int i = 1; foreach (UnitBlueprint u in UManager.ls) { try { UnitBlueprint obj = fac[(int)u.GetUnitCost(true)]; obj.sizeMultiplier *= 1f; fac.Add((int)u.GetUnitCost(true) + i, u); i++; } catch (Exception) { fac.Add((int)u.GetUnitCost(true), u); } } IOrderedEnumerable<KeyValuePair<int, UnitBlueprint>> sortedDict = fac.OrderBy(delegate(KeyValuePair<int, UnitBlueprint> entry) { KeyValuePair<int, UnitBlueprint> keyValuePair = entry; return keyValuePair.Key; }); List<UnitBlueprint> units = new List<UnitBlueprint>(); foreach (KeyValuePair<int, UnitBlueprint> item in sortedDict) { units.Add(item.Value); } ((Faction)SLMALoader.SDic["factions"]["Secret"]).Units = units.ToArray(); Debug.Log((object)("Loaded " + UManager.modname + " Successfully")); Debug.Log((object)(UManager.modname + "is made in SFT by FhpSlime")); Debug.Log((object)(UManager.modder + "wished you a pleasant trip")); } public static void SetupAbs() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) GameObject val = CreateNewAb((GearType)11, "Immortality", new DatabaseID(-1, 802699326)); val.AddComponent<GoToBodyPart>().targetPart = (TargetPart)2; UnityBehaviourCommands.SetEnabled((Behaviour)(object)val.AddComponent<Immortality>(), true); Unkillable = val; GameObject val2 = CreateNewAb((GearType)11, "UnAttackable", new DatabaseID(-1, 27272230)); val2.AddComponent<GoToBodyPart>().targetPart = (TargetPart)2; val2.AddComponent<Immortality>(); UnAttackableglobal = val2; Dictionary<DatabaseID, Object> dictionary = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader); dictionary.Add(((CharacterItem)val.GetComponent<SpecialAbility>()).Entity.GUID, (Object)(object)val); dictionary.Add(((CharacterItem)val2.GetComponent<SpecialAbility>()).Entity.GUID, (Object)(object)val); MakeAbShowinUCAsAbb(val, ContentDatabase.Instance().LandfallContentDatabase); MakeAbShowinUCAsAbb(val2, ContentDatabase.Instance().LandfallContentDatabase); } public static void setupsettings() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Expected O, but got Unknown //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Expected O, but got Unknown //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Expected O, but got Unknown GlobalSettingsHandler obj = ServiceLocator.GetService<GlobalSettingsHandler>(); SettingsInstance val = new SettingsInstance(); val.settingsType = (SettingsType)0; val.settingName = "Matches Dont End"; val.m_settingsKey = "Matches Dont End"; val.toolTip = ""; val.m_hideSetting = false; val.options = new string[2] { "Disabled", "Enabled" }; SettingsInstance[] source = (SettingsInstance[])typeof(GlobalSettingsHandler).GetField("m_bugsSettings", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(obj); List<SettingsInstance> list = source.ToList(); list.Add(val); typeof(GlobalSettingsHandler).GetField("m_bugsSettings", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(obj, list.ToArray()); Dictionary<string, SettingsInstance> dictionary = (Dictionary<string, SettingsInstance>)typeof(GlobalSettingsHandler).GetField("m_settingsDict", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(obj); dictionary.Add(val.m_settingsKey, val); typeof(GlobalSettingsHandler).GetField("m_settingsDict", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(obj, dictionary); SoundPlayer val2 = ServiceLocator.GetService<SoundPlayer>(); SoundBank soundBank = val2.soundBank; SoundBankCategory[] categories = soundBank.Categories; SoundBankCategory val3 = new SoundBankCategory(); val3.categoryName = "Intreasting Units"; val3.maxDistanceMultiplier = 1f; val3.minDistanceMultiplier = 1f; val3.volumeMultiplier = 0.4f; val3.pitchMultiplier = 1f; val3.categoryMixerGroup = categories[1].categoryMixerGroup; SoundEffectInstance val4 = new SoundEffectInstance(); SoundBackSettings category = default(SoundBackSettings); category.maxDistanceMultiplier = 1f; category.minDistanceMultiplier = 1f; category.volumeMultiplier = 1f; category.pitchMultiplier = 1f; val4.category = category; val4.cooldown = 0.2f; val4.lengthInMeasures = 0; val4.maxInstanceBehaviour = (MaxInstanceBehaviour)0; val4.maxInstances = 10; val4.minDistance = 1f; val4.pitch = new Vector2(1f, 1f); val4.volume = new Vector2(1f, 1f); val4.priority = 128; val4.soundRef = "Jotaro Kujo"; SoundEffectVariations val5 = new SoundEffectVariations(); val5.materialType = (MaterialType)1; val5.clips = (AudioClip[])(object)new AudioClip[1] { Bundle2.LoadAsset<AudioClip>("Assets/JKS1.mp3") }; val4.clipTypes = (SoundEffectVariations[])(object)new SoundEffectVariations[1] { val5 }; val3.soundEffects = (SoundEffectInstance[])(object)new SoundEffectInstance[1] { val4 }; List<SoundBankCategory> list2 = categories.ToList(); list2.Add(val3); soundBank.Categories = list2.ToArray(); Jotarosounds = new VoiceBundle(); Jotarosounds.DeathRef = ""; Jotarosounds.VocalRef = "Intreasting Units/Jotaro Kujo"; DatabaseEntity val6 = new DatabaseEntity((WorkshopContentType)5); val6.GenerateNewID(); val6.Name = "Jotaro Sound"; Jotarosounds.Entity = val6; SoundEffectInstance val7 = new SoundEffectInstance(); SoundBackSettings category2 = default(SoundBackSettings); category2.maxDistanceMultiplier = 1f; category2.minDistanceMultiplier = 1f; category2.volumeMultiplier = 0.3f; category2.pitchMultiplier = 1f; val7.category = category2; val7.cooldown = 0.2f; val7.lengthInMeasures = 0; val7.maxInstanceBehaviour = (MaxInstanceBehaviour)0; val7.maxInstances = 10; val7.minDistance = 1f; val7.pitch = new Vector2(1f, 1f); val7.volume = new Vector2(1f, 1f); val7.priority = 128; val7.soundRef = "Gary"; SoundEffectVariations val8 = new SoundEffectVariations(); val8.materialType = (MaterialType)1; val8.clips = (AudioClip[])(object)new AudioClip[2] { Garyclip1, Garyclip2 }; val7.clipTypes = (SoundEffectVariations[])(object)new SoundEffectVariations[1] { val8 }; val3.soundEffects = (SoundEffectInstance[])(object)new SoundEffectInstance[2] { val4, val7 }; list2.Add(val3); soundBank.Categories = list2.ToArray(); Garysounds = new VoiceBundle(); Garysounds.DeathRef = ""; Garysounds.VocalRef = "Intreasting Units/Gary"; DatabaseEntity val9 = new DatabaseEntity((WorkshopContentType)5); val9.GenerateNewID(); val9.Name = "Gary Sound"; Garysounds.Entity = val9; SetupAbs(); } public static GameObject CreateNewAb(GearType gt, string name, DatabaseID id) { //IL_005d: 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) GameObject val = Object.Instantiate<GameObject>(Bundle.LoadAsset<GameObject>("Assets/move_RandomAbility.prefab")); Object.Destroy((Object)(object)val.GetComponent<BoxCollider>()); Object.Destroy((Object)(object)val.GetComponent<MeshFilter>()); ((Object)val).hideFlags = (HideFlags)61; ((Object)val).name = name; CharacterItem component = val.GetComponent<CharacterItem>(); typeof(CharacterItem).GetField("m_gearType", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, gt); component.Entity.Name = name; component.Entity.GUID = id; return val; } public static void MakeAbShowinUCAsAbb(GameObject move, LandfallContentDatabase landfallContentDatabase) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)typeof(LandfallContentDatabase).GetField("m_combatMoves", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(landfallContentDatabase); dictionary.Add(move.GetComponent<CharacterItem>().Entity.GUID, move); typeof(LandfallContentDatabase).GetField("m_combatMoves", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(landfallContentDatabase, dictionary); } public static void MakeAbShowinUCAsProp(GameObject prop, LandfallContentDatabase landfallContentDatabase) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)typeof(LandfallContentDatabase).GetField("m_characterProps", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(landfallContentDatabase); dictionary.Add(prop.GetComponent<CharacterItem>().Entity.GUID, prop); typeof(LandfallContentDatabase).GetField("m_characterProps", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(landfallContentDatabase, dictionary); } public static void MakeAbShowinUCAsWeapon(GameObject prop, LandfallContentDatabase landfallContentDatabase) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)typeof(LandfallContentDatabase).GetField("m_weapons", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(landfallContentDatabase); dictionary.Add(prop.GetComponent<CharacterItem>().Entity.GUID, prop); typeof(LandfallContentDatabase).GetField("m_weapons", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(landfallContentDatabase, dictionary); } public static void MakeAbShowinUCAsWCopyWeapon(GameObject prop, string name, int ID, int modid, LandfallContentDatabase landfallContentDatabase) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) Object.Destroy((Object)(object)prop.GetComponent<WeaponItem>()); WeaponItem val = prop.AddComponent<WeaponItem>(); typeof(CharacterItem).GetField("m_entity", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(val, (object?)new DatabaseEntity((WorkshopContentType)5)); typeof(CharacterItem).GetField("m_gearType", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(val, (object)(GearType)10); ((CharacterItem)val).Entity.Name = name; ((CharacterItem)val).Entity.GUID = new DatabaseID(ID, modid); Dictionary<DatabaseID, GameObject> dictionary = (Dictionary<DatabaseID, GameObject>)typeof(LandfallContentDatabase).GetField("m_weapons", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(landfallContentDatabase); dictionary.Add(prop.GetComponent<CharacterItem>().Entity.GUID, prop); typeof(LandfallContentDatabase).GetField("m_weapons", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(landfallContentDatabase, dictionary); } } public class MakeGaryRemovableByCursor : MonoBehaviour { public GameObject Gary; public Unit unit; public PlacementCursor PC; private void Awake() { Gary = ((Component)this).gameObject; PC = GameObject.Find("Cursor").GetComponent<PlacementCursor>(); } private void Update() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) if (Input.GetMouseButtonDown(1) && typeof(PlacementCursor).GetField("m_hoveredGameObject", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(PC) != null && typeof(PlacementCursor).GetField("m_hoveredGameObject", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(PC) == Gary) { World.Active.GetOrCreateManager<TeamSystem>().RemoveEntity(((Component)unit).GetComponent<GameObjectEntity>().Entity, unit.Team, unit); ServiceLocator.GetService<GameModeService>().CurrentGameMode.OnUnitRemoved(unit, unit.Team); } } } [HarmonyPatch(typeof(HealthHandler), "Die", new Type[] { typeof(Unit) })] public class MakeUnitNoDie1 { private static bool Prefix(HealthHandler __instance, Unit damager, ref bool __result) { if (Object.op_Implicit((Object)(object)((Component)((Component)__instance).transform.root).gameObject.GetComponentInChildren<Immortality>())) { __result = true; return false; } __result = true; return true; } } [HarmonyPatch(typeof(WeaponHandler), "Attack")] internal class DontAttackGary { private static bool Prefix(WeaponHandler __instance, Vector3 position, Rigidbody targetRig, Vector3 forceDirection, ForceWeapon forceWeapon) { Jotaro[] array = Object.FindObjectsOfType<Jotaro>(); foreach (Jotaro jotaro in array) { if (jotaro.IstimeStoped) { return false; } } if ((Object)(object)targetRig == (Object)null) { return true; } if (Object.op_Implicit((Object)(object)((Component)((Component)targetRig).transform.root).gameObject.GetComponentInChildren<Unattackable>()) && ((Component)((Component)__instance).transform.root).GetComponentInChildren<Unit>().unitBlueprint.GetUnitCost(true) < 9999999) { return false; } return true; } } [HarmonyPatch(typeof(GameObject), "SetActive", new Type[] { typeof(bool) })] internal class DontSetActiveNo { private static bool Prefix(GameObject __instance) { if (Object.op_Implicit((Object)(object)((Component)__instance.transform.root).GetComponentInChildren<Immortality>())) { return false; } return true; } } [HarmonyPatch(typeof(VerticalCurtainController), "PeekCurtains", new Type[] { })] public static class DontDie { private static bool Prefix(VerticalCurtainController __instance) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Invalid comparison between Unknown and I4 //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown int currentValue = ServiceLocator.GetService<GlobalSettingsHandler>().GetSettingsInstance("Matches Dont End").currentValue; if (currentValue == 1) { GameObject val = new GameObject(); val.AddComponent<StartTimeScaleForTime>(); return false; } object value = typeof(VerticalCurtainController).GetField("m_topText", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(__instance); object value2 = typeof(VerticalCurtainController).GetField("m_topSubText", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(__instance); LocalizeText val2 = (LocalizeText)value; TMP_Text val3 = (TMP_Text)value2; if (val2.LocaleID == "LABEL_RED_VICTORY") { Immortality[] array = Object.FindObjectsOfType<Immortality>(); foreach (Immortality immortality in array) { if ((int)((Component)((Component)immortality).transform.root).GetComponentInChildren<Unit>(true).Team == 1) { if ((Object)(object)Object.FindObjectOfType<StartTimeScaleForTime>() == (Object)null) { GameObject val4 = new GameObject(); val4.AddComponent<StartTimeScaleForTime>(); val2.LocaleID = "LABEL_BLUE_VICTORY"; val3.text = "Kinda Close"; } GameModeService service = ServiceLocator.GetService<GameModeService>(); service.CurrentGameMode.CurtainController.OpenCurtains(); return false; } } } if (val2.LocaleID == "LABEL_BLUE_VICTORY") { Immortality[] array2 = Object.FindObjectsOfType<Immortality>(); foreach (Immortality immortality2 in array2) { if ((int)((Component)((Component)immortality2).transform.root).GetComponentInChildren<Unit>(true).Team == 0) { if ((Object)(object)Object.FindObjectOfType<StartTimeScaleForTime>() == (Object)null) { GameObject val5 = new GameObject(); val5.AddComponent<StartTimeScaleForTime>(); val2.LocaleID = "LABEL_RED_VICTORY"; val3.text = "Kinda Close"; } GameModeService service2 = ServiceLocator.GetService<GameModeService>(); service2.CurrentGameMode.CurtainController.OpenCurtains(); return false; } } } return true; } private static void Postfix(VerticalCurtainController __instance) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Invalid comparison between Unknown and I4 //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) object value = typeof(VerticalCurtainController).GetField("m_topText", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(__instance); LocalizeText val = (LocalizeText)value; if (val.LocaleID == "LABEL_RED_VICTORY") { Immortality[] array = Object.FindObjectsOfType<Immortality>(); foreach (Immortality immortality in array) { if ((int)((Component)((Component)immortality).transform.root).GetComponentInChildren<Unit>(true).Team == 1) { new GameObject().AddComponent<StartTimeScaleForTime>(); GameModeService service = ServiceLocator.GetService<GameModeService>(); service.CurrentGameMode.CurtainController.OpenCurtains(); } } } if (!(val.LocaleID == "LABEL_BLUE_VICTORY")) { return; } Immortality[] array2 = Object.FindObjectsOfType<Immortality>(); foreach (Immortality immortality2 in array2) { if ((int)((Component)((Component)immortality2).transform.root).GetComponentInChildren<Unit>(true).Team == 0) { new GameObject().AddComponent<StartTimeScaleForTime>(); GameModeService service2 = ServiceLocator.GetService<GameModeService>(); service2.CurrentGameMode.CurtainController.OpenCurtains(); } } } } public class MyModItems : MonoBehaviour { public static Dictionary<string, Item> items = new Dictionary<string, Item>(); private static MyModItems instance { get; set; } public static MyModItems GetInstance() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)instance == (Object)null) { instance = new GameObject("MyModItems").AddComponent<MyModItems>(); Object.DontDestroyOnLoad((Object)(object)instance); } return instance; } public void AddItem(Item item) { items.Add(item.name, item); } public Item GetItem(string name, Item.kind k) { Item value = new Item { name = name, Kind = k }; items.TryGetValue(name, out value); return value; } public void SetupAllItems() { int num = 0; foreach (Item value in items.Values) { if (value.Kind == Item.kind.Skill) { } num++; } } } public class OnEquipWorky : MonoBehaviour { public LandfallContentDatabase landfallContentDatabase; private void Awake() { LandfallContentDatabase val = ContentDatabase.Instance().LandfallContentDatabase; if (Object.op_Implicit((Object)(object)((Component)((Component)this).transform.root).GetComponent<Unit>()) && val != null) { GameObject[] array = val.GetCombatMoves().ToArray(); Object.Instantiate<GameObject>(array[Random.Range(0, array.Length)], ((Component)this).transform.root); } } } public class SecretUnlockSpawnerComp : GameStateListener { public override void OnEnterNewScene() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00b6: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "02_Lvl2_Farmer_VC") { GameObject val = Object.Instantiate<GameObject>(Loader.UnlockDeforester); val.transform.position = new Vector3(-11f, 1.8f, 23f); Transform transform = val.transform; transform.localScale *= 0.5f; } activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "03_Lvl2_Ancient_VC") { GameObject val2 = Object.Instantiate<GameObject>(Loader.UnlockChestDude); val2.transform.position = new Vector3(5.05f, 13.95f, 27.95f); Transform transform2 = val2.transform; transform2.localScale /= 4f; } activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "05_Sandbox_Medieval_VC") { GameObject val3 = Object.Instantiate<GameObject>(Loader.UnlockJotaroKujo); val3.transform.position = new Vector3(33.4197f, 62.4325f, 137.4187f); val3.transform.localScale = new Vector3(6f, 6f, 6f); ((Component)this).transform.localRotation = new Quaternion(0.4323f, -0.5602f, -0.5572f, -0.4346f); } activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "00_Lvl2_Halloween_VC") { GameObject val4 = Object.Instantiate<GameObject>(Loader.UnlockGary); ((Renderer)val4.GetComponentInChildren<ParticleSystemRenderer>()).material = GarySetups.Fastmat(Color.white); val4.transform.position = new Vector3(6.1375f, -2.05f, 30.4f); } } public override void OnEnterPlacementState() { } public override void OnEnterBattleState() { } } public class SlowProjectile : MonoBehaviour { private Transform Target; public Unit OwnerUnit; private void Awake() { ((MonoBehaviour)this).StartCoroutine(loop()); } private void OnCollisionEnter(Collision other) { //IL_0059: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((Component)other.transform.root).GetComponent<Unit>())) { return; } Unit component = ((Component)other.transform.root).GetComponent<Unit>(); if ((Object)(object)component != (Object)(object)OwnerUnit) { ((Damagable)component.data.healthHandler).TakeDamage(11f, other.transform.forward, OwnerUnit, (DamageType)0); Rigidbody[] componentsInChildren = ((Component)component).GetComponentsInChildren<Rigidbody>(); foreach (Rigidbody val in componentsInChildren) { val.AddForce(component.data.head.forward * -1000f); } GameObject val2 = Object.Instantiate<GameObject>(Loader.ChestProjectilleExplosion); val2.AddComponent<AudioSource>().clip = Loader.ProjectileExplo; val2.GetComponent<AudioSource>().loop = false; AudioSource component2 = val2.GetComponent<AudioSource>(); component2.volume /= 10f; val2.GetComponent<AudioSource>().Play(); ((Renderer)val2.GetComponentInChildren<ParticleSystemRenderer>()).material = GarySetups.Fastmat(((Renderer)((Component)this).GetComponent<MeshRenderer>()).material.color, isParticle: true); val2.AddComponent<RemoveAfterSeconds>().seconds = 2f; val2.transform.position = ((Component)this).transform.position; Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Update() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Target != (Object)null) { Vector3 position = ((Component)Target).transform.position; float num = 14f; ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, position, num * Time.deltaTime); } } private IEnumerator loop() { try { if ((Object)(object)OwnerUnit != (Object)null && (Object)(object)OwnerUnit.data.targetData.head != (Object)null) { Target = ((Component)OwnerUnit.data.targetData.head).transform; } } catch (NullReferenceException) { } yield return (object)new WaitForSeconds(0.5f); ((MonoBehaviour)this).StartCoroutine(loop()); } } public class SlowProjectileSpawner : GameStateListener { public float intensity = 25f; public override void OnEnterPlacementState() { } public override void OnEnterBattleState() { ((MonoBehaviour)this).StartCoroutine(loop()); } private IEnumerator loop() { if (((Component)this).GetComponent<Unit>().data.Dead) { Object.Destroy((Object)(object)this); } yield return (object)new WaitForSeconds(0.125f); GameObject Cube = GameObject.CreatePrimitive((PrimitiveType)0); Transform transform = Cube.transform; transform.localScale /= 4f; Cube.transform.position = ((Component)((Component)this).GetComponent<Unit>().data.head).transform.position + Vector3.up * 4f; Cube.AddComponent<SlowProjectile>().OwnerUnit = ((Component)this).GetComponent<Unit>(); Cube.AddComponent<DestroySelfWhenUnitDestroyed>().unit = ((Component)this).GetComponent<Unit>(); Cube.AddComponent<Rigidbody>().useGravity = false; int i = Random.Range(0, 3); if (i == 0) { ((Renderer)Cube.GetComponent<MeshRenderer>()).material = GarySetups.Fastmat(Color.green); ((Renderer)Cube.GetComponent<MeshRenderer>()).material.EnableKeyword("__EMISSION"); ((Renderer)Cube.GetComponent<MeshRenderer>()).material.SetColor("_EmissionColor", Color.green * intensity); } if (i == 1) { ((Renderer)Cube.GetComponent<MeshRenderer>()).material = GarySetups.Fastmat(Color.cyan); ((Renderer)Cube.GetComponent<MeshRenderer>()).material.EnableKeyword("__EMISSION"); ((Renderer)Cube.GetComponent<MeshRenderer>()).material.SetColor("_EmissionColor", Color.cyan * intensity); } if (i == 2) { ((Renderer)Cube.GetComponent<MeshRenderer>()).material = GarySetups.Fastmat(Color.magenta); ((Renderer)Cube.GetComponent<MeshRenderer>()).material.EnableKeyword("__EMISSION"); ((Renderer)Cube.GetComponent<MeshRenderer>()).material.SetColor("_EmissionColor", Color.magenta * intensity); } ((MonoBehaviour)this).StartCoroutine(loop()); } } public class StartTimeScaleForTime : MonoBehaviour { private GameModeService service; public void Awake() { service = ServiceLocator.GetService<GameModeService>(); ((MonoBehaviour)this).StartCoroutine(Call()); } private void Update() { Time.timeScale = 1f; service.CurrentGameMode.CurtainController.OpenCurtains(); } private IEnumerator Call() { TaskSequencer TS = (TaskSequencer)typeof(BaseGameMode).GetField("m_enterPlacementStateSequencer", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(service.CurrentGameMode); TS.AddTask(new TaskSequence((TaskDelegate)(() => DestroySelf()))); yield return null; } private IEnumerator DestroySelf() { try { Object.Destroy((Object)(object)((Component)this).gameObject); } catch (Exception) { } yield return (object)new WaitForSeconds(0f); } } public static class UManager { public static GameObject weapon; public static GameObject spray; public static List<UnitBlueprint> ls = new List<UnitBlueprint>(); public static string modname = "com.korkia.IU"; public static string modder = "AlterCreature"; private static string com = "S29ya2lh"; public static void SetRiders(UnitBlueprint me, UnitBlueprint[] riders) { } public static void EditBlueprint(UnitBlueprint unit, LandfallContentDatabase db) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Expected O, but got Unknown //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Expected O, but got Unknown //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Expected O, but got Unknown //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Expected O, but got Unknown //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Expected O, but got Unknown //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Expected O, but got Unknown //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Expected O, but got Unknown //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Expected O, but got Unknown //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Expected O, but got Unknown //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Expected O, but got Unknown //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Expected O, but got Unknown //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Expected O, but got Unknown //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Expected O, but got Unknown //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Expected O, but got Unknown //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Expected O, but got Unknown //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Expected O, but got Unknown //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Expected O, but got Unknown //IL_072e: Unknown result type (might be due to invalid IL or missing references) //IL_0735: Expected O, but got Unknown //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Expected O, but got Unknown //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Expected O, but got Unknown //IL_07f5: Unknown result type (might be due to invalid IL or missing references) //IL_07fb: Expected O, but got Unknown //IL_0802: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Expected O, but got Unknown if (unit.Entity.Name == "Deforester") { SLMATool.UnitCost(unit, 1000); unit.Entity.SetUnlockKey("UNIT_DEFORESTER"); unit.VoicePitch = 0.9889f; unit.voiceBundle = db.GetVoiceBundle(new DatabaseID(-1, 1879740782)); typeof(UnitBlueprint).GetField("vocalPathData", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(unit, (object?)new AudioPathData(unit.voiceBundle.VocalRef.Split(new char[1] { '/' })[0], unit.voiceBundle.VocalRef.Split(new char[1] { '/' })[1], 1f, 1f)); unit.RightWeapon = Loader.Flamethrower; unit.holdinigWithTwoHands = true; unit.m_props = (GameObject[])(object)new GameObject[6] { (GameObject)SLMALoader.SDic["clothes"]["BulletProofVest006"], (GameObject)SLMALoader.SDic["clothes"]["Western_pants001"], (GameObject)SLMALoader.SDic["clothes"]["evil_cleric_shirt001"], (GameObject)SLMALoader.SDic["clothes"]["KevlarHelmet001Goggles"], (GameObject)SLMALoader.SDic["clothes"]["Western_gloves001"], (GameObject)SLMALoader.SDic["clothes"]["VigilanteBoots001"] }; } if (unit.Entity.Name == "Chest Dude") { SLMATool.UnitCost(unit, 4000); unit.turnSpeed = 7f; unit.Entity.SetUnlockKey("UNIT_CHEST_DUDE"); HelpLibrary.SetMoves(unit, (GameObject[])(object)new GameObject[1] { (GameObject)SLMALoader.SDic["moves"]["Hover"] }); unit.movementSpeedMuiltiplier = 0f; unit.m_props = (GameObject[])(object)new GameObject[3] { (GameObject)SLMALoader.SDic["clothes"]["ottomanian_scarf001"], (GameObject)SLMALoader.SDic["clothes"]["Ottomanian_hat001"], (GameObject)SLMALoader.SDic["clothes"]["ottomanian_Shirt001"] }; PropItemData val = new PropItemData(); val.m_colors = new int[1] { 40 }; val.m_isTeamColor = new bool[1]; unit.m_propData = (PropItemData[])(object)new PropItemData[3] { val, new PropItemData(), new PropItemData() }; unit.UnitBase = Loader.CleaNBase; unit.voiceBundle = db.GetVoiceBundle(new DatabaseID(-1, 438889502)); unit.VoicePitch = 1.1739f; typeof(UnitBlueprint).GetField("vocalPathData", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(unit, (object?)new AudioPathData(unit.voiceBundle.VocalRef.Split(new char[1] { '/' })[0], unit.voiceBundle.VocalRef.Split(new char[1] { '/' })[1], 1f, 1f)); } if (unit.Entity.Name == "GARY") { unit.Entity.SetUnlockKey("UNIT_GARY"); SLMATool.UnitCost(unit, (int)((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_LEGACY_LEG_DARKP"]).GetUnitCost(true)); unit.useCustomCost = true; unit.UnitBase = UPool.MyPool.GetObject("Sigma"); unit.health = float.MaxValue; unit.damageMultiplier = float.MaxValue; unit.sizeMultiplier *= 1.1f; unit.minSizeRandom *= 1.1f; unit.holdinigWithTwoHands = true; unit.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["FistReferencePeasant"]; unit.LeftWeapon = (GameObject)SLMALoader.SDic["weapons"]["FistReferencePeasant"]; unit.attackSpeedMultiplier = 10f; unit.balanceMultiplier = 10000f; unit.balanceForceMultiplier = 5f; unit.massMultiplier = 9999999f; HelpLibrary.SetMoves(unit, (GameObject[])(object)new GameObject[3] { (GameObject)SLMALoader.SDic["moves"]["Small_Hover"], Loader.Unkillable, Loader.UnAttackableglobal }); unit.voiceBundle = Loader.Garysounds; typeof(UnitBlueprint).GetField("vocalPathData", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(unit, (object?)new AudioPathData("Intreasting Units", "Gary", 1f, 1f)); GameObject[] props = unit.m_props; foreach (GameObject val2 in props) { Object.Destroy((Object)(object)val2); } } if (unit.Entity.Name == "Jotaro Kujo") { unit.Entity.SetUnlockKey("UNIT_JOTARO_KUJO"); unit.massMultiplier *= 5f; HelpLibrary.SetMoves(unit, (GameObject[])(object)new GameObject[2] { (GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Cool2"], (GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Cool2"] }); unit.voiceBundle = Loader.Jotarosounds; typeof(UnitBlueprint).GetField("vocalPathData", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(unit, (object?)new AudioPathData("Intreasting Units", "Jotaro Kujo", 1f, 1f)); unit.m_props = (GameObject[])(object)new GameObject[7] { (GameObject)SLMALoader.SDic["clothes"]["Shirt001"], (GameObject)SLMALoader.SDic["clothes"]["Medieval_Pants002"], (GameObject)SLMALoader.SDic["clothes"]["Pirate_Belt004"], (GameObject)SLMALoader.SDic["clothes"]["Pirate_Belt004"], (GameObject)SLMALoader.SDic["clothes"]["Crusader_Knight_Boots"], Loader.JKHat, Loader.JKVest }; PropItemData val3 = new PropItemData(); val3.m_colors = new int[1] { 33 }; val3.m_isTeamColor = new bool[1]; PropItemData val4 = new PropItemData(); val4.m_colors = new int[1] { 29 }; val4.m_isTeamColor = new bool[1]; PropItemData val5 = new PropItemData(); val5.m_colors = new int[2] { 26, 70 }; val5.m_isTeamColor = new bool[2]; PropItemData val6 = new PropItemData(); val6.m_colors = new int[2] { 32, 70 }; val6.m_isTeamColor = new bool[2]; PropItemData val7 = new PropItemData(); val7.m_colors = new int[4] { 74, 74, 74, 74 }; val7.m_isTeamColor = new bool[4]; unit.m_propData = (PropItemData[])(object)new PropItemData[7]; unit.m_propData[0] = val3; unit.m_propData[1] = val4; unit.m_propData[3] = val5; unit.m_propData[2] = val6; unit.m_propData[4] = val7; unit.m_propData[5] = new PropItemData(); unit.m_propData[6] = new PropItemData(); unit.health = 2500f; SLMATool.UnitCost(unit, 20000); } } public static void EditClothes(GameObject cloth, CharacterItem item, PropItemData data, Unit unit, int index, LandfallContentDatabase db) { } public static void EditProjectiles(GameObject proj, ProjectileHit projhit, Unit unit, LandfallContentDatabase db) { } public static void EditCombatMoves(GameObject move, int index, Unit unit, LandfallContentDatabase db) { } public static void CodeAfterSpawn(Unit unit, LandfallContentDatabase db) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Expected O, but got Unknown //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Expected O, but got Unknown //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Expected O, but got Unknown //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Expected O, but got Unknown //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Expected O, but got Unknown //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Expected O, but got Unknown //IL_0516: Expected O, but got Unknown if (unit.unitBlueprint.Entity.Name == "Jotaro Kujo") { ((Component)unit).gameObject.AddComponent<HighlightColor>().color = new Color(0.5019608f, 0f, 0.5019608f); PropItem[] componentsInChildren = ((Component)unit.data.hip).GetComponentsInChildren<PropItem>(); foreach (PropItem val in componentsInChildren) { if (((Object)((Component)val).gameObject).name == "CP_Pirate_Belt004(Clone)") { Transform transform = ((Component)val).transform; transform.localPosition -= new Vector3(0f, 0.1f, 0f); break; } } PropItem[] componentsInChildren2 = ((Component)unit.data.head).GetComponentsInChildren<PropItem>(); foreach (PropItem val2 in componentsInChildren2) { if (((Object)((Component)val2).gameObject).name == "CP_Pirate_Belt004(Clone)") { Transform transform2 = ((Component)val2).transform; transform2.localPosition -= new Vector3(0f, 0.1f, 0f); break; } } Jotaro jotaro = ((Component)unit).gameObject.AddComponent<Jotaro>(); jotaro.me = unit; jotaro.awake(); } if (unit.unitBlueprint.Entity.Name == "Chest Dude") { ((Component)unit).gameObject.AddComponent<HighlightColor>().color = new Color(1f, 43f / 51f, 0f); ((Component)unit).gameObject.AddComponent<SlowProjectileSpawner>(); } if (!(((Object)unit.unitBlueprint).name == "GARY")) { return; } GameModeService service = ServiceLocator.GetService<GameModeService>(); GameObject val3 = new GameObject("GARY"); val3.AddComponent<DestroySelfWhenUnitDestroyed>().unit = unit; ((Component)unit).gameObject.transform.parent = val3.transform; GameObject val4 = Object.Instantiate<GameObject>((GameObject)SLMALoader.SDic["moves"]["BlockAlways"], unit.data.torso); Object.Destroy((Object)(object)val4.GetComponent<Counter>()); BlockMove component = val4.GetComponent<BlockMove>(); component.stopProjectile = true; component.destoryProjectile = true; component.blockMoveImpulse = 0f; component.blockPower = 100000000f; ((Component)unit).gameObject.AddComponent<AlwaysSethighlight>().color = Color.black; ((Component)unit).gameObject.GetComponentInChildren<Wings>().flightForce = 40f; ((Component)unit).gameObject.AddComponent<GaryListner>(); Move_DemonRage dR = ((Component)unit).gameObject.AddComponent<Move_DemonRage>(); DataHandler data = unit.data; data.muscleControl *= 3f; GaryListner gl = ((Component)unit).gameObject.AddComponent<GaryListner>(); gl.DR = dR; SkinnedMeshRenderer[] componentsInChildren3 = ((Component)((Component)unit).gameObject.transform.Find("Rigidbodies").Find("Mesh").Find("Armature")).GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val5 in componentsInChildren3) { ((Renderer)val5).material = GarySetups.Fastmat(Color.black); } TaskSequencer val6 = (TaskSequencer)typeof(BaseGameMode).GetField("m_enterBattleStateSequencer", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(service.CurrentGameMode); val6.AddTask(new TaskSequence((TaskDelegate)(() => doit()))); ((Component)unit.Head).gameObject.transform.localScale = Vector3.one * 0f; GameObject val7 = Object.Instantiate<GameObject>((GameObject)SLMALoader.SDic["weapons"]["Throw_FireBall"], unit.data.leftHand); GameObject val8 = Object.Instantiate<GameObject>((GameObject)SLMALoader.SDic["weapons"]["Throw_FireBall"], unit.data.rightHand); GarySetups.MakeNotWeapon(val7); GarySetups.MakeNotWeapon(val8); GarySetups.GaryFlames(val7); GarySetups.GaryFlames(val8); MeleeWeapon[] componentsInChildren4 = ((Component)unit).gameObject.GetComponentsInChildren<MeleeWeapon>(); UnityAction val10 = default(UnityAction); foreach (MeleeWeapon val9 in componentsInChildren4) { DataHandler data2 = unit.data; data2.ragdollControl *= 3f; UnityEvent swingEvent = val9.swingEvent; UnityAction obj = val10; if (obj == null) { UnityAction val11 = delegate { ye(); }; UnityAction val12 = val11; val10 = val11; obj = val12; } swingEvent.AddListener(obj); } IEnumerator doit() { if ((Object)(object)gl.DR != (Object)null) { gl.DR.gl = gl; } if ((Object)(object)gl.DR != (Object)null) { ((MonoBehaviour)gl).StartCoroutine(gl.DR.Startrage()); ((MonoBehaviour)gl).StartCoroutine(gl.ip.StartShoot()); } yield return null; } void ye() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) Unit[] array = Object.FindObjectsOfType<Unit>(); foreach (Unit val13 in array) { if (val13.Team != unit.Team) { try { ((Component)val13).gameObject.GetComponent<CurseofBinding>().iterations += 10; } catch (NullReferenceException) { ((Component)val13).gameObject.AddComponent<CurseofBinding>().iterations += 10; } } } } } public static void Init(LandfallContentDatabase db) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown MyModItems.GetInstance(); com = "——————————Fations and Units——————————"; UnitBlueprint item = SLMATool.CreateUnit("Chest Dude", db.m_unitEditorBlueprint, (Faction)null, Loader.ChestGuyicon); UnitBlueprint item2 = SLMATool.CreateUnit("GARY", db.m_unitEditorBlueprint, (Faction)null, Loader.garyicon); UnitBlueprint item3 = SLMATool.CreateUnit("Deforester", db.m_unitEditorBlueprint, (Faction)null, Loader.flamethrowericon); UnitBlueprint item4 = SLMATool.CreateUnit("Jotaro Kujo", db.m_unitEditorBlueprint, (Faction)null, Loader.JotaroKujoIcon); Faction val = (Faction)SLMALoader.SDic["factions"]["Secret"]; ls = val.Units.ToList(); ls.Add(item); ls.Add(item2); ls.Add(item3); ls.Add(item4); com = "——————————Clothes——————————"; com = "——————————Weapons——————————"; weapon = doit("Assets/TreeSword_1 Weapons_VB.prefab", 485513112, -2, 18000, istree: true, "Small tree", showineditor: true, "SmallTree_Weapons_VB", 1f, 3f); Loader.Flamethrower = doit("Assets/Flame thrower.prefab", 820019871, -2, 0, istree: false, "Flame Thrower", showineditor: true, "Flame thrower", 0f, 0f); com = "——————————Effects——————————"; com = "——————————Explosions——————————"; com = "——————————UnitBases——————————"; UPool.MyPool.AddObject("Sigma", (GameObject)SLMALoader.SDic["bases"]["Humanoid"], true, (HideFlags)61, (Sprite)null, 0, true); com = "——————————Projectiles——————————"; UPool.MyPool.AddObject("Custom Projectile", (GameObject)SLMALoader.SDic["projectiles"]["P_Spear"], true, (HideFlags)61, (Sprite)null, 0, false); com = "——————————Moves——————————"; } public static void EditWeapons(GameObject weapon, Team team, Unit unit, MeleeWeapon melee, RangeWeapon range, LandfallContentDatabase db) { if ((Object)(object)range != (Object)null && ((Object)((Component)range).gameObject).name == "Flame thrower(Clone)") { ((Component)range).gameObject.AddComponent<FlameThrower>(); ((Component)((Component)range).transform.root).GetComponentInChildren<ParticleSystem>().playOnAwake = false; } } public static GameObject doit(string assetname, int iD, int modid, int curveforce, bool istree, string name, bool showineditor, string gameobjectname, float force, float range) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result