Decompiled source of Legmr Moon v2.6.0

HourGlassCode.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using GameNetcodeStuff;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("HourGlassCode")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HourGlassCode")]
[assembly: AssemblyTitle("HourGlassCode")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace HourGlassCode
{
	public class HourGlass : GrabbableObject
	{
		public bool canUse = true;

		public Light? glowLight;

		public PlayerControllerB? playerPrevious;

		public int backFireAmount;

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			if (!canUse)
			{
				return;
			}
			playerPrevious = base.playerHeldBy;
			int num = Random.Range(1, 7);
			if (num == backFireAmount)
			{
				Time.timeScale = Random.Range(3f, 4.5f);
				if ((Object)(object)glowLight != (Object)null)
				{
					glowLight.intensity = 800f;
				}
				float timeDuration = Random.Range(16f, 40f);
				((MonoBehaviour)this).StartCoroutine(TimeReverter(timeDuration));
				((MonoBehaviour)this).StartCoroutine(UseWait());
				canUse = false;
				return;
			}
			Time.timeScale = Random.Range(0.1f, 0.3f);
			playerPrevious.movementSpeed = 13f;
			if ((Object)(object)glowLight != (Object)null)
			{
				glowLight.intensity = 1000f;
			}
			float timeDuration2 = Random.Range(0.5f, 5f);
			((MonoBehaviour)this).StartCoroutine(TimeReverter(timeDuration2));
			((MonoBehaviour)this).StartCoroutine(UseWait());
			canUse = false;
		}

		public IEnumerator TimeReverter(float timeDuration)
		{
			yield return (object)new WaitForSeconds(timeDuration);
			Time.timeScale = 1f;
			if ((Object)(object)playerPrevious != (Object)null)
			{
				playerPrevious.movementSpeed = 4.6f;
			}
			if ((Object)(object)glowLight != (Object)null)
			{
				glowLight.intensity = 300f;
			}
		}

		public IEnumerator UseWait()
		{
			yield return (object)new WaitForSeconds(30f);
			canUse = true;
		}
	}
}

