Decompiled source of PlayableStreetcleaner v1.2.0
PlayableStreetcleaner.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using Configgy; using GameConsole; using HarmonyLib; using PlayableStreetcleaner.IdentifierCode; using PlayableStreetcleaner.InGameCode; using TMPro; using ULTRAKILL.Cheats; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("ThundergunRevised")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ThundergunRevised")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("5711e2a0-d5a7-4ddf-b8d4-00f355fe9397")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: NeutralResourcesLanguage("en-FI")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace PlayableStreetcleaner { public class ResetPlayer : ICommand { public string Name => "ply-sc-resetplayer"; public string Description => "Reset the player model in case of errors."; public string Command => "ply-sc-resetplayer"; public void Execute(Console con, string[] args) { MainCode.ResetPlayer(); } } public class GiveDivine : ICommand { public string Name => "ply-sc-givedivinity"; public string Description => ""; public string Command => "ply-sc-givedivinity"; public void Execute(Console con, string[] args) { if (!MainCode.tcenabled) { return; } if (MonoSingleton<CheatsController>.instance.cheatsEnabled) { if (MainCode.currentpowerup == PowerUpType.None || MainCode.currentpowerup != PowerUpType.Divine) { MainCode.currentpowerup = PowerUpType.Divine; MainCode.PowerUpTime = 10f; MainCode.IsPoweredUp = true; } } else { MainCode.Log("Cheats aren't enabled!", 2); } } } public class GiveSentry : ICommand { public string Name => "ply-sc-giveturret"; public string Description => ""; public string Command => "ply-sc-giveturret"; public void Execute(Console con, string[] args) { if (!MainCode.tcenabled) { return; } if (MonoSingleton<CheatsController>.instance.cheatsEnabled) { if (MainCode.currentpowerup == PowerUpType.None) { MainCode.currentpowerup = PowerUpType.Sentry; MainCode.PowerUpTime += 1f; MainCode.IsPoweredUp = true; } } else { MainCode.Log("Cheats aren't enabled!", 2); } } } public class DebugLog : ICommand { public string Name => "ply-sc-debug"; public string Description => ""; public string Command => "ply-sc-debug"; public void Execute(Console con, string[] args) { MainCode.Log("Debugging " + !MainCode.Debugging); MainCode.Debugging = !MainCode.Debugging; } } internal class PlySCBeam : MonoBehaviour { private GameObject hitParticle; public bool active = true; public Vector3 hitPosition; public Quaternion hitRotation; private void Start() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown hitParticle = new GameObject(); } private void FixedUpdate() { } private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) hitPosition = ((Component)this).transform.position + ((Component)this).transform.forward * 100f; Vector3 forward = ((Component)this).transform.forward * -1f; LayerMask val = LayerMaskDefaults.Get((LMD)3); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(((Component)this).transform.position, ((Component)this).transform.forward, ref val2, 100f, LayerMask.op_Implicit(val), (QueryTriggerInteraction)1)) { hitPosition = ((RaycastHit)(ref val2)).point; forward = ((RaycastHit)(ref val2)).normal; } hitParticle.transform.position = hitPosition; hitParticle.transform.forward = forward; hitRotation = hitParticle.transform.rotation; } } [BepInPlugin("plonk.plysc", "Playable Streetcleaner", "1.1.9")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class MainCode : BaseUnityPlugin { public enum ThirdPersonType { Toggle = 1, Hold } public enum CustomHat { None, Plushy, Proot } [HarmonyPatch] public class PatchesToMakeTheModPlayable { [HarmonyPostfix] [HarmonyPatch(typeof(OptionsMenuToManager), "Start")] public static void ChangeMenuTitle(OptionsMenuToManager __instance) { Transform val = ((Component)__instance).transform.Find("Main Menu (1)"); if (!((Object)(object)val == (Object)null) && tcenabled) { GameObject gameObject = ((Component)val.GetChild(0)).gameObject; GameObject val2 = Object.Instantiate<GameObject>(gameObject, gameObject.transform.parent); val2.GetComponent<Image>().sprite = MainCode.FetchFromBundle<Sprite>("mainmenu.png", autofill: true); gameObject.SetActive(false); } } [HarmonyPrefix] [HarmonyPatch(typeof(EnemyIdentifier), "Start")] public static void SCDontAttackPatch(EnemyIdentifier __instance) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)__instance.enemyType == 6 && tcenabled && (Object)(object)((Component)__instance).GetComponent<PlayerSCID>() == (Object)null) { __instance.prioritizeEnemiesUnlessAttacked = true; __instance.attackEnemies = true; } } [HarmonyPrefix] [HarmonyPatch(typeof(BulletCheck), "OnTriggerEnter")] public static bool StopDeflect(BulletCheck __instance) { if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponentInParent<PlayerSCID>())) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Streetcleaner), "Update")] public static bool WalkFix(Streetcleaner __instance) { if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<PlayerSCID>())) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(ContinuousBeam), "Update")] public static bool LimitBeamRange(ContinuousBeam __instance) { //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) //IL_0021: 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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_00c5: 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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02af: 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_0565: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Invalid comparison between Unknown and I4 if ((Object)(object)((Component)__instance).GetComponent<PlayableStreetcleanerPatchID>() != (Object)null) { Vector3 zero = Vector3.zero; RaycastHit val = default(RaycastHit); zero = ((!Physics.Raycast(((Component)__instance).transform.position, ((Component)__instance).transform.forward, ref val, float.PositiveInfinity, LayerMask.op_Implicit(__instance.environmentMask))) ? (((Component)__instance).transform.position + ((Component)__instance).transform.forward * 999f) : ((RaycastHit)(ref val)).point); __instance.lr.SetPosition(0, ((Component)__instance).transform.position); __instance.lr.SetPosition(1, zero); if (Object.op_Implicit((Object)(object)__instance.impactEffect)) { __instance.impactEffect.transform.position = zero; } RaycastHit[] array = Physics.SphereCastAll(((Component)__instance).transform.position + ((Component)__instance).transform.forward * __instance.beamWidth, __instance.beamWidth, ((Component)__instance).transform.forward, Mathf.Clamp(Vector3.Distance(((Component)__instance).transform.position, zero), __instance.beamWidth, 15f) - __instance.beamWidth, LayerMask.op_Implicit(__instance.hitMask)); if (array != null && array.Length != 0) { Bleeder val3 = default(Bleeder); for (int i = 0; i < array.Length; i++) { if (__instance.canHitPlayer && __instance.playerCooldown <= 0f && ((Component)((RaycastHit)(ref array[i])).collider).gameObject.CompareTag("Player")) { __instance.playerCooldown = 0.5f; if (!Physics.Raycast(((Component)__instance).transform.position, ((RaycastHit)(ref array[i])).point - ((Component)__instance).transform.position, ((RaycastHit)(ref array[i])).distance, LayerMask.op_Implicit(__instance.environmentMask))) { MonoSingleton<NewMovement>.Instance.GetHurt(Mathf.RoundToInt(__instance.damage), true, 1f, false, false, 1f, true); } } else if ((((Component)((RaycastHit)(ref array[i])).transform).gameObject.layer == 10 || ((Component)((RaycastHit)(ref array[i])).transform).gameObject.layer == 11) && __instance.canHitEnemy) { EnemyIdentifierIdentifier component = ((Component)((RaycastHit)(ref array[i])).transform).GetComponent<EnemyIdentifierIdentifier>(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.eid) || (__instance.enemy && (component.eid.enemyType == __instance.safeEnemyType || EnemyIdentifier.CheckHurtException(__instance.safeEnemyType, component.eid.enemyType, __instance.target)))) { continue; } EnemyIdentifier eid = component.eid; bool flag = false; if (__instance.hitEnemies.Contains(eid)) { flag = true; } if (flag && !(__instance.enemyCooldowns[__instance.hitEnemies.IndexOf(eid)] <= 0f)) { continue; } if (!flag) { __instance.hitEnemies.Add(eid); __instance.enemyCooldowns.Add(0.5f); } else { __instance.enemyCooldowns[__instance.hitEnemies.IndexOf(eid)] = 0.5f; } eid.hitter = "FlameThrower"; eid.DeliverDamage(((Component)((RaycastHit)(ref array[i])).transform).gameObject, Vector3.zero, ((RaycastHit)(ref array[i])).point, __instance.damage / 10f, true, 0f, (GameObject)null, false, false); if (!eid.dead) { if (eid.health <= __instance.damage / 10f) { MonoSingleton<StyleHUD>.instance.AddPoints(100, "ultrakill.fried", (GameObject)null, eid, 1, "<color=orange>", " TO DEATH</color>"); } else { MonoSingleton<StyleHUD>.instance.AddPoints(5, "ultrakill.fried", (GameObject)null, eid, 1, "", ""); } if ((int)eid.enemyType == 6) { MonoSingleton<StyleHUD>.instance.AddPoints(0, "ultrakill.disrespect", (GameObject)null, eid, 1, "<color=red>", "</color>"); eid.attackEnemies = false; eid.ignorePlayer = false; } } Flammable component2 = ((Component)eid).GetComponent<Flammable>(); if ((Object)(object)component2 != (Object)null && !component2.playerOnly) { component2.Burn(10f, false); } } else if (((Component)((RaycastHit)(ref array[i])).transform).gameObject.layer == 8 || ((Component)((RaycastHit)(ref array[i])).transform).gameObject.layer == 24) { Flammable val2 = null; if (((Component)((RaycastHit)(ref array[i])).transform).gameObject.TryGetComponent<Flammable>(ref val2)) { val2.Burn(1f, false); } if (((Component)((RaycastHit)(ref array[i])).transform).gameObject.TryGetComponent<Bleeder>(ref val3)) { val3.GetHit(((RaycastHit)(ref array[i])).point, (GoreType)3, false); } } } } if (__instance.playerCooldown > 0f) { __instance.playerCooldown = Mathf.MoveTowards(__instance.playerCooldown, 0f, Time.deltaTime); } if (__instance.enemyCooldowns.Count > 0) { for (int j = 0; j < __instance.enemyCooldowns.Count; j++) { __instance.enemyCooldowns[j] = Mathf.MoveTowards(__instance.enemyCooldowns[j], 0f, Time.deltaTime); } } return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Explosion), "Collide")] public static bool ExplosionResistance(Explosion __instance, Collider other) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0b64: Unknown result type (might be due to invalid IL or missing references) //IL_0b6a: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Invalid comparison between Unknown and I4 //IL_00d7: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0be8: Unknown result type (might be due to invalid IL or missing references) //IL_0bed: Unknown result type (might be due to invalid IL or missing references) //IL_0bef: Unknown result type (might be due to invalid IL or missing references) //IL_0c00: Unknown result type (might be due to invalid IL or missing references) //IL_0c05: Unknown result type (might be due to invalid IL or missing references) //IL_0c0a: Unknown result type (might be due to invalid IL or missing references) //IL_0c1c: Unknown result type (might be due to invalid IL or missing references) //IL_0c28: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Invalid comparison between Unknown and I4 //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Invalid comparison between Unknown and I4 //IL_0c71: Unknown result type (might be due to invalid IL or missing references) //IL_0c77: Invalid comparison between Unknown and I4 //IL_0c5d: Unknown result type (might be due to invalid IL or missing references) //IL_0c64: Unknown result type (might be due to invalid IL or missing references) //IL_0c69: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_099b: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Unknown result type (might be due to invalid IL or missing references) //IL_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_09a4: Unknown result type (might be due to invalid IL or missing references) //IL_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_09b1: Unknown result type (might be due to invalid IL or missing references) //IL_09b6: Unknown result type (might be due to invalid IL or missing references) //IL_09ba: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Unknown result type (might be due to invalid IL or missing references) //IL_09c9: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: Unknown result type (might be due to invalid IL or missing references) //IL_09db: Unknown result type (might be due to invalid IL or missing references) //IL_09e6: Unknown result type (might be due to invalid IL or missing references) //IL_09eb: Unknown result type (might be due to invalid IL or missing references) //IL_09f3: Unknown result type (might be due to invalid IL or missing references) //IL_0d07: Unknown result type (might be due to invalid IL or missing references) //IL_0d12: Unknown result type (might be due to invalid IL or missing references) //IL_0d13: Unknown result type (might be due to invalid IL or missing references) //IL_0d14: Unknown result type (might be due to invalid IL or missing references) //IL_0ca9: Unknown result type (might be due to invalid IL or missing references) //IL_0c98: Unknown result type (might be due to invalid IL or missing references) //IL_0c9f: Unknown result type (might be due to invalid IL or missing references) //IL_0ca4: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Invalid comparison between Unknown and I4 //IL_0ad4: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Invalid comparison between Unknown and I4 //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0a69: Unknown result type (might be due to invalid IL or missing references) //IL_08a8: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Invalid comparison between Unknown and I4 //IL_0a72: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Invalid comparison between Unknown and I4 //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Invalid comparison between Unknown and I4 //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Invalid comparison between Unknown and I4 //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0660: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Invalid comparison between Unknown and I4 //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Invalid comparison between Unknown and I4 //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0758: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0813: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Unknown result type (might be due to invalid IL or missing references) if (tcenabled) { Vector3 position = ((Component)other).transform.position; Vector3 val = position - ((Component)__instance).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; float num = Vector3.Distance(position, ((Component)__instance).transform.position); Vector3 val2 = ((Component)__instance).transform.position - normalized * 0.01f; float num2 = Vector3.Distance(val2, position); int instanceID = ((Object)other).GetInstanceID(); if (!__instance.hitColliders.Contains(instanceID)) { Breakable val8 = default(Breakable); Bleeder val10 = default(Bleeder); Glass val12 = default(Glass); Flammable val13 = default(Flammable); if (!__instance.hasHitPlayer && ((Component)other).gameObject.CompareTag("Player")) { RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, normalized, ref val3, num2, 2048, (QueryTriggerInteraction)1)) { } if (!__instance.enemy || Physics.Raycast(position, -normalized, num - 0.1f, LayerMask.op_Implicit(__instance.lmask), (QueryTriggerInteraction)1)) { } __instance.hasHitPlayer = true; __instance.hitColliders.Add(instanceID); if ((int)__instance.canHit != 2) { if ((int)MonoSingleton<PlayerTracker>.Instance.playerType == 1 && __instance.damage > 0) { MonoSingleton<PlatformerMovement>.Instance.Burn(false); } if (!MonoSingleton<NewMovement>.Instance.exploded && (MonoSingleton<NewMovement>.Instance.safeExplosionLaunchCooldown <= 0f || __instance.damage > 0)) { int num3 = 200; if (__instance.rocketExplosion && __instance.damage == 0) { num3 = Mathf.RoundToInt(100f / ((float)(MonoSingleton<NewMovement>.Instance.rocketJumps + 3) / 3f)); NewMovement instance = MonoSingleton<NewMovement>.Instance; instance.rocketJumps++; } if (Mathf.Abs(((Component)__instance).transform.position.x - position.x) < 0.25f && Mathf.Abs(((Component)__instance).transform.position.z - position.z) < 0.25f) { MonoSingleton<NewMovement>.Instance.LaunchFromPoint(position, (float)num3, __instance.maxSize); if (__instance.ultrabooster && num < 12f) { MonoSingleton<NewMovement>.Instance.LaunchFromPoint(position, (float)num3, __instance.maxSize); } } else { MonoSingleton<NewMovement>.Instance.LaunchFromPoint(((Component)__instance).transform.position, (float)num3, __instance.maxSize); if (__instance.ultrabooster && num < 12f) { MonoSingleton<NewMovement>.Instance.LaunchFromPoint(((Component)__instance).transform.position, (float)num3, __instance.maxSize); } } if (__instance.damage <= 0) { MonoSingleton<NewMovement>.Instance.safeExplosionLaunchCooldown = 0.5f; } } if (__instance.damage > 0) { int num4 = __instance.damage; if (__instance.ultrabooster) { num4 = ((num < 3f) ? 35 : 50); } num4 = ((__instance.playerDamageOverride >= 0) ? __instance.playerDamageOverride : num4); num4 /= 2; MonoSingleton<NewMovement>.Instance.GetHurt(num4, true, (float)(__instance.enemy ? 1 : 0), true, false, 1f, false); } } } else if ((((Component)other).gameObject.layer == 10 || ((Component)other).gameObject.layer == 11) && (int)__instance.canHit != 1) { EnemyIdentifierIdentifier componentInParent = ((Component)other).GetComponentInParent<EnemyIdentifierIdentifier>(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent.eid != (Object)null) { Collider val4 = default(Collider); if (!componentInParent.eid.dead && ((Component)componentInParent.eid).TryGetComponent<Collider>(ref val4)) { int instanceID2 = ((Object)val4).GetInstanceID(); if (__instance.hitColliders.Add(instanceID2)) { if ((int)componentInParent.eid.enemyType == 21) { Vector3 position2 = ((Component)__instance).transform.position; Bounds bounds = val4.bounds; if (!Physics.Linecast(position2, ((Bounds)(ref bounds)).center, LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)1)))) { componentInParent.eid.hitter = __instance.hitterWeapon; componentInParent.eid.DeliverDamage(((Component)other).gameObject, Vector3.zero, position, 1f, false, 0f, __instance.sourceWeapon, false, false); } } else if ((int)componentInParent.eid.enemyType == 4) { Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.ineffectiveSound, position, Quaternion.identity); } else if ((!__instance.enemy || ((int)componentInParent.eid.enemyType != 2 && (int)componentInParent.eid.enemyType != 19)) && !__instance.toIgnore.Contains(componentInParent.eid.enemyType)) { if ((int)componentInParent.eid.enemyType == 33 && __instance.hitterWeapon == "heavypunch") { componentInParent.eid.hitter = "heavypunch"; } else { componentInParent.eid.hitter = (__instance.friendlyFire ? "ffexplosion" : (__instance.enemy ? "enemy" : "explosion")); } if (!componentInParent.eid.hitterWeapons.Contains(__instance.hitterWeapon)) { componentInParent.eid.hitterWeapons.Add(__instance.hitterWeapon); } Vector3 val5 = normalized; if ((int)componentInParent.eid.enemyType == 1 && __instance.damage == 0) { val5 = Vector3.zero; } else if (val5.y <= 0.5f) { ((Vector3)(ref val5))..ctor(val5.x, val5.y + 0.5f, val5.z); } else if (val5.y < 1f) { ((Vector3)(ref val5))..ctor(val5.x, 1f, val5.z); } float num5 = (float)__instance.damage / 10f * __instance.enemyDamageMultiplier; if (__instance.rocketExplosion && (int)componentInParent.eid.enemyType == 0) { num5 *= 1.5f; } Zombie val6 = default(Zombie); if ((int)componentInParent.eid.enemyType != 15 || __instance.unblockable || BlindEnemies.Blind || !((Component)componentInParent.eid).TryGetComponent<Zombie>(ref val6) || !val6.grounded || !Object.op_Implicit((Object)(object)val6.zp) || val6.zp.difficulty < 2) { if (__instance.electric) { componentInParent.eid.hitterAttributes.Add((HitterAttribute)2); } componentInParent.eid.DeliverDamage(((Component)componentInParent).gameObject, val5 * 50000f, position, num5, false, 0f, __instance.sourceWeapon, false, false); if (__instance.ignite) { Flammable componentInChildren = ((Component)componentInParent.eid).GetComponentInChildren<Flammable>(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.Burn((float)(__instance.damage / 10), false); } } } else { componentInParent.eid.hitter = "blocked"; if (val6.zp.difficulty <= 3 || __instance.electric) { if (__instance.electric) { componentInParent.eid.hitterAttributes.Add((HitterAttribute)2); } componentInParent.eid.DeliverDamage(((Component)other).gameObject, Vector3.zero, position, num5 * 0.25f, false, 0f, __instance.sourceWeapon, false, false); } val6.zp.Block(((Component)__instance).transform.position); } } } } else if (componentInParent.eid.dead) { __instance.hitColliders.Add(instanceID); componentInParent.eid.hitter = (__instance.enemy ? "enemy" : "explosion"); componentInParent.eid.DeliverDamage(((Component)other).gameObject, normalized * 5000f, position, (float)__instance.damage / 10f * __instance.enemyDamageMultiplier, false, 0f, __instance.sourceWeapon, false, false); Flammable val7 = default(Flammable); if (__instance.ignite && ((Component)componentInParent).TryGetComponent<Flammable>(ref val7)) { Flammable componentInChildren2 = ((Component)componentInParent.eid).GetComponentInChildren<Flammable>(); if ((Object)(object)componentInChildren2 != (Object)null) { componentInChildren2.Burn((float)(__instance.damage / 10), false); } } } } } else if (((Component)other).TryGetComponent<Breakable>(ref val8) && !val8.unbreakable && !val8.precisionOnly && (!val8.playerOnly || !__instance.enemy)) { if (!val8.accurateExplosionsOnly) { val8.Break(); } else { Vector3 val9 = other.ClosestPoint(((Component)__instance).transform.position); val = val9 - ((Component)__instance).transform.position; if (!Physics.Raycast(val9 + ((Vector3)(ref val)).normalized * 0.001f, ((Component)__instance).transform.position - val9, Vector3.Distance(((Component)__instance).transform.position, val9), LayerMask.op_Implicit(__instance.lmask), (QueryTriggerInteraction)1)) { val8.Break(); } } } else if (((Component)other).TryGetComponent<Bleeder>(ref val10)) { bool flag = false; if (__instance.toIgnore.Count > 0 && val10.ignoreTypes.Length != 0) { EnemyType[] ignoreTypes = val10.ignoreTypes; foreach (EnemyType val11 in ignoreTypes) { for (int j = 0; j < __instance.toIgnore.Count; j++) { if (val11 == __instance.toIgnore[j]) { flag = true; break; } } if (flag) { break; } } } if (!flag) { val10.GetHit(position, (GoreType)0, false); } } else if (((Component)other).TryGetComponent<Glass>(ref val12)) { val12.Shatter(); } else if (__instance.ignite && ((Component)other).TryGetComponent<Flammable>(ref val13) && (!__instance.enemy || !val13.playerOnly) && (__instance.enemy || !val13.enemyOnly)) { val13.Burn(4f, false); } } if (!((Component)other).gameObject.CompareTag("Player") || (int)MonoSingleton<PlayerTracker>.Instance.playerType == 1) { Rigidbody component = ((Component)other).GetComponent<Rigidbody>(); bool flag2 = ((Component)other).gameObject.layer == 14; if (Object.op_Implicit((Object)(object)component) && (!flag2 || component.useGravity) && !((Component)other).gameObject.CompareTag("IgnorePushes")) { __instance.hitColliders.Add(instanceID); Vector3 val14 = normalized * Mathf.Max(5f - num, 0f); val14 = Vector3.Scale(val14, new Vector3(7500f, 1f, 7500f)); if (component.useGravity) { ((Vector3)(ref val14))..ctor(val14.x, 18750f, val14.z); } if (((Component)other).gameObject.layer == 27 || ((Component)other).gameObject.layer == 9) { val14 = Vector3.ClampMagnitude(val14, 5000f); } if ((int)MonoSingleton<PlayerTracker>.Instance.playerType == 1 && (Object)(object)((Component)other).gameObject == (Object)(object)((Component)MonoSingleton<PlatformerMovement>.Instance).gameObject) { val14 *= 30f; } component.AddForce(val14); } if (flag2) { ThrownSword component2 = ((Component)other).GetComponent<ThrownSword>(); Projectile component3 = ((Component)other).GetComponent<Projectile>(); if ((Object)(object)component2 != (Object)null) { component2.deflected = true; } if ((Object)(object)component3 != (Object)null && !component3.ignoreExplosions) { component3.homingType = (HomingType)0; ((Component)other).transform.LookAt(position + normalized); component3.friendly = true; component3.target = null; component3.turnSpeed = 0f; component3.speed = Mathf.Max(component3.speed, 65f); } } } return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(CopyPositionAndRotation), "LateUpdate")] public static void RemoveGrapplePointIfNoSword(CopyPositionAndRotation __instance) { if ((Object)(object)((Component)__instance).GetComponent<PlayableStreetcleanerPatchID>() != (Object)null && (Object)(object)__instance.target == (Object)null) { Object.Destroy((Object)(object)((Component)__instance).gameObject); } } [HarmonyPrefix] [HarmonyPatch(typeof(EnemyIdentifier), "Death", new Type[] { typeof(bool) })] public static void SpawnPowerup(EnemyIdentifier __instance) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Invalid comparison between Unknown and I4 //IL_004a: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) if (__instance.dead || !tcenabled) { return; } if ((int)__instance.enemyType == 20) { int num = Random.Range(0, 6); if (num == 1) { GameObject val = Object.Instantiate<GameObject>(MainCode.FetchFromBundle<GameObject>("powerups/sentrygunpickup.prefab", autofill: true), ((Component)__instance).transform.position, Quaternion.identity); PowerUp powerUp = val.AddComponent<PowerUp>(); powerUp.type = PowerUpType.Sentry; powerUp.position = __instance.weakPoint.transform; powerUp.toDestroy = FindChild(((Component)__instance).transform, "TurretBot/Armature/Root/Pelvis/Spine_01/Spine_02/Torso/Neck").transform; powerUp.DestroyCompletely = false; } } if ((int)__instance.enemyType == 9) { int num2 = Random.Range(0, 21); if (num2 == 1) { GameObject val2 = Object.Instantiate<GameObject>(MainCode.FetchFromBundle<GameObject>("powerups/fadinglight.prefab", autofill: true), ((Component)__instance).transform.position, Quaternion.identity); PowerUp powerUp2 = val2.AddComponent<PowerUp>(); powerUp2.type = PowerUpType.Divine; powerUp2.DestroyCompletely = false; } } } [HarmonyPrefix] [HarmonyPatch(typeof(BeamgunBeam), "FixedUpdate")] public static bool BeamFixedUpdatePatch(BeamgunBeam __instance) { if ((Object)(object)((Component)__instance).transform.parent != (Object)(object)((Component)MonoSingleton<CameraController>.instance).transform) { return true; } return false; } [HarmonyPrefix] [HarmonyPatch(typeof(BeamgunBeam), "Update")] public static bool BeamUpdatePatch(BeamgunBeam __instance) { //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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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) if (!Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<PlayableStreetcleanerPatchID>())) { return true; } if (__instance.fakeStartPoint != Vector3.zero) { __instance.line.SetPosition(0, __instance.fakeStartPoint); } else { __instance.line.SetPosition(0, ((Component)__instance.line).transform.position); } Vector3 forward = ((Component)__instance).transform.forward * -1f; LayerMask val = LayerMaskDefaults.Get((LMD)3); if (__instance.canHitPlayer && __instance.playerDamageCooldown <= 0f) { val = LayerMaskDefaults.Get((LMD)6); } RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(((Component)__instance).transform.position, ((Component)__instance).transform.forward, ref val2, float.PositiveInfinity, LayerMask.op_Implicit(val), (QueryTriggerInteraction)1)) { __instance.hitPosition = ((RaycastHit)(ref val2)).point; forward = ((RaycastHit)(ref val2)).normal; } else { __instance.hitPosition = ((Component)__instance).transform.position + ((Component)__instance).transform.forward * 100f; } __instance.line.SetPosition(1, __instance.hitPosition); ((Component)__instance.hitParticle).transform.position = __instance.hitPosition; ((Component)__instance.hitParticle).transform.forward = forward; return false; } [HarmonyPostfix] [HarmonyPatch(typeof(SaveSlotMenu), "OnEnable")] private static void GabeSlotMaker(SaveSlotMenu __instance) { //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) bool flag = false; for (int i = 0; i < __instance.slots.Length; i++) { if (__instance.slots[i].slotNumberLabel.text == "Slot PLY-SC") { flag = true; } } if (!flag) { SlotRowPanel newRow = Object.Instantiate<SlotRowPanel>(__instance.templateRow, ((Component)__instance.templateRow).transform.parent); newRow.slotIndex = 888139043; ((Component)newRow).gameObject.SetActive(true); __instance.UpdateSlotState(newRow, GetSlot(888139043)); ((UnityEvent)newRow.selectButton.onClick).AddListener((UnityAction)delegate { __instance.SelectSlot(newRow.slotIndex); }); ((UnityEvent)newRow.deleteButton.onClick).AddListener((UnityAction)delegate { __instance.ClearSlot(newRow.slotIndex); }); ((Graphic)newRow.slotNumberLabel).color = Color.yellow; newRow.slotNumberLabel.text = "Slot PLY-SC"; List<SlotRowPanel> list = new List<SlotRowPanel>(); list.AddRange(__instance.slots); list.Add(newRow); __instance.slots = list.ToArray(); } } [HarmonyPrefix] [HarmonyPatch(typeof(Bonus), "OnTriggerEnter")] public static bool FixOverheal(Bonus __instance, Collider other) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Invalid comparison between Unknown and I4 //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Invalid comparison between Unknown and I4 if (tcenabled) { if (((Component)other).gameObject.CompareTag("Player") && !__instance.activated) { if (!__instance.ghost) { __instance.activated = true; MonoSingleton<TimeController>.Instance.ParryFlash(); StyleHUD instance = MonoSingleton<StyleHUD>.Instance; StatsManager instance2 = MonoSingleton<StatsManager>.Instance; Object.Instantiate<GameObject>(__instance.breakEffect, ((Component)__instance).transform.position, Quaternion.identity); instance.AddPoints(0, "ultrakill.secret", (GameObject)null, (EnemyIdentifier)null, -1, "", ""); instance2.secrets++; instance2.SecretFound(__instance.secretNumber); Object.Destroy((Object)(object)((Component)__instance).gameObject); } else { if (__instance.tutorial) { MonoSingleton<TimeController>.Instance.ParryFlash(); } Object.Instantiate<GameObject>(__instance.breakEffect, ((Component)__instance).transform.position, Quaternion.identity); Object.Destroy((Object)(object)((Component)__instance).gameObject); } if (__instance.superCharge) { if ((int)MonoSingleton<PlayerTracker>.Instance.playerType == 0) { overhealed = true; MonoSingleton<NewMovement>.Instance.hp = 140; } else { MonoSingleton<PlatformerMovement>.Instance.AddExtraHit(2); } if (!MonoSingleton<PrefsManager>.Instance.GetBool("hideSuperChargePopup", false)) { MonoSingleton<PrefsManager>.Instance.SetBool("hideSuperChargePopup", true); MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("<color=red>RED SOUL ORBS</color> give <color=green>200 HEALTH</color>. \nOverheal cannot be regained with blood.", "", "", 1, false); } } else if ((int)MonoSingleton<PlayerTracker>.Instance.playerType == 1) { MonoSingleton<PlatformerMovement>.Instance.AddExtraHit(1); } } return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(IntroText), "Start")] public static void FixIntroText(IntroText __instance) { if (SceneHelper.CurrentScene == "Tutorial" && ((Object)((Component)__instance).transform).name == "Page 2" && tcenabled) { __instance.fullString = ((TMP_Text)MainCode.FetchFromBundle<GameObject>("page 2 alternate.prefab", autofill: true).GetComponent<TextMeshProUGUI>()).text; } } [HarmonyPrefix] [HarmonyPatch(typeof(Projectile), "Collided")] public static bool SwordBreaksGutterShield(Projectile __instance, Collider other) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Invalid comparison between Unknown and I4 //IL_00c3: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Invalid comparison between Unknown and I4 //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c7: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_08e8: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Unknown result type (might be due to invalid IL or missing references) //IL_0899: Invalid comparison between I4 and Unknown //IL_0930: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Invalid comparison between Unknown and I4 //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Invalid comparison between Unknown and I4 //IL_0631: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0644: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Unknown result type (might be due to invalid IL or missing references) //IL_06ff: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_070d: Unknown result type (might be due to invalid IL or missing references) //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<PlayableStreetcleanerPatchID>())) { if (!__instance.active) { return false; } if (!__instance.friendly && !__instance.hittingPlayer && ((Component)other).gameObject.CompareTag("Player")) { if (!__instance.target.isPlayer || (int)MonoSingleton<PlayerTracker>.Instance.playerType != 1) { if (__instance.spreaded) { ProjectileSpread componentInParent = ((Component)__instance).GetComponentInParent<ProjectileSpread>(); if ((Object)(object)componentInParent != (Object)null && componentInParent.parried) { return false; } } __instance.hittingPlayer = true; __instance.rb.velocity = Vector3.zero; if (__instance.keepTrail) { __instance.KeepTrail(); } ((Component)__instance).transform.position = new Vector3(((Component)other).transform.position.x, ((Component)__instance).transform.position.y, ((Component)other).transform.position.z); __instance.nmov = ((Component)other).gameObject.GetComponentInParent<NewMovement>(); ((MonoBehaviour)__instance).Invoke("RecheckPlayerHit", 0.05f); } MonoSingleton<PlatformerMovement>.Instance.Explode(false); if (__instance.explosive) { __instance.Explode(); return false; } if (__instance.keepTrail) { __instance.KeepTrail(); } __instance.CreateExplosionEffect(); Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (!__instance.canHitCoin || !((Component)other).gameObject.CompareTag("Coin")) { EnemyIdentifierIdentifier val = default(EnemyIdentifierIdentifier); EnemyIdentifierIdentifier val2 = default(EnemyIdentifierIdentifier); Vector3 val4; if ((((Component)other).gameObject.CompareTag("Armor") && (__instance.friendly || !((Component)other).TryGetComponent<EnemyIdentifierIdentifier>(ref val) || !Object.op_Implicit((Object)(object)val.eid) || val.eid.enemyType != __instance.safeEnemyType)) || (__instance.boosted && ((Component)other).gameObject.layer == 11 && ((Component)other).gameObject.CompareTag("Body") && ((Component)other).TryGetComponent<EnemyIdentifierIdentifier>(ref val2) && Object.op_Implicit((Object)(object)val2.eid) && (int)val2.eid.enemyType == 4)) { RaycastHit val3 = default(RaycastHit); if (!__instance.alreadyDeflectedBy.Contains(other) && Physics.Raycast(((Component)__instance).transform.position - ((Component)__instance).transform.forward, ((Component)__instance).transform.forward, ref val3, float.PositiveInfinity, LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)3)))) { Transform transform = ((Component)__instance).transform; val4 = Vector3.Reflect(((Component)__instance).transform.forward, ((RaycastHit)(ref val3)).normal); transform.forward = ((Vector3)(ref val4)).normalized; ((Component)__instance).transform.position = ((RaycastHit)(ref val3)).point + ((Component)__instance).transform.forward; Object.Instantiate<GameObject>(MonoSingleton<DefaultReferenceManager>.Instance.ineffectiveSound, ((Component)__instance).transform.position, Quaternion.identity); __instance.alreadyDeflectedBy.Add(other); return false; } } else if (__instance.active && (((Component)other).gameObject.CompareTag("Head") || ((Component)other).gameObject.CompareTag("Body") || ((Component)other).gameObject.CompareTag("Limb") || ((Component)other).gameObject.CompareTag("EndLimb")) && !((Component)other).gameObject.CompareTag("Armor")) { EnemyIdentifierIdentifier componentInParent2 = ((Component)other).gameObject.GetComponentInParent<EnemyIdentifierIdentifier>(); EnemyIdentifier val5 = null; if ((Object)(object)componentInParent2 != (Object)null && (Object)(object)componentInParent2.eid != (Object)null) { val5 = componentInParent2.eid; } if ((Object)(object)val5 != (Object)null && (__instance.alreadyHitEnemies.Count == 0 || !__instance.alreadyHitEnemies.Contains(val5)) && ((val5.enemyType != __instance.safeEnemyType && !EnemyIdentifier.CheckHurtException(__instance.safeEnemyType, val5.enemyType, __instance.target)) || __instance.friendly)) { if (__instance.explosive) { __instance.Explode(); } __instance.active = false; bool flag = false; bool dead = val5.dead; if (__instance.playerBullet) { val5.hitter = __instance.bulletType; if (!val5.hitterWeapons.Contains(__instance.weaponType)) { val5.hitterWeapons.Add(__instance.weaponType); } } else if (!__instance.friendly) { val5.hitter = "enemy"; } else { val5.hitter = "projectile"; flag = true; } if (__instance.boosted && !val5.blessed && !val5.dead) { MonoSingleton<StyleHUD>.Instance.AddPoints(150, "ultrakill.projectileboost", __instance.sourceWeapon, val5, -1, "", ""); } bool flag2 = true; if (__instance.spreaded) { ProjectileSpread componentInParent3 = ((Component)__instance).GetComponentInParent<ProjectileSpread>(); if ((Object)(object)componentInParent3 != (Object)null) { if (componentInParent3.hitEnemies.Contains(val5)) { flag2 = false; } else { componentInParent3.hitEnemies.Add(val5); } } } if (!__instance.explosive) { if (flag2) { if ((int)val5.enemyType == 33) { val5.hitter = "heavypunch"; } else if ((int)val5.enemyType == 7) { val5.hitter = "punch"; } else { val5.hitter = "scsword"; } if (__instance.playerBullet) { EnemyIdentifier obj = val5; GameObject gameObject = ((Component)other).gameObject; val4 = __instance.rb.velocity; obj.DeliverDamage(gameObject, ((Vector3)(ref val4)).normalized * 2500f, ((Component)__instance).transform.position, __instance.damage / 4f * __instance.enemyDamageMultiplier, flag, 0f, __instance.sourceWeapon, false, false); } else if (__instance.friendly) { EnemyIdentifier obj2 = val5; GameObject gameObject2 = ((Component)other).gameObject; val4 = __instance.rb.velocity; obj2.DeliverDamage(gameObject2, ((Vector3)(ref val4)).normalized * 10000f, ((Component)__instance).transform.position, __instance.damage / 4f * __instance.enemyDamageMultiplier, flag, 0f, __instance.sourceWeapon, false, false); } else { EnemyIdentifier obj3 = val5; GameObject gameObject3 = ((Component)other).gameObject; val4 = __instance.rb.velocity; obj3.DeliverDamage(gameObject3, ((Vector3)(ref val4)).normalized * 100f, ((Component)__instance).transform.position, __instance.damage / 10f * __instance.enemyDamageMultiplier, flag, 0f, __instance.sourceWeapon, false, false); } } __instance.CreateExplosionEffect(); } if (__instance.keepTrail) { __instance.KeepTrail(); } if (!dead) { MonoSingleton<TimeController>.Instance.HitStop(0.005f); } if (!dead || ((Component)other).gameObject.layer == 11 || __instance.boosted) { Object.Destroy((Object)(object)((Component)__instance).gameObject); } __instance.alreadyHitEnemies.Add(val5); __instance.active = true; return false; } } else { if (!__instance.hittingPlayer && (((Component)other).gameObject.layer == 8 || ((Component)other).gameObject.layer == 24) && __instance.active) { Breakable component = ((Component)other).gameObject.GetComponent<Breakable>(); if ((Object)(object)component != (Object)null && !component.crate) { component.Break(); } Bleeder val6 = default(Bleeder); if (((Component)other).gameObject.TryGetComponent<Bleeder>(ref val6)) { bool flag3 = false; if (!__instance.friendly && !__instance.playerBullet && val6.ignoreTypes.Length != 0) { EnemyType[] ignoreTypes = val6.ignoreTypes; for (int i = 0; i < ignoreTypes.Length; i++) { if ((int)ignoreTypes[i] == (int)__instance.safeEnemyType) { flag3 = true; break; } } } if (!flag3) { if (__instance.damage <= 10f) { val6.GetHit(((Component)__instance).transform.position, (GoreType)2, false); } else if (__instance.damage <= 30f) { val6.GetHit(((Component)__instance).transform.position, (GoreType)1, false); } else { val6.GetHit(((Component)__instance).transform.position, (GoreType)0, false); } } } if (__instance.explosive) { __instance.Explode(); } else { if (__instance.keepTrail) { __instance.KeepTrail(); } __instance.CreateExplosionEffect(); Object.Destroy((Object)(object)((Component)__instance).gameObject); } __instance.active = false; } if (((Component)other).gameObject.layer == 0) { Rigidbody componentInParent4 = ((Component)other).GetComponentInParent<Rigidbody>(); if ((Object)(object)componentInParent4 != (Object)null) { componentInParent4.AddForce(((Component)__instance).transform.forward * 1000f); } } } return false; } Coin component2 = ((Component)other).gameObject.GetComponent<Coin>(); if (Object.op_Implicit((Object)(object)component2) && !component2.shot) { if (!__instance.friendly) { if (__instance.target != null) { component2.customTarget = __instance.target; } component2.DelayedEnemyReflect(); } else { component2.Punchflection(); } } if (__instance.explosive) { __instance.Explode(); } if (__instance.keepTrail) { __instance.KeepTrail(); } __instance.active = false; __instance.CreateExplosionEffect(); Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Punch), "ParryProjectile")] public static bool ParryChange(Punch __instance, Projectile proj) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0268: 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_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0297: 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_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) if (tcenabled) { proj.hittingPlayer = false; proj.friendly = true; proj.speed *= 2f; proj.homingType = (HomingType)0; if (Object.op_Implicit((Object)(object)((Component)proj).GetComponent<PlayableStreetcleanerPatchID>())) { proj.damage *= 1.5f; } else { proj.explosionEffect = __instance.parriedProjectileHitObject; } proj.precheckForCollisions = true; Rigidbody component = ((Component)proj).GetComponent<Rigidbody>(); if (proj.playerBullet) { __instance.alreadyBoostedProjectile = true; proj.boosted = true; SphereCollider component2 = ((Component)proj).GetComponent<SphereCollider>(); component2.radius *= 4f; proj.damage = 0f; if (Object.op_Implicit((Object)(object)component)) { component.collisionDetectionMode = (CollisionDetectionMode)2; } Color val = default(Color); ((Color)(ref val))..ctor(1f, 0.35f, 0f); MeshRenderer val2 = default(MeshRenderer); if (((Component)proj).TryGetComponent<MeshRenderer>(ref val2) && Object.op_Implicit((Object)(object)((Renderer)val2).material) && ((Renderer)val2).material.HasProperty("_Color")) { ((Renderer)val2).material.SetColor("_Color", val); } TrailRenderer val3 = default(TrailRenderer); if (((Component)proj).TryGetComponent<TrailRenderer>(ref val3)) { Gradient val4 = new Gradient(); val4.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(val, 0f), new GradientColorKey(val, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0f, 1f) }); val3.colorGradient = val4; } Light val5 = default(Light); if (((Component)proj).TryGetComponent<Light>(ref val5)) { val5.color = val; } } if (Object.op_Implicit((Object)(object)component)) { component.constraints = (RigidbodyConstraints)112; } __instance.anim.Play("Hook", 0, 0.065f); if (!proj.playerBullet) { __instance.Parry(false, (EnemyIdentifier)null, ""); } else { MonoSingleton<TimeController>.Instance.ParryFlash(); } if (proj.explosive) { proj.explosive = false; } Rigidbody component3 = ((Component)proj).GetComponent<Rigidbody>(); if (Object.op_Implicit((Object)(object)component3) && component3.useGravity) { component3.useGravity = false; } Vector3 parryLookTarget = Punch.GetParryLookTarget(); ((Component)proj).transform.LookAt(parryLookTarget); if (proj.speed == 0f) { Vector3 val6 = parryLookTarget - ((Component)__instance).transform.position; component3.velocity = ((Vector3)(ref val6)).normalized * 250f; } else if (proj.speed < 100f) { proj.speed = 100f; } if (proj.spreaded) { ProjectileSpread componentInParent = ((Component)proj).GetComponentInParent<ProjectileSpread>(); if ((Object)(object)componentInParent != (Object)null) { componentInParent.ParriedProjectile(); } } ((Component)proj).transform.SetParent((Transform)null, true); return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(V2), "Start")] public static void RemoveV2Wings(V2 __instance) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown if (!tcenabled) { return; } GameObject gameObject = ((Component)__instance.wingTrails[0]).gameObject; List<GameObject> list = new List<GameObject>(0); if ((Object)(object)gameObject != (Object)null) { foreach (Transform item in gameObject.transform) { Transform val = item; if (((Object)val).name.Contains("wing")) { list.Add(((Component)val).gameObject); } } } if (list.Count > 0) { foreach (GameObject item2 in list) { int num = Random.Range(1, 9); if (((Object)item2.transform).name.Contains("wing_" + num) || ((Object)item2.transform).name.Contains("wing_" + (num - 1))) { Object.Destroy((Object)(object)item2); } } } for (int i = 0; i < __instance.wingTextures.Length; i++) { Texture val2 = __instance.wingTextures[i]; if ((Object)(object)MainCode.FetchFromBundle<Texture>(((Object)val2).name + ".png", autofill: true) != (Object)null) { __instance.wingTextures[i] = MainCode.FetchFromBundle<Texture>(((Object)val2).name + ".png", autofill: true); } } } [HarmonyPrefix] [HarmonyPatch(typeof(EnemySimplifier), "Start")] public static bool FixV1Tex(EnemySimplifier __instance) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Expected O, but got Unknown if (((Object)((Component)__instance).transform).name == "v2_mdl" && tcenabled) { __instance.lmask = LayerMask.op_Implicit(LayerMask.op_Implicit(__instance.lmask) | 0x100); __instance.lmask = LayerMask.op_Implicit(LayerMask.op_Implicit(__instance.lmask) | 0x1000000); __instance.meshrenderer = ((Component)__instance).GetComponent<Renderer>(); __instance.meshrenderer.material = MainCode.FetchFromBundle<Material>("V1Mat.mat", autofill: true); __instance.currentMaterial = __instance.meshrenderer.material; __instance.originalMaterial = __instance.currentMaterial; __instance.matList = __instance.meshrenderer.materials; if ((Object)(object)__instance.simplifiedMaterial2 != (Object)null && __instance.matList.Length > 1) { Material originalMaterial = __instance.matList[1]; __instance.originalMaterial2 = originalMaterial; } if ((Object)(object)__instance.simplifiedMaterial3 != (Object)null && __instance.matList.Length > 2) { Material originalMaterial2 = __instance.matList[2]; __instance.originalMaterial3 = originalMaterial2; } __instance.enragedMaterial = __instance.originalMaterial; __instance.materialDict = new Dictionary<MaterialState, Material> { { (MaterialState)0, __instance.originalMaterial }, { (MaterialState)1, __instance.simplifiedMaterial }, { (MaterialState)2, __instance.enragedMaterial }, { (MaterialState)3, __instance.enragedSimplifiedMaterial } }; __instance.oman = MonoSingleton<OptionsManager>.Instance; __instance.player = ((Component)MonoSingleton<NewMovement>.Instance).gameObject; __instance.TryRemoveSimplifier(); if ((Object)(object)__instance.enemyRootTransform == (Object)null) { __instance.enemyRootTransform = ((Component)__instance).transform; } __instance.hasSimplifiedMaterial = (Object)(object)__instance.simplifiedMaterial != (Object)null; __instance.hasEnragedSimplified = (Object)(object)__instance.enragedSimplifiedMaterial != (Object)null; __instance.UpdateColors(); __instance.SetOutline(true); if (__instance.neverOutlineAndRemoveSimplifier) { MaterialPropertyBlock val = new MaterialPropertyBlock(); val.SetFloat("_Outline", 0f); val.SetFloat("_ForceOutline", 0f); __instance.meshrenderer.SetPropertyBlock(val); __instance.active = false; Object.Destroy((Object)(object)__instance); } Debug.Log((object)"retextured v2"); __instance.matList[1].mainTexture = ((Component)__instance).GetComponentInParent<V2>().wingTextures[0]; return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(BossHealthBar), "Awake")] public static void FixV1Name(BossHealthBar __instance) { if (tcenabled && __instance.bossName == "V2") { __instance.bossName = "FORGOTTEN PROTOTYPE"; } } [HarmonyPostfix] [HarmonyPatch(typeof(V2), "Update")] public static void FixV1Bossbar(V2 __instance) { if (tcenabled && Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<BossHealthBar>()) && !((Behaviour)((Component)__instance).GetComponent<BossHealthBar>()).enabled && __instance.active) { ((Behaviour)((Component)__instance).GetComponent<BossHealthBar>()).enabled = true; } } } [Configgable("", "Firstperson key", 0, "Key to toggle first-person mode")] private static ConfigKeybind thirdperson = new ConfigKeybind((KeyCode)101); [Configgable("", "Firstperson type", 0, "Defines whether you have to hold thirdperson key or if it is toggled.")] private static ConfigDropdown<ThirdPersonType> thirdpersontype = new ConfigDropdown<ThirdPersonType>((ThirdPersonType[])Enum.GetValues(typeof(ThirdPersonType)), (string[])null, 0); [Configgable("", "Sword Key", 0, "Key to use Sword.")] private static ConfigKeybind swordkey = new ConfigKeybind((KeyCode)52); [Configgable("", "Streetcleaner sounds volume", 0, "Volume of the sounds the player streetcleaner makes.")] private static IntegerSlider soundslider = new IntegerSlider(100, 0, 100); [Configgable("", "Cosmetics", 0, "cosmetics")] private static ConfigLabel coslabel = new ConfigLabel("-- Cosmetics --", 55f); [Configgable("", "Hat", 0, "The hat the player model wears. Will default to current seasonal hat if set to None.")] private static ConfigDropdown<CustomHat> hattype = new ConfigDropdown<CustomHat>((CustomHat[])Enum.GetValues(typeof(CustomHat)), (string[])null, 0); private static bool tp; public static bool tcenabled; public static AssetBundle tcbundle; public static GameObject streetcleaner; public static GameObject streetcleanerlocal; public static GameObject streetcleanerdivine; public static GameObject hurtbox; public static GameObject tpmarker; public static GameObject firepoint; public static GameObject posandrot; public static GameObject breathingnoises; public static GameObject divinebreathing; public static GameObject flamethrowergrip; public static GameObject turretgun; public static GameObject[] hats; private static bool candoshit; private static bool cansendtomenu; public static float timer; public static float timer2; public static float timer3; public static float timer4; public static float swordreturntimer; private static GameObject beam; private static PlySCBeam bgbeam; private static GameObject sword; private static GameObject swordinhand; private static GameObject grenadeready; private static bool canping; private static bool canping2; private static bool swording; private static bool swording2; private static bool lmbtutorial; private static bool canlmb = true; private static bool tutorialdone = false; private static bool cantpprompt; private static bool canplaytutorial = false; private static bool CanSetTimerToZero; private static bool SpawnerArmEnabled; private static Streetcleaner sc; private static float force = 100f; private static float maxforce = 25f; private Texture v2tex; private Texture v2wingtex; public static PowerUpType currentpowerup; public static bool IsPoweredUp; public static float PowerUpTime; public static float insigniatimer; public static float tptimer; public static bool teleporting; public static bool overhealed; public static bool Debugging; private static GameObject head; private static float flamethrowerheat; private static bool overheated; public GameObject debugmenu; public static ConfigBuilder ConfigBuilder { get; private set; } public static void SendHudMessage(string msg, int delay, bool silent) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage(msg, "", "", delay, silent); } public static Type Fetch<Type>(string name) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync<Type>((object)name).WaitForCompletion(); } public static Type FetchFromBundle<Type>(string name, bool autofill = false) where Type : Object { if (!autofill) { return tcbundle.LoadAsset<Type>(name); } return tcbundle.LoadAsset<Type>("assets/formods/streetcleanermod/" + name); } public static void SetLayerRecursive(GameObject gobject, string layername) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown gobject.layer = LayerMask.NameToLayer(layername); foreach (Transform item in gobject.transform) { Transform val = item; ((Component)val).gameObject.layer = LayerMask.NameToLayer(layername); Transform componentInChildren = ((Component)val).GetComponentInChildren<Transform>(); if ((Object)(object)componentInChildren != (Object)null) { SetLayerRecursive(((Component)val).gameObject, layername); } } } public static GameObject FindChild(Transform parent, string objPath) { return ((Component)parent.Find(objPath)).gameObject; } public Vector3 Shake(Vector3 originpos, Vector3 pos, float shakeamt) { //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_0007: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; val = pos + new Vector3(Random.Range(0f - shakeamt, shakeamt), Random.Range(0f - shakeamt, shakeamt), Random.Range(0f - shakeamt, shakeamt)); ((Vector3)(ref val))..ctor(Mathf.Clamp(val.x, originpos.x - 0.01f, originpos.x + 0.01f), Mathf.Clamp(val.y, originpos.y - 0.01f, originpos.y + 0.01f), Mathf.Clamp(val.z, originpos.z - 0.01f, originpos.z + 0.01f)); return val; } public static void Log(string log, int type = 1) { switch (type) { case 1: Debug.Log((object)log); break; case 2: Debug.LogWarning((object)log); break; case 3: Debug.LogError((object)log); break; } } public static SlotData GetSlot(int slot) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown int currentSlot = GameProgressSaver.currentSlot; GameProgressSaver.currentSlot = slot; string savePath = GameProgressSaver.SavePath; SlotData val = null; val = ((!Directory.Exists(savePath)) ? null : ((GameProgressSaver.ReadFile(GameProgressSaver.generalProgressPath) is GameProgressMoneyAndGear) ? GameProgressSaver.GetDirectorySlotData(savePath) : null)); if (val == null) { val = new SlotData { exists = false }; } GameProgressSaver.currentSlot = currentSlot; return val; } public static bool IsPluginLoaded(string guid) { if (!Chainloader.PluginInfos.ContainsKey(guid)) { return false; } return (Object)(object)Chainloader.PluginInfos[guid].Instance != (Object)null; } public void Awake() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Invalid comparison between Unknown and I4 ConfigBuilder = new ConfigBuilder("plonk.plysc", "Playable Streetcleaner"); ConfigBuilder.Build(); Log("Built Config ply-sc"); if ((Object)(object)tcbundle == (Object)null) { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); tcbundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "plysc")); Log("Got bundle " + (object)tcbundle); for (int i = 0; i < tcbundle.GetAllAssetNames().Length; i++) { Log(tcbundle.GetAllAssetNames()[i].ToString()); } } Log("Got bundle ply-sc"); streetcleaner = MainCode.FetchFromBundle<GameObject>("assets/formods/streetcleanermod/streetcleaner.prefab", autofill: false); Log("Got streetcleaner ply-sc"); SceneManager.activeSceneChanged += OnSceneChange; Log("Added onscenechange ply-sc"); if ((Object)(object)((Component)this).gameObject != (Object)null && (int)((Object)((Component)this).gameObject).hideFlags != 61) { ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; } Log("ply-sc loaded!"); } public void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Harmony val = new Harmony("plonk.ply-sc"); val.PatchAll(); v2tex = Fetch<Material>("Assets/Models/V1/V2.mat").GetTexture(1); v2wingtex = Fetch<Material>("Assets/Models/V1/V2Wing.mat").GetTexture(1); } private void OnSceneChange(Scene before, Scene after) { } public void Update() { //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_2552: Unknown result type (might be due to invalid IL or missing references) //IL_2566: Unknown result type (might be due to invalid IL or missing references) //IL_264f: Unknown result type (might be due to invalid IL or missing references) //IL_2663: Unknown result type (might be due to invalid IL or missing references) //IL_27c7: Unknown result type (might be due to invalid IL or missing references) //IL_280f: Unknown result type (might be due to invalid IL or missing references) //IL_26c8: Unknown result type (might be due to invalid IL or missing references) //IL_26da: Unknown result type (might be due to invalid IL or missing references) //IL_2857: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Expected O, but got Unknown //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_087b: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Unknown result type (might be due to invalid IL or missing references) //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0990: Unknown result type (might be due to invalid IL or missing references) //IL_0968: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_0c7b: Unknown result type (might be due to invalid IL or missing references) //IL_0c80: Unknown result type (might be due to invalid IL or missing references) //IL_0c9e: Unknown result type (might be due to invalid IL or missing references) //IL_0b7b: Unknown result type (might be due to invalid IL or missing references) //IL_0b80: Unknown result type (might be due to invalid IL or missing references) //IL_0b9e: Unknown result type (might be due to invalid IL or missing references) //IL_0f2a: Unknown result type (might be due to invalid IL or missing references) //IL_0f36: Unknown result type (might be due to invalid IL or missing references) //IL_0fbb: Unknown result type (might be due to invalid IL or missing references) //IL_0fc0: Unknown result type (might be due to invalid IL or missing references) //IL_1069: Unknown result type (might be due to invalid IL or missing references) //IL_1007: Unknown result type (might be due to invalid IL or missing references) //IL_1805: Unknown result type (might be due to invalid IL or missing references) //IL_180c: Unknown result type (might be due to invalid IL or missing references) //IL_1831: Unknown result type (might be due to invalid IL or missing references) //IL_1836: Unknown result type (might be due to invalid IL or missing references) //IL_18a0: Unknown result type (might be due to invalid IL or missing references) //IL_18bb: Unknown result type (might be due to invalid IL or missing references) //IL_18c0: Unknown result type (might be due to invalid IL or missing references) //IL_18ca: Unknown result type (might be due to invalid IL or missing references) //IL_18d4: Unknown result type (might be due to invalid IL or missing references) //IL_18d9: Unknown result type (might be due to invalid IL or missing references) //IL_1934: Unknown result type (might be due to invalid IL or missing references) //IL_1939: Unknown result type (might be due to invalid IL or missing references) //IL_198f: Unknown result type (might be due to invalid IL or missing references) //IL_1999: Unknown result type (might be due to invalid IL or missing references) //IL_199e: Unknown result type (might be due to invalid IL or missing references) //IL_19a3: Unknown result type (might be due to invalid IL or missing references) //IL_19ec: Unknown result type (might be due to invalid IL or missing references) //IL_19fb: Unknown result type (might be due to invalid IL or missing references) //IL_1a05: Unknown result type (might be due to invalid IL or missing references) //IL_1a0a: Unknown result type (might be due to invalid IL or missing references) //IL_19c9: Unknown result type (might be due to invalid IL or missing references) //IL_1633: Unknown result type (might be due to invalid IL or missing references) //IL_1aa3: Unknown result type (might be due to invalid IL or missing references) //IL_1ab2: Unknown result type (might be due to invalid IL or missing references) //IL_1abc: Unknown result type (might be due to invalid IL or missing references) //IL_1ac1: Unknown result type (might be due to invalid IL or missing references) //IL_1aed: Unknown result type (might be due to invalid IL or missing references) //IL_1afc: Unknown result type (might be due to invalid IL or missing references) //IL_1a25: Unknown result type (might be due to invalid IL or missing references) //IL_1577: Unknown result type (might be due to invalid IL or missing references) //IL_1586: Unknown result type (might be due to invalid IL or missing references) //IL_15a3: Unknown result type (might be due to invalid IL or missing references) //IL_15ad: Unknown result type (might be due to invalid IL or missing references) //IL_1c4c: Unknown result type (might be due to invalid IL or missing references) //IL_1c5a: Unknown result type (might be due to invalid IL or missing references) //IL_1726: Unknown result type (might be due to invalid IL or missing references) //IL_1735: Unknown result type (might be due to invalid IL or missing references) //IL_1d3e: Unknown result type (might be due to invalid IL or missing references) //IL_1cb8: Unknown result type (might be due to invalid IL or missing references) //IL_14d7: Unknown result type (might be due to invalid IL or missing references) //IL_14e6: Unknown result type (might be due to invalid IL or missing references) //IL_1503: Unknown result type (might be due to invalid IL or missing references) //IL_1508: Unknown result type (might be due to invalid IL or missing references) //IL_1d4c: Unknown result type (might be due to invalid IL or missing references) //IL_1cc6: Unknown result type (might be due to invalid IL or missing references) //IL_12d7: Unknown result type (might be due to invalid IL or missing references) //IL_1daa: Unknown result type (might be due to invalid IL or missing references) //IL_12e5: Unknown result type (might be due to invalid IL or missing references) //IL_1db8: Unknown result type (might be due to invalid IL or missing references) //IL_1343: Unknown result type (might be due to invalid IL or missing references) //IL_1351: Unknown result type (might be due to invalid IL or missing references) if (!candoshit && SceneHelper.CurrentScene == "Main Menu") { if ((Object)(object)tcbundle != (Object)null) { candoshit = true; MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new ResetPlayer()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GiveDivine()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GiveSentry()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new DebugLog()); Log("Registered commands ply-sc"); } else { SendHudMessage("Playable Streetcleaner mod failed to load.\r\n<color=green>The asset bundle (filename \"plysc\") is missing or in the wrong place. please place it where the mod's .dll is located.</color>", 0, silent: true); } } if (candoshit) { if ((Object)(object)MonoSingleton<PrefsManager>.Instance != (Object)null) { if (MonoSingleton<PrefsManager>.Instance.GetInt("selectedSaveSlot", 0) == 888139043 && !tcenabled) { if (!tcenabled && Debugging) { Debug.Log((object)"enabled streetcleaner mod"); } tcenabled = true; } if (MonoSingleton<PrefsManager>.Instance.GetInt("selectedSaveSlot", 0) != 888139043 && tcenabled) { if (tcenabled && Debugging) { Debug.Log((object)"disabled streetcleaner mod"); } tcenabled = false; } } if (tcenabled) { if ((Object)(object)Fetch<Material>("Assets/Models/V1/V2.mat").GetTexture(1) != (Object)(object)MainCode.FetchFromBundle<Material>("V1Mat.mat", autofill: true).GetTexture(1)) { Fetch<Material>("Assets/Models/V1/V2.mat").SetTexture("_MainTex", MainCode.FetchFromBundle<Material>("V1Mat.mat", autofill: true).GetTexture(1)); Fetch<Material>("Assets/Models/V1/V2Wing.mat").SetTexture("_MainTex", MainCode.FetchFromBundle<Material>("V1Wing.mat", autofill: true).GetTexture(1)); Fetch<Material>("Assets/Models/V1/V2WingFake.mat").SetTexture("_MainTex", MainCode.FetchFromBundle<Material>("V1Wing.mat", autofill: true).GetTexture(1)); Log("retextured V2!"); } } else if ((Object)(object)Fetch<Material>("Assets/Models/V1/V2.mat").GetTexture(1) != (Object)(object)v2tex) { Fetch<Material>("Assets/Models/V1/V2.mat").SetTexture("_MainTex", v2tex); Fetch<Material>("Assets/Models/V1/V2Wing.mat").SetTexture("_MainTex", v2wingtex); Fetch<Material>("Assets/Models/V1/V2WingFake.mat").SetTexture("_MainTex", v2wingtex); Log("retextured V2!"); } } if (!candoshit || !(SceneHelper.CurrentScene != "Main Menu")) { return; } if ((Object)(object)beam == (Object)null) { beam = Object.Instantiate<GameObject>(new GameObject(), ((Component)MonoSingleton<CameraController>.instance).transform.position, ((Component)MonoSingleton<CameraController>.instance).transform.rotation, ((Component)MonoSingleton<CameraController>.instance).transform); bgbeam = beam.AddComponent<PlySCBeam>(); } if (tcenabled) { if ((Object)(object)streetcleanerlocal == (Object)null) { if ((Object)(object)MonoSingleton<NewMovement>.instance != (Object)null && !MonoSingleton<NewMovement>.instance.dead) { streetcleanerlocal = MakeStreetcleaner("Player Streetcleaner", 1); } } else { Vector2 val = default(Vector2); if ((Object)(object)MonoSingleton<InputManager>.instance != (Object)null) { val = MonoSingleton<InputManager>.instance.InputSource.Move.ReadValue<Vector2>(); } NewMovement instance = MonoSingleton<NewMovement>.instance; Rigidbody val2 = null; if ((Object)(object)instance != (Object)null) { val2 = instance.rb; } if ((Object)(object)instance != (Object)null && (Object)(object)val2 != (Object)null && (Object)(object)MonoSingleton<InputManager>.instance != (Object)null && (Object)(object)MonoSingleton<FistControl>.instance != (Object)null && (Object)(object)MonoSingleton<CameraController>.instance != (Object)null) { HudController val3 = null; if ((Object)(object)Object.FindObjectOfType<HudController>() != (Object)null) { val3 = Object.FindObjectOfType<HudController>(); } if ((Object)(object)val3 != (Object)null && (Object)(object)val3.gunCanvas != (Object)null && (Object)(object)FindChild(val3.gunCanvas.transform, "GunPanel") != (Object)null && FindChild(val3.gunCanvas.transform, "GunPanel").activeSelf) { FindChild(val3.gunCanvas.transform, "GunPanel").gameObject.SetActive(false); } if ((Object)(object)MonoSingleton<RailcannonMeter>.instance != (Object)null && ((Behaviour)MonoSingleton<RailcannonMeter>.instance).enabled) { ((Behaviour)MonoSingleton<RailcannonMeter>.instance).enabled = false; } if ((Object)(object)beam == (Object)null) { beam = Object.Instantiate<GameObject>(new GameObject(), ((Component)MonoSingleton<CameraController>.instance).transform.position, ((Component)MonoSingleton<CameraController>.instance).transform.rotation, ((Component)MonoSingleton<CameraController>.instance).transform); bgbeam = beam.AddComponent<PlySCBeam>(); beam.AddComponent<PlayableStreetcleanerPatchID>(); } if ((Object)(object)breathingnoises.GetComponent<AudioSource>() != (Object)null) { breathingnoises.GetComponent<AudioSource>().volume = (float)((ConfigValueElement<int>)(object)soundslider).Value / 100f * 0.175f; } if