Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Legmr Moon v4.0.0
InteriorModActions.dll
Decompiled 2 days agousing System; using System.Collections; using System.Collections.Generic; 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("InteriorModActions")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("InteriorModActions")] [assembly: AssemblyTitle("InteriorModActions")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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 InteriorModActions { public class RnadomizerValue : GrabbableObject { public int scrapValueTemp; public AnimationCurve? randomValue; public ScanNodeProperties? _scanNodeProperties; public bool hasChangedValue = false; private void Awake() { if (!hasChangedValue && base.scrapValue < 20) { ((MonoBehaviour)this).StartCoroutine(WaitTillValue()); } } public IEnumerator WaitTillValue() { yield return (object)new WaitForSeconds(5f); float value = Random.Range(0f, 10f); scrapValueTemp = Mathf.RoundToInt(randomValue.Evaluate(value)); base.scrapValue = scrapValueTemp; _scanNodeProperties.scrapValue = base.scrapValue; hasChangedValue = true; } } internal class DeloadObj : MonoBehaviour { public int playerAmount; [Header("Different Components")] public Light? _light; public AudioSource? _source; public List<Light>? _lights; public bool isCandles; public bool isLight; public BreakerBox? _breakerBox; public List<PlayerControllerB>? allPlayers; public SphereCollider? _sphereCollider; private void Start() { ((MonoBehaviour)this).StartCoroutine(DoChecks()); allPlayers = new List<PlayerControllerB>(Object.FindObjectsOfType<PlayerControllerB>()); } private void Update() { //IL_0034: 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_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) bool flag = false; for (int i = 0; i < allPlayers.Count; i++) { if (allPlayers[i].isPlayerControlled) { Vector3 val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)this).transform.position; if (((Vector3)(ref val)).magnitude < 50f) { flag = true; break; } } } if (flag) { if ((Object)(object)_source != (Object)null) { ((Behaviour)_source).enabled = true; } if ((Object)(object)_light != (Object)null && _breakerBox.leversSwitchedOff == 0) { ((Behaviour)_light).enabled = true; } else { if (!isCandles) { return; } if (isLight && _breakerBox.leversSwitchedOff == 0) { RemoveElements(); { foreach (Light light in _lights) { ((Behaviour)light).enabled = true; } return; } } if (isLight) { return; } RemoveElements(); { foreach (Light light2 in _lights) { ((Behaviour)light2).enabled = true; } return; } } return; } if ((Object)(object)_source != (Object)null) { ((Behaviour)_source).enabled = false; } if ((Object)(object)_light != (Object)null) { ((Behaviour)_light).enabled = false; } else { if (!isCandles) { return; } RemoveElements(); foreach (Light light3 in _lights) { ((Behaviour)light3).enabled = false; } } } public void RemoveElements() { for (int i = 0; i < _lights.Count; i++) { if ((Object)(object)_lights[i] == (Object)null) { _lights.RemoveAt(i); } } } public IEnumerator DoChecks() { _breakerBox = Object.FindAnyObjectByType<BreakerBox>(); _sphereCollider = ((Component)this).gameObject.GetComponent<SphereCollider>(); yield return (object)new WaitForSeconds(1f); if ((Object)(object)_breakerBox == (Object)null) { ((MonoBehaviour)this).StartCoroutine(DoChecks()); } } } }
LCWeathers.dll
Decompiled 2 days agousing System; using System.Collections; using System.Collections.Generic; 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("LCWeathers")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LCWeathers")] [assembly: AssemblyTitle("LCWeathers")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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 LCWeathers { public class GlowBugWeather : MonoBehaviour { public RoundManager? _roundManager; public GameObject? glowBugs; public GameObject? oldSunLight; public List<PlayerControllerB>? allPlayers; public List<int>? playerChooseAmount; public float minTime; public float maxTime; public int targetPlayer; [Header("Outdoor Monsters")] public List<BaboonBirdAI>? allHawks; public List<MouthDogAI>? alldogs; public List<ForestGiantAI>? allGiants; public List<GiantKiwiAI>? birdAI; public List<PumaAI>? allCats; public List<RadMechAI>? allMechs; public List<SandWormAI>? allWorms; public List<BushWolfEnemy>? foxAI; [Header("Indoor Monsters")] public List<CrawlerAI>? allCrawlers; public List<HoarderBugAI>? allHoarders; public List<CentipedeAI>? allFlies; public List<SandSpiderAI>? allSpiders; public List<BlobAI>? allBlobs; public List<ClaySurgeonAI>? allClays; public List<ButlerBeesEnemyAI>? allBees; public List<ButlerEnemyAI>? allButlers; public List<FlowermanAI>? allBrakens; public List<JesterAI>? allJesters; public List<NutcrackerEnemyAI>? allNutcrackers; public List<SpringManAI>? allCoils; public List<StingrayAI>? allStingrays; [Header("Other Monsters")] public List<MaskedPlayerEnemy>? allMasks; public List<CadaverBloomAI>? allBlooms; private void Start() { allPlayers = new List<PlayerControllerB>(Object.FindObjectsOfType<PlayerControllerB>()); for (int i = 0; i < allPlayers.Count; i++) { playerChooseAmount.Add(10); } float waitTime = Random.Range(minTime, maxTime); ((MonoBehaviour)this).StartCoroutine(SelectPlayer(waitTime)); ((MonoBehaviour)this).StartCoroutine(ChangeScene()); } private void Update() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) glowBugs.transform.position = ((Component)allPlayers[targetPlayer]).gameObject.transform.position; if (!allPlayers[targetPlayer].isInsideFactory) { for (int i = 0; i < allHawks.Count; i++) { ((EnemyAI)allHawks[i]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allHawks[i]).movingTowardsTargetPlayer = true; } for (int j = 0; j < alldogs.Count; j++) { ((EnemyAI)alldogs[j]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)alldogs[j]).movingTowardsTargetPlayer = true; } for (int k = 0; k < allGiants.Count; k++) { ((EnemyAI)allGiants[k]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allGiants[k]).movingTowardsTargetPlayer = true; } for (int l = 0; l < allWorms.Count; l++) { ((EnemyAI)allWorms[l]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allWorms[l]).movingTowardsTargetPlayer = true; } for (int m = 0; m < allMechs.Count; m++) { ((EnemyAI)allMechs[m]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allMechs[m]).movingTowardsTargetPlayer = true; } for (int n = 0; n < allCats.Count; n++) { ((EnemyAI)allCats[n]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allCats[n]).movingTowardsTargetPlayer = true; } for (int num = 0; num < foxAI.Count; num++) { ((EnemyAI)foxAI[num]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)foxAI[num]).movingTowardsTargetPlayer = true; } for (int num2 = 0; num2 < birdAI.Count; num2++) { ((EnemyAI)birdAI[num2]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)birdAI[num2]).movingTowardsTargetPlayer = true; } } else { for (int num3 = 0; num3 < allBees.Count; num3++) { ((EnemyAI)allBees[num3]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBees[num3]).movingTowardsTargetPlayer = true; } for (int num4 = 0; num4 < allButlers.Count; num4++) { ((EnemyAI)allButlers[num4]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allButlers[num4]).movingTowardsTargetPlayer = true; } for (int num5 = 0; num5 < allBrakens.Count; num5++) { ((EnemyAI)allBrakens[num5]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBrakens[num5]).movingTowardsTargetPlayer = true; } for (int num6 = 0; num6 < allFlies.Count; num6++) { ((EnemyAI)allFlies[num6]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allFlies[num6]).movingTowardsTargetPlayer = true; } for (int num7 = 0; num7 < allCrawlers.Count; num7++) { ((EnemyAI)allCrawlers[num7]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allCrawlers[num7]).movingTowardsTargetPlayer = true; } for (int num8 = 0; num8 < allClays.Count; num8++) { ((EnemyAI)allClays[num8]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allClays[num8]).movingTowardsTargetPlayer = true; } for (int num9 = 0; num9 < allCoils.Count; num9++) { ((EnemyAI)allCoils[num9]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allCoils[num9]).movingTowardsTargetPlayer = true; } for (int num10 = 0; num10 < allBlobs.Count; num10++) { ((EnemyAI)allBlobs[num10]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBlobs[num10]).movingTowardsTargetPlayer = true; } for (int num11 = 0; num11 < allSpiders.Count; num11++) { ((EnemyAI)allSpiders[num11]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allSpiders[num11]).movingTowardsTargetPlayer = true; } for (int num12 = 0; num12 < allHoarders.Count; num12++) { ((EnemyAI)allHoarders[num12]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allHoarders[num12]).movingTowardsTargetPlayer = true; } for (int num13 = 0; num13 < allNutcrackers.Count; num13++) { ((EnemyAI)allNutcrackers[num13]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allNutcrackers[num13]).movingTowardsTargetPlayer = true; } for (int num14 = 0; num14 < allJesters.Count; num14++) { ((EnemyAI)allJesters[num14]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allJesters[num14]).movingTowardsTargetPlayer = true; } for (int num15 = 0; num15 < allStingrays.Count; num15++) { ((EnemyAI)allStingrays[num15]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allStingrays[num15]).movingTowardsTargetPlayer = true; } } for (int num16 = 0; num16 < allMasks.Count; num16++) { ((EnemyAI)allMasks[num16]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allMasks[num16]).movingTowardsTargetPlayer = true; } for (int num17 = 0; num17 < allBlooms.Count; num17++) { if (((EnemyAI)allBlooms[num17]).isOutside && !allPlayers[targetPlayer].isInsideFactory) { ((EnemyAI)allBlooms[num17]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBlooms[num17]).movingTowardsTargetPlayer = true; } else if (!((EnemyAI)allBlooms[num17]).isOutside && allPlayers[targetPlayer].isInsideFactory) { ((EnemyAI)allBlooms[num17]).targetPlayer = allPlayers[targetPlayer]; ((EnemyAI)allBlooms[num17]).movingTowardsTargetPlayer = true; } } } public IEnumerator SelectPlayer(float WaitTime) { playerChooseAmount.Clear(); for (int i = 0; i < allPlayers.Count; i++) { int amount = 10; if (!allPlayers[i].isPlayerControlled) { playerChooseAmount.Add(0); continue; } if (allPlayers[i].isInsideFactory) { amount += 10; } if (allPlayers[i].insanityLevel > 20f) { amount += 20; } if (allPlayers[i].isSprinting) { amount += 5; } if (targetPlayer == i) { amount -= 20; } amount += Mathf.RoundToInt(Mathf.Clamp((float)(100 - allPlayers[i].health) / 4.5f, 0f, 20f)); playerChooseAmount.Add(Mathf.RoundToInt(Mathf.Clamp((float)amount, 0f, float.PositiveInfinity))); } int totalAmount = 0; for (int j = 0; j < allPlayers.Count; j++) { totalAmount += playerChooseAmount[j]; } int randomNum = Random.Range(0, totalAmount); int trackingNum = 0; for (int k = 0; k < allPlayers.Count; k++) { trackingNum += playerChooseAmount[k]; if (randomNum < trackingNum) { targetPlayer = k; break; } } if (allPlayers[targetPlayer].isInHangarShipRoom) { WaitTime /= 2f; } allHawks.Clear(); allHawks = new List<BaboonBirdAI>(Object.FindObjectsOfType<BaboonBirdAI>()); alldogs.Clear(); alldogs = new List<MouthDogAI>(Object.FindObjectsOfType<MouthDogAI>()); allGiants.Clear(); allGiants = new List<ForestGiantAI>(Object.FindObjectsOfType<ForestGiantAI>()); allCats.Clear(); allCats = new List<PumaAI>(Object.FindObjectsOfType<PumaAI>()); birdAI.Clear(); birdAI = new List<GiantKiwiAI>(Object.FindObjectsOfType<GiantKiwiAI>()); allMechs.Clear(); allMechs = new List<RadMechAI>(Object.FindObjectsOfType<RadMechAI>()); foxAI.Clear(); foxAI = new List<BushWolfEnemy>(Object.FindObjectsOfType<BushWolfEnemy>()); allWorms.Clear(); allWorms = new List<SandWormAI>(Object.FindObjectsOfType<SandWormAI>()); allBlobs.Clear(); allBlobs = new List<BlobAI>(Object.FindObjectsOfType<BlobAI>()); allBees.Clear(); allBees = new List<ButlerBeesEnemyAI>(Object.FindObjectsOfType<ButlerBeesEnemyAI>()); allButlers.Clear(); allButlers = new List<ButlerEnemyAI>(Object.FindObjectsOfType<ButlerEnemyAI>()); allBrakens.Clear(); allBrakens = new List<FlowermanAI>(Object.FindObjectsOfType<FlowermanAI>()); allClays.Clear(); allClays = new List<ClaySurgeonAI>(Object.FindObjectsOfType<ClaySurgeonAI>()); allCoils.Clear(); allCoils = new List<SpringManAI>(Object.FindObjectsOfType<SpringManAI>()); allCrawlers.Clear(); allCrawlers = new List<CrawlerAI>(Object.FindObjectsOfType<CrawlerAI>()); allFlies.Clear(); allFlies = new List<CentipedeAI>(Object.FindObjectsOfType<CentipedeAI>()); allHoarders.Clear(); allHoarders = new List<HoarderBugAI>(Object.FindObjectsOfType<HoarderBugAI>()); allJesters.Clear(); allJesters = new List<JesterAI>(Object.FindObjectsOfType<JesterAI>()); allNutcrackers.Clear(); allNutcrackers = new List<NutcrackerEnemyAI>(Object.FindObjectsOfType<NutcrackerEnemyAI>()); allSpiders.Clear(); allSpiders = new List<SandSpiderAI>(Object.FindObjectsOfType<SandSpiderAI>()); allStingrays.Clear(); allStingrays = new List<StingrayAI>(Object.FindObjectsOfType<StingrayAI>()); allMasks.Clear(); allMasks = new List<MaskedPlayerEnemy>(Object.FindObjectsOfType<MaskedPlayerEnemy>()); allBlooms.Clear(); allBlooms = new List<CadaverBloomAI>(Object.FindObjectsOfType<CadaverBloomAI>()); glowBugs.transform.position = ((Component)allPlayers[targetPlayer]).gameObject.transform.position; glowBugs.transform.parent = ((Component)allPlayers[targetPlayer]).gameObject.transform; yield return (object)new WaitForSeconds(WaitTime); float time = Random.Range(minTime, maxTime); ((MonoBehaviour)this).StartCoroutine(SelectPlayer(time)); } public IEnumerator ChangeScene() { yield return (object)new WaitForSeconds(1f); oldSunLight = GameObject.Find("SunWithShadows"); if ((Object)(object)oldSunLight != (Object)null) { Object.Destroy((Object)(object)oldSunLight); _roundManager = Object.FindObjectOfType<RoundManager>(); if ((Object)(object)_roundManager != (Object)null) { RoundManager? roundManager = _roundManager; roundManager.minEnemiesToSpawn += 2; RoundManager? roundManager2 = _roundManager; roundManager2.currentMaxInsidePower += 4f; RoundManager? roundManager3 = _roundManager; roundManager3.currentMaxOutsidePower += 5f; } } else { ((MonoBehaviour)this).StartCoroutine(ChangeScene()); } } } public class FireWeather : MonoBehaviour { public GameObject? fireObj; public int minDuration; public int maxDuration; public float duration; public float minSize; public float maxSize; public float peakSize; public float currentSize; public float smallestSize; public bool hitPeakSize; public int minSpawns; public int maxSpawns; public int spawnAmount; public int amountSpawned; public List<PlayerControllerB>? allPlayers; public List<float>? allPlayerCooldowns; public int damage; public float damageTick; public Rigidbody? _rigidbody; private bool canDetectSize; public LayerMask groundLayerMask; private void Start() { allPlayers = new List<PlayerControllerB>(Object.FindObjectsOfType<PlayerControllerB>()); for (int i = 0; i < allPlayers.Count; i++) { allPlayerCooldowns.Add(0f); } maxSpawns = 4; duration = Random.Range((float)minDuration * 1f, (float)maxDuration * 1f); peakSize = Random.Range(minSize, maxSize); spawnAmount = Random.Range(minSpawns, maxSpawns); currentSize = 2f; smallestSize = 1.5f; ((MonoBehaviour)this).StartCoroutine(SpawnFlames(duration / 1.5f / (float)spawnAmount)); ((MonoBehaviour)this).StartCoroutine(RemoveFlame()); } private void Update() { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < allPlayers.Count; i++) { if (allPlayerCooldowns[i] > 0f) { allPlayerCooldowns[i] -= 1f * Time.deltaTime; if (allPlayerCooldowns[i] < 0f) { allPlayerCooldowns[i] = 0f; } } } if (!hitPeakSize) { currentSize += (peakSize - 1f) * Time.deltaTime / (duration / 2f); } else { currentSize -= (peakSize - 1f) * Time.deltaTime / (duration / 2f); } ((Component)this).transform.localScale = new Vector3(currentSize, currentSize, currentSize); if (currentSize > peakSize) { hitPeakSize = true; } if (currentSize < smallestSize && canDetectSize) { Debug.LogWarning((object)"Fire Removed Since it was too Small!"); Object.Destroy((Object)(object)((Component)this).gameObject); } if (((Component)this).transform.position.y < -60f) { Debug.LogWarning((object)"Fire Removed Since it fell under the map!"); Object.Destroy((Object)(object)((Component)this).gameObject); } } public void OnTriggerStay(Collider other) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB component = ((Component)other).GetComponent<PlayerControllerB>(); if (!((Object)(object)component != (Object)null)) { return; } int index = 0; for (int i = 0; i < allPlayers.Count; i++) { if ((Object)(object)allPlayers[i] == (Object)(object)component) { index = i; break; } } if (allPlayerCooldowns[index] <= 0f) { allPlayerCooldowns[index] = damageTick; allPlayers[index].DamagePlayer(damage, true, true, (CauseOfDeath)13, 0, false, default(Vector3)); } } public IEnumerator SpawnFlames(float separation) { yield return (object)new WaitForSeconds(separation); GameObject newFlame = Object.Instantiate<GameObject>(fireObj); newFlame.transform.position = new Vector3(((Component)this).transform.position.x + peakSize * 0.33f * (float)Random.Range(-1, 2) + Random.Range(-2f, 2f), ((Component)this).transform.position.y + 15f, ((Component)this).transform.position.z + peakSize * 0.33f * (float)Random.Range(-1, 2) + Random.Range(-2f, 2f)); Vector3 rayOrigin = new Vector3(newFlame.transform.position.x, newFlame.transform.position.y - 1f, newFlame.transform.position.z); bool hit = Physics.Raycast(rayOrigin, Vector3.down, 40f, LayerMask.op_Implicit(groundLayerMask)); Debug.DrawRay(rayOrigin, Vector3.down * 40f, Color.red); if (hit) { RaycastHit hit2 = default(RaycastHit); if (Physics.Raycast(rayOrigin, newFlame.transform.forward, ref hit2, 40f, LayerMask.op_Implicit(groundLayerMask))) { Debug.Log((object)"Placed Flame Due to Ray!"); newFlame.transform.position = new Vector3(0f, 0.9f, 0f) + ((RaycastHit)(ref hit2)).transform.position; Rigidbody flameBody = newFlame.GetComponent<Rigidbody>(); flameBody.isKinematic = true; newFlame.transform.parent = ((Component)this).transform.parent; amountSpawned++; } } else { Debug.Log((object)"Ray Failed!"); Object.Destroy((Object)(object)newFlame); } if (amountSpawned < spawnAmount) { ((MonoBehaviour)this).StartCoroutine(SpawnFlames(separation)); } } public IEnumerator RemoveFlame() { yield return (object)new WaitForSeconds(2f); List<FireWeather> allFlames = new List<FireWeather>(Object.FindObjectsOfType<FireWeather>()); for (int i = 0; i < allFlames.Count; i++) { if (!((Object)(object)allFlames[i] == (Object)null) && !((Object)(object)((Component)allFlames[i]).gameObject == (Object)(object)((Component)this).gameObject)) { Vector3 val = ((Component)this).transform.position - ((Component)allFlames[i]).transform.position; if (((Vector3)(ref val)).magnitude < allFlames[i].peakSize / 5f) { Debug.LogWarning((object)"Fire Removed Since it was too close!"); Object.Destroy((Object)(object)((Component)this).gameObject); break; } } } _rigidbody.isKinematic = true; yield return (object)new WaitForSeconds(3f); canDetectSize = true; } } } namespace legmrModSnowScript { public class SnowWeather : MonoBehaviour { public Material? snowMat; public List<PlayerControllerB>? allPlayers; public HangarShipDoor? shipDoor; public List<float>? playerColdLevels; public List<float>? playerDefaultSpeed; public List<float>? playerDefaultSprintTime; public float coldKillThreshHold = 50f; private Light? sunLight; public GameObject? oldFog = null; public MeshRenderer? meshRenderer = null; [Space(10f)] [Header("Distances to objects to feel warmth")] [SerializeField] private float distanceToShip; public float distanceToPlayer; public float distanceToHawk; public float distanceToDog; public float distanceToGiant; public float distanceToBird; public float distanceToCat; public float distanceToMech; [Space(5f)] public float warmthFromPlayer; public float warmthFromHawk; public float warmthFromDog; public float warmthFromGiant; public float warmthFromBird; public float warmthFromCat; public float warmthFromMech; [Space(8f)] public List<BaboonBirdAI>? allHawks; public List<MouthDogAI>? alldogs; public List<ForestGiantAI>? allGiants; public List<GiantKiwiAI>? birdAI; public List<PumaAI>? allCats; public List<RadMechAI>? allMechs; public List<BushWolfEnemy>? foxAI; [Header("Freezing Variables")] public int speedReductionPercentPerStep; public int stepAmount; [SerializeField] private int maxColdWait; public int damagePerCold; public float damageIncrements; public List<bool>? playerStartedFreeze; public List<float>? playerFreezeStartTimer; private void Start() { allPlayers = new List<PlayerControllerB>(Object.FindObjectsOfType<PlayerControllerB>()); shipDoor = Object.FindAnyObjectByType<HangarShipDoor>(); for (int i = 0; i < allPlayers.Count; i++) { playerColdLevels.Add(0f); playerStartedFreeze.Add(item: false); playerDefaultSpeed.Add(allPlayers[i].movementSpeed); playerFreezeStartTimer.Add(maxColdWait); playerDefaultSprintTime.Add(allPlayers[i].sprintTime); } ((MonoBehaviour)this).StartCoroutine(ChangeScene()); ((MonoBehaviour)this).StartCoroutine(SearchForMobs()); } public void ChangeTerrain() { meshRenderer = GameObject.Find("terrainMap").GetComponent<MeshRenderer>(); if ((Object)(object)meshRenderer != (Object)null) { ((Renderer)meshRenderer).material = snowMat; ((Component)meshRenderer).gameObject.tag = "Snow"; return; } meshRenderer = GameObject.Find("Grid.001").GetComponent<MeshRenderer>(); if ((Object)(object)meshRenderer != (Object)null) { ((Renderer)meshRenderer).material = snowMat; ((Component)meshRenderer).gameObject.tag = "Snow"; return; } meshRenderer = GameObject.Find("ArtificeTerrainCutDown").GetComponent<MeshRenderer>(); if ((Object)(object)meshRenderer != (Object)null) { ((Renderer)meshRenderer).material = snowMat; ((Component)meshRenderer).gameObject.tag = "Snow"; } } private void FixedUpdate() { //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: 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_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: 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_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_0549: 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_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) bool flag = false; for (int i = 0; i < allPlayers.Count; i++) { flag = false; if (!allPlayers[i].isPlayerControlled || allPlayers[i].isPlayerDead) { continue; } if (playerColdLevels[i] < 0f) { playerColdLevels[i] = 0f; } if (playerColdLevels[i] > 50f) { playerColdLevels[i] = 50f; } if (allPlayers[i].isInsideFactory) { playerColdLevels[i] -= 0.25f * Time.deltaTime; continue; } if (allPlayers[i].isInHangarShipRoom) { if (shipDoor.doorPower != 1f && shipDoor.doorPower != 0f && !shipDoor.overheated) { playerColdLevels[i] -= 3.5f * Time.deltaTime; } else { playerColdLevels[i] -= 1.5f * Time.deltaTime; } continue; } Vector3 val; for (int j = 0; j < allMechs.Count; j++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allMechs[j]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToMech) { flag = true; playerColdLevels[i] -= warmthFromMech * Time.deltaTime; break; } } int num = 0; for (int k = 0; k < allPlayers.Count; k++) { if (k != i && allPlayers[k].isPlayerDead) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allPlayers[k]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToPlayer) { num++; } } } if (num >= 1) { playerColdLevels[i] -= warmthFromPlayer * (float)num * Time.deltaTime; continue; } for (int l = 0; l < allGiants.Count; l++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allGiants[l]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToGiant) { flag = true; playerColdLevels[i] -= warmthFromGiant * Time.deltaTime; break; } } for (int m = 0; m < allCats.Count; m++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allCats[m]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToCat) { flag = true; playerColdLevels[i] -= warmthFromCat * Time.deltaTime; break; } } for (int n = 0; n < alldogs.Count; n++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)alldogs[n]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToDog) { flag = true; playerColdLevels[i] -= warmthFromDog * Time.deltaTime; break; } } for (int num2 = 0; num2 < birdAI.Count; num2++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)birdAI[num2]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToBird) { flag = true; playerColdLevels[i] -= warmthFromBird * Time.deltaTime; break; } } for (int num3 = 0; num3 < allHawks.Count; num3++) { val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)allHawks[num3]).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToHawk) { flag = true; playerColdLevels[i] -= warmthFromHawk * Time.deltaTime; break; } } if (flag) { flag = false; continue; } val = ((Component)allPlayers[i]).gameObject.transform.position - ((Component)shipDoor).gameObject.transform.position; if (((Vector3)(ref val)).magnitude < distanceToShip) { playerColdLevels[i] -= 0.1f * Time.deltaTime; } else if (!allPlayers[i].isInsideFactory) { playerColdLevels[i] += 1.5f * Time.deltaTime; } } for (int num4 = 0; num4 < allPlayers.Count; num4++) { if (!allPlayers[num4].isPlayerControlled || allPlayers[num4].isPlayerDead) { continue; } if (playerColdLevels[num4] < 0f) { playerColdLevels[num4] = 0f; } int num5 = 0; for (int num6 = Mathf.RoundToInt(playerColdLevels[num4]); num6 > 0; num6 -= stepAmount) { num5++; } allPlayers[num4].movementSpeed = Mathf.Clamp(playerDefaultSpeed[num4] - playerDefaultSpeed[num4] * ((float)speedReductionPercentPerStep / 100f) * (float)num5, playerDefaultSpeed[num4] / 2f, playerDefaultSpeed[num4]); allPlayers[num4].targetFOV = allPlayers[num4].targetFOV * Mathf.Clamp(1.5f - playerColdLevels[num4] / 30f, 0.5f, 1f); if (playerColdLevels[num4] >= coldKillThreshHold) { playerColdLevels[num4] = Mathf.Clamp(playerColdLevels[num4], 0f, 50f); allPlayers[num4].sprintTime = 0f; playerFreezeStartTimer[num4] -= 1f * Time.deltaTime; if (!playerStartedFreeze[num4] && playerFreezeStartTimer[num4] <= 0f) { playerStartedFreeze[num4] = true; ((MonoBehaviour)this).StartCoroutine(FreezePlayer(num4)); } } else { allPlayers[num4].sprintTime = playerDefaultSprintTime[num4]; } } } public IEnumerator SearchForMobs() { yield return (object)new WaitForSeconds(5f); allHawks.Clear(); allHawks = new List<BaboonBirdAI>(Object.FindObjectsOfType<BaboonBirdAI>()); for (int i = 0; i < allHawks.Count; i++) { ((EnemyAI)allHawks[i]).HitEnemy(1, (PlayerControllerB)null, false, -1); } alldogs.Clear(); alldogs = new List<MouthDogAI>(Object.FindObjectsOfType<MouthDogAI>()); for (int j = 0; j < alldogs.Count; j++) { ((EnemyAI)alldogs[j]).HitEnemy(1, (PlayerControllerB)null, false, -1); } allGiants.Clear(); allGiants = new List<ForestGiantAI>(Object.FindObjectsOfType<ForestGiantAI>()); for (int k = 0; k < allGiants.Count; k++) { ((EnemyAI)allGiants[k]).HitEnemy(1, (PlayerControllerB)null, false, -1); } allCats.Clear(); allCats = new List<PumaAI>(Object.FindObjectsOfType<PumaAI>()); for (int l = 0; l < allCats.Count; l++) { ((EnemyAI)allCats[l]).HitEnemy(1, (PlayerControllerB)null, false, -1); } birdAI.Clear(); birdAI = new List<GiantKiwiAI>(Object.FindObjectsOfType<GiantKiwiAI>()); for (int m = 0; m < birdAI.Count; m++) { ((EnemyAI)birdAI[m]).HitEnemy(1, (PlayerControllerB)null, false, -1); } foxAI.Clear(); foxAI = new List<BushWolfEnemy>(Object.FindObjectsOfType<BushWolfEnemy>()); for (int n = 0; n < foxAI.Count; n++) { ((EnemyAI)foxAI[n]).HitEnemy(1, (PlayerControllerB)null, false, -1); } allMechs.Clear(); allMechs = new List<RadMechAI>(Object.FindObjectsOfType<RadMechAI>()); ((MonoBehaviour)this).StartCoroutine(SearchForMobs()); } public IEnumerator FreezePlayer(int playerNum) { if (playerColdLevels[playerNum] >= coldKillThreshHold) { yield return (object)new WaitForSeconds(damageIncrements); allPlayers[playerNum].DamagePlayer(damagePerCold, true, true, (CauseOfDeath)5, 0, false, default(Vector3)); ((MonoBehaviour)this).StartCoroutine(FreezePlayer(playerNum)); } else { playerStartedFreeze[playerNum] = false; } } public IEnumerator ChangeScene() { yield return (object)new WaitForSeconds(1f); List<animatedSun> suns = new List<animatedSun>(Object.FindObjectsOfType<animatedSun>()); if (suns.Count > 0) { for (int i = 0; i < suns.Count; i++) { if (((Object)((Component)suns[i]).transform.parent.parent.parent).name != "LightingNew") { oldFog = ((Component)suns[i]).gameObject; } else { _ = ((Component)suns[i]).gameObject; } } if ((Object)(object)oldFog != (Object)null) { oldFog.SetActive(false); } ChangeTerrain(); } else { ((MonoBehaviour)this).StartCoroutine(ChangeScene()); } } } }
legmrModSnowScript.dll
Decompiled 2 days agousing 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] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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() { playerControlls = Object.FindObjectsOfType<PlayerControllerB>(); for (int i = 0; i < heldPlayers.Length; i++) { heldPlayers[i] = ((Component)playerControlls[i]).gameObject; } for (int j = 0; j < playerNames.Length; j++) { playerNames[j] = playerControlls[j].playerUsername; } for (int k = 0; k > playerNames.Length; k++) { playerControlls[k].movementSpeed = 4.6f + (float)playerUses[k] * 0.3f; playerControlls[k].sprintTime = 11f + (float)playerUses[k] * 0.3f; if (playerUses[k] >= 15 && !shellBegin0) { ((MonoBehaviour)this).StartCoroutine(ShellCoroutine(0)); } if (playerControlls[k].isPlayerDead) { playerUses[k] = 0; } } } private IEnumerator ShellCoroutine(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(ShellCoroutine(playerNum)); } } } public class SnowManUse : GrabbableObject { public GameObject? variablesObject; public FestiveSnowmanTracking? variablesObjectScript; public AudioSource? useSound; public int explodeNum; public GameObject? particle1; public GameObject? particle2; public GameObject? particle3; public override void ItemActivate(bool used, bool buttonDown = true) { //IL_00e4: 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) if (base.playerHeldBy.isInHangarShipRoom) { return; } useSound.PlayOneShot(useSound.clip); WalkieTalkie.TransmitOneShotAudio(useSound, useSound.clip, 0.7f); for (int i = 0; i < variablesObjectScript.playerNames.Length; i++) { if (base.playerHeldBy.playerUsername == variablesObjectScript.playerNames[i]) { variablesObjectScript.playerUses[i]++; int num = Random.Range(1, 200); if (num == explodeNum) { variablesObjectScript.playerUses[0] = 0; particle1.SetActive(true); particle2.SetActive(true); particle3.SetActive(true); SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f); ((MonoBehaviour)this).StartCoroutine(ParticleRemove()); } } } } 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); } } } public IEnumerator ParticleRemove() { yield return (object)new WaitForSeconds(5f); particle1.SetActive(false); particle2.SetActive(false); particle3.SetActive(false); } } }
LegmrtestMod.dll
Decompiled 2 days agousing 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; base.playerHeldBy.criticallyInjured = false; 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; } } } } }
HourGlassCode.dll
Decompiled 2 days agousing 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; } } }