legmrModSnowScript.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using GameNetcodeStuff;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("legmrModSnowScript")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("legmrModSnowScript")]
[assembly: AssemblyTitle("legmrModSnowScript")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace legmrModSnowScript
{
	public class FestiveSnowmanTracking : MonoBehaviour
	{
		public int explodeChance;

		public int[]? playerUses;

		public string[]? playerNames;

		public GameObject[]? heldPlayers;

		public PlayerControllerB[]? playerControlls;

		public int[]? privleges;

		public GameObject? playerParent;

		public GameObject? shotGunAmmoObject;

		public SnowManUse? creator;

		public int listNumber;

		public bool shellBegin0 = false;

		public bool shellBegin1 = false;

		public bool shellBegin2 = false;

		public bool shellBegin3 = false;

		public bool enemyGold = false;

		public static bool active;

		public bool comander = false;

		public void Update()
		{
			if ((Object)(object)heldPlayers[0] == (Object)null)
			{
				ExtraCoder();
			}
			if ((Object)(object)((GrabbableObject)creator).playerHeldBy != (Object)null && !active)
			{
				active = true;
				comander = true;
			}
			if (playerControlls == null || playerUses == null || !comander)
			{
				return;
			}
			playerControlls[0].movementSpeed = 4.6f + (float)playerUses[0] * 0.15f;
			playerControlls[0].sprintTime = 11f + (float)playerUses[0] * 0.15f;
			if (playerControlls[0].health <= 0)
			{
				playerUses[0] = 0;
			}
			if ((Object)(object)playerControlls[1] != (Object)null)
			{
				playerControlls[1].movementSpeed = 4.6f + (float)playerUses[1] * 0.15f;
				playerControlls[1].sprintTime = 11f + (float)playerUses[1] * 0.15f;
				if (playerControlls[1].health <= 0)
				{
					playerUses[1] = 0;
				}
			}
			if ((Object)(object)playerControlls[2] != (Object)null)
			{
				playerControlls[2].movementSpeed = 4.6f + (float)playerUses[1] * 0.15f;
				playerControlls[2].sprintTime = 11f + (float)playerUses[1] * 0.15f;
				if (playerControlls[2].health <= 0)
				{
					playerUses[2] = 0;
				}
			}
			if ((Object)(object)playerControlls[3] != (Object)null)
			{
				playerControlls[3].movementSpeed = 4.6f + (float)playerUses[1] * 0.15f;
				playerControlls[3].sprintTime = 11f + (float)playerUses[1] * 0.15f;
				if (playerControlls[3].health <= 0)
				{
					playerUses[3] = 0;
				}
			}
			if (privleges[0] == 1 && !shellBegin0)
			{
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine0(0));
			}
			if (privleges[1] == 1 && !shellBegin1)
			{
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine1(1));
			}
			if (privleges[2] == 1 && !shellBegin2)
			{
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine2(2));
			}
			if (privleges[3] == 1 && !shellBegin3)
			{
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine3(3));
			}
		}

		public void ExtraCoder()
		{
			heldPlayers = GameObject.FindGameObjectsWithTag("Player");
			for (int i = 0; i < heldPlayers.Length; i++)
			{
				playerControlls[i] = heldPlayers[i].GetComponent<PlayerControllerB>();
				playerNames[i] = ((Object)heldPlayers[i]).name;
			}
			playerUses = new int[heldPlayers.Length];
		}

		private IEnumerator ShellCoroutine0(int playerNum)
		{
			shellBegin0 = true;
			yield return (object)new WaitForSeconds(60f);
			if (heldPlayers != null)
			{
				Object.Instantiate<GameObject>(shotGunAmmoObject, heldPlayers[playerNum].transform.position, Quaternion.identity);
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine0(playerNum));
			}
		}

		private IEnumerator ShellCoroutine1(int playerNum)
		{
			shellBegin1 = true;
			yield return (object)new WaitForSeconds(60f);
			if (heldPlayers != null)
			{
				Object.Instantiate<GameObject>(shotGunAmmoObject, heldPlayers[playerNum].transform.position, Quaternion.identity);
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine1(playerNum));
			}
		}

		private IEnumerator ShellCoroutine2(int playerNum)
		{
			shellBegin2 = true;
			yield return (object)new WaitForSeconds(60f);
			if (heldPlayers != null)
			{
				Object.Instantiate<GameObject>(shotGunAmmoObject, heldPlayers[playerNum].transform.position, Quaternion.identity);
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine2(playerNum));
			}
		}

		private IEnumerator ShellCoroutine3(int playerNum)
		{
			shellBegin3 = true;
			yield return (object)new WaitForSeconds(60f);
			if (heldPlayers != null)
			{
				Object.Instantiate<GameObject>(shotGunAmmoObject, heldPlayers[playerNum].transform.position, Quaternion.identity);
				((MonoBehaviour)this).StartCoroutine(ShellCoroutine3(playerNum));
			}
		}
	}
	public class SnowManUse : GrabbableObject
	{
		public GameObject? variablesObject;

		public FestiveSnowmanTracking? variablesObjectScript;

		public AudioSource? useSound;

		public int explodeNum;

		public ParticleSystem? particle1;

		public ParticleSystem? particle2;

		public ParticleSystem? particle3;

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: 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_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: 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_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			useSound.PlayOneShot(useSound.clip);
			WalkieTalkie.TransmitOneShotAudio(useSound, useSound.clip, 0.7f);
			if (((Object)base.playerHeldBy).name == variablesObjectScript.playerNames[0])
			{
				variablesObjectScript.playerUses[0]++;
				int num = Random.Range(1, 20);
				if (num == explodeNum)
				{
					variablesObjectScript.playerUses[0] = 0;
					particle1.Play();
					particle2.Play();
					particle3.Play();
					SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f);
				}
			}
			if (((Object)base.playerHeldBy).name == variablesObjectScript.playerNames[1])
			{
				variablesObjectScript.playerUses[1]++;
				variablesObjectScript.playerUses[1]++;
				int num2 = Random.Range(1, 20);
				if (num2 == explodeNum)
				{
					variablesObjectScript.playerUses[1] = 0;
					SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f);
					particle1.Play();
					particle2.Play();
					particle3.Play();
				}
			}
			if (((Object)base.playerHeldBy).name == variablesObjectScript.playerNames[2])
			{
				variablesObjectScript.playerUses[2]++;
				variablesObjectScript.playerUses[2]++;
				int num3 = Random.Range(1, 20);
				if (num3 == explodeNum)
				{
					variablesObjectScript.playerUses[2] = 0;
					SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f);
					particle1.Play();
					particle2.Play();
					particle3.Play();
				}
			}
			if (((Object)base.playerHeldBy).name == variablesObjectScript.playerNames[3])
			{
				variablesObjectScript.playerUses[3]++;
				variablesObjectScript.playerUses[3]++;
				int num4 = Random.Range(1, 20);
				if (num4 == explodeNum)
				{
					variablesObjectScript.playerUses[3] = 0;
					SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f);
					particle1.Play();
					particle2.Play();
					particle3.Play();
				}
			}
		}

		public static void SpawnExplosion(Vector3 explosionPosition, bool spawnExplosionEffect = false, float killRange = 1f, float damageRange = 1f, int nonLethalDamage = 50, float physicsForce = 0f, GameObject overridePrefab = null, bool goThroughCar = false)
		{
			//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_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_00e0: 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_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: 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_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_037e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0383: Unknown result type (might be due to invalid IL or missing references)
			//IL_0391: 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_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a7: 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_03ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_0469: Unknown result type (might be due to invalid IL or missing references)
			//IL_046e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_040a: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0432: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_0508: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: 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_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: 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)
			if (spawnExplosionEffect)
			{
				GameObject val = ((!((Object)(object)overridePrefab != (Object)null)) ? Object.Instantiate<GameObject>(StartOfRound.Instance.explosionPrefab, explosionPosition, Quaternion.Euler(-90f, 0f, 0f), RoundManager.Instance.mapPropsContainer.transform) : Object.Instantiate<GameObject>(overridePrefab, explosionPosition, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform));
				val.SetActive(true);
			}
			float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition);
			if (num < 14f)
			{
				HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
			}
			else if (num < 25f)
			{
				HUDManager.Instance.ShakeCamera((ScreenShakeType)0);
			}
			bool flag = false;
			Collider[] array = Physics.OverlapSphere(explosionPosition, damageRange, 2621448, (QueryTriggerInteraction)2);
			PlayerControllerB val2 = null;
			RaycastHit val3 = default(RaycastHit);
			Vector3 val5;
			for (int i = 0; i < array.Length; i++)
			{
				float num2 = Vector3.Distance(explosionPosition, ((Component)array[i]).transform.position);
				if (Physics.Linecast(explosionPosition, ((Component)array[i]).transform.position + Vector3.up * 0.3f, ref val3, 1073742080, (QueryTriggerInteraction)1) && ((!goThroughCar && ((Component)((RaycastHit)(ref val3)).collider).gameObject.layer == 30) || num2 > 4f))
				{
					continue;
				}
				if (((Component)array[i]).gameObject.layer == 3 && !flag)
				{
					val2 = ((Component)array[i]).gameObject.GetComponent<PlayerControllerB>();
					if ((Object)(object)val2 != (Object)null && ((NetworkBehaviour)val2).IsOwner)
					{
						flag = true;
						if (num2 < killRange)
						{
							Vector3 val4 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition);
							PlayerControllerB obj = val2;
							val5 = default(Vector3);
							obj.KillPlayer(val4, true, (CauseOfDeath)3, 0, val5);
						}
						else if (num2 < damageRange)
						{
							Vector3 val6 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition);
							val2.DamagePlayer(nonLethalDamage, true, true, (CauseOfDeath)3, 0, false, val6);
						}
					}
				}
				else if (((Component)array[i]).gameObject.layer == 19)
				{
					EnemyAICollisionDetect componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren<EnemyAICollisionDetect>();
					if ((Object)(object)componentInChildren != (Object)null && ((NetworkBehaviour)componentInChildren.mainScript).IsOwner && num2 < 4.5f)
					{
						EnemyAI mainScript = componentInChildren.mainScript;
						val5 = default(Vector3);
						mainScript.HitEnemyOnLocalClient(6, val5, (PlayerControllerB)null, false, -1);
						componentInChildren.mainScript.HitFromExplosion(num2);
					}
				}
			}
			val2 = GameNetworkManager.Instance.localPlayerController;
			if (physicsForce > 0f && Vector3.Distance(((Component)val2).transform.position, explosionPosition) < 35f && !Physics.Linecast(explosionPosition, ((Component)val2).transform.position + Vector3.up * 0.3f, ref val3, 256, (QueryTriggerInteraction)1))
			{
				float num3 = Vector3.Distance(((Component)val2).transform.position, explosionPosition);
				Vector3 val7 = Vector3.Normalize(((Component)val2).transform.position + Vector3.up * num3 - explosionPosition) / (num3 * 0.35f) * physicsForce;
				if (((Vector3)(ref val7)).magnitude > 2f)
				{
					if (((Vector3)(ref val7)).magnitude > 10f)
					{
						val2.CancelSpecialTriggerAnimations();
					}
					if (val2.inVehicleAnimation)
					{
						val5 = val2.externalForceAutoFade + val7;
						if (!(((Vector3)(ref val5)).magnitude > 50f))
						{
							goto IL_043f;
						}
					}
					PlayerControllerB obj2 = val2;
					obj2.externalForceAutoFade += val7;
				}
			}
			goto IL_043f;
			IL_043f:
			VehicleController val8 = Object.FindObjectOfType<VehicleController>();
			if ((Object)(object)val8 != (Object)null && !val8.magnetedToShip && physicsForce > 0f && Vector3.Distance(((Component)val8).transform.position, explosionPosition) < 35f)
			{
				val8.mainRigidbody.AddExplosionForce(physicsForce * 50f, explosionPosition, 12f, 3f, (ForceMode)1);
			}
			int num4 = ~LayerMask.GetMask(new string[1] { "Room" });
			num4 = ~LayerMask.GetMask(new string[1] { "Colliders" });
			array = Physics.OverlapSphere(explosionPosition, 10f, num4);
			for (int j = 0; j < array.Length; j++)
			{
				Rigidbody component = ((Component)array[j]).GetComponent<Rigidbody>();
				if ((Object)(object)component != (Object)null)
				{
					component.AddExplosionForce(70f, explosionPosition, 10f);
				}
			}
		}
	}
}

LegmrtestMod.dll

Decompiled 2 weeks ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using GameNetcodeStuff;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LegmrtestMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LegmrtestMod")]
[assembly: AssemblyTitle("LegmrtestMod")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace LegmrtestMod
{
	public class Bandage : GrabbableObject
	{
		public int healthRecovery;

		public int Uses;

		public AudioSource? bandageAudio;

		public ScanNodeProperties? nodeHeaders;

		public string? usedBandageText;

		public int usedBandageValue;

		public override void ItemActivate(bool used, bool buttonDown = true)
		{
			if (base.playerHeldBy.health < 100 && Uses > 0)
			{
				Uses--;
				PlayerControllerB playerHeldBy = base.playerHeldBy;
				playerHeldBy.health += healthRecovery;
				if (base.playerHeldBy.health >= 100)
				{
					base.playerHeldBy.health = 100;
					base.playerHeldBy.criticallyInjured = false;
				}
				if ((Object)(object)bandageAudio != (Object)null)
				{
					bandageAudio.PlayOneShot(bandageAudio.clip);
					WalkieTalkie.TransmitOneShotAudio(bandageAudio, bandageAudio.clip, 0.7f);
				}
				if (Uses == 0 && (Object)(object)nodeHeaders != (Object)null)
				{
					nodeHeaders.headerText = usedBandageText;
					nodeHeaders.scrapValue = usedBandageValue;
					base.scrapValue = usedBandageValue;
				}
			}
		}
	}
}