using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Configgy;
using HarmonyLib;
using ULTRAKILL.Cheats;
using UnityEngine;
using UnityEngine.AddressableAssets;
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("Plonk_Thundergun")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Plonk_Thundergun")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e6052792-75ce-4b67-b74d-f3f1c4bb1f5d")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Thundergun;
[BepInPlugin("plonk.thundergun", "Plonk's thundergun", "1.1.5")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Thundergun : BaseUnityPlugin
{
[HarmonyPatch]
public class BGBuff
{
[HarmonyPrefix]
[HarmonyPatch(typeof(BeamgunBeam), "FixedUpdate")]
public static bool BGBFixedUpdate(BeamgunBeam __instance)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: 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_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_0199: Expected O, but got Unknown
//IL_020b: Unknown result type (might be due to invalid IL or missing references)
//IL_022b: Unknown result type (might be due to invalid IL or missing references)
//IL_023b: Unknown result type (might be due to invalid IL or missing references)
//IL_0240: 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_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: 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_0128: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
HitterAttribute val = (HitterAttribute)0;
if (__instance.beamCheckTime > 0f)
{
__instance.beamCheckTime = Mathf.MoveTowards(__instance.beamCheckTime, 0f, Time.deltaTime * __instance.beamCheckSpeed * 15f);
}
if (__instance.beamCheckTime <= 0f)
{
__instance.beamCheckTime = 1f;
if (Object.op_Implicit((Object)(object)__instance.hitTarget))
{
if (__instance.hitTarget.eid.health < __instance.beamWidth * 0.5f && !__instance.hitTarget.eid.dead)
{
MonoSingleton<StyleHUD>.Instance.AddPoints(50, "LASER", redtcprefab, __instance.hitTarget.eid, 1, "", "-CUT");
}
__instance.hitTarget.eid.hitter = ((Object)__instance).name;
EnemyIdentifier eid = __instance.hitTarget.eid;
GameObject gameObject = ((Component)((Component)__instance.hitTarget).transform).gameObject;
Vector3 val2 = __instance.hitPosition - ((Component)__instance).transform.position;
eid.DeliverDamage(gameObject, ((Vector3)(ref val2)).normalized * 10f, __instance.hitPosition, __instance.beamWidth * 0.5f, false, __instance.beamWidth * 0.9f, redtcprefab, false);
}
}
_ = __instance.fakeStartPoint;
_ = __instance.hitPosition;
if (true)
{
if ((Object)(object)lightobj == (Object)null)
{
lightobj = new GameObject();
}
else if ((Object)(object)lightobj.GetComponent<Light>() == (Object)null)
{
lightobj.AddComponent<Light>();
}
else
{
lightobj.GetComponent<Light>().intensity = __instance.beamWidth * 20f;
lightobj.GetComponent<Light>().range = __instance.beamWidth * 100f;
lightobj.GetComponent<Light>().color = Color.red;
lightobj.transform.position = ((Component)__instance.hitParticle).transform.position + ((Component)__instance.hitParticle).transform.forward;
}
}
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(Beamgun), "Update")]
public static bool BGFixedUpdate(Beamgun __instance)
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: 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_019d: 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_0260: 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_01d5: Unknown result type (might be due to invalid IL or missing references)
//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
//IL_0331: Unknown result type (might be due to invalid IL or missing references)
//IL_0341: Unknown result type (might be due to invalid IL or missing references)
if (!MonoSingleton<InputManager>.Instance.PerformingCheatMenuCombo() && MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed && MonoSingleton<GunControl>.instance.activated)
{
if (!((Component)__instance.beam).gameObject.activeSelf)
{
((Component)__instance.beam).gameObject.SetActive(true);
}
__instance.beam.fakeStartPoint = __instance.shootPoint.position;
if (__instance.beam.beamWidth <= 0.2f)
{
__instance.beam.beamWidth = Mathf.MoveTowards(__instance.beam.beamWidth, 0.2f, Time.deltaTime / 10f);
}
if (__instance.beam.beamWidth > 0.2f)
{
__instance.beam.beamWidth = Mathf.MoveTowards(__instance.beam.beamWidth, 0.2f, Time.deltaTime / 10f);
}
__instance.beam.beamCheckSpeed = 0.5f + __instance.beam.beamWidth * 3.5f * 5f;
((Component)__instance.beam).GetComponent<LineRenderer>().startColor = new Color(1f, 0f, 0f, 1f);
((Component)__instance.beam).GetComponent<LineRenderer>().endColor = new Color(0f, 0.2f, 0.2f, 0.75f);
__instance.beam.hitParticle.startColor = new Color(0f, 0.2f, 0.2f, 0.75f);
if ((Object)(object)lasersound2 == (Object)null)
{
lasersound2 = Object.Instantiate<GameObject>(lasersound, __instance.shootPoint.position, ((Component)__instance.beam).transform.rotation, ((Component)__instance.beam).transform);
}
else
{
lasersound2.GetComponent<AudioSource>().pitch = __instance.beam.beamWidth * 5f;
lasersound2.GetComponent<Light>().intensity = __instance.beam.beamWidth * 20f;
lasersound2.GetComponent<Light>().range = __instance.beam.beamWidth * 50f;
lasersound2.GetComponent<Light>().color = Color.red;
}
}
else if (((Component)__instance.beam).gameObject.activeSelf || !MonoSingleton<GunControl>.instance.activated)
{
if (__instance.beam.beamWidth <= 0f)
{
((Component)__instance.beam).gameObject.SetActive(false);
}
else
{
__instance.beam.fakeStartPoint = __instance.shootPoint.position;
__instance.beam.beamWidth = Mathf.MoveTowards(__instance.beam.beamWidth, 0f, Time.deltaTime / 2f);
if ((Object)(object)lasersound2 == (Object)null)
{
lasersound2 = Object.Instantiate<GameObject>(lasersound, __instance.shootPoint.position, ((Component)__instance.beam).transform.rotation, ((Component)__instance.beam).transform);
}
else
{
lasersound2.GetComponent<AudioSource>().pitch = __instance.beam.beamWidth * 5f;
lasersound2.GetComponent<Light>().intensity = __instance.beam.beamWidth * 20f;
lasersound2.GetComponent<Light>().range = __instance.beam.beamWidth * 50f;
lasersound2.GetComponent<Light>().color = Color.red;
}
}
}
beamdronecd = Mathf.MoveTowards(beamdronecd, 0f, Time.deltaTime);
if (MonoSingleton<InputManager>.Instance.InputSource.Fire2.WasPerformedThisFrame && beamdronecd <= 0f)
{
BeamgunBeam beam = __instance.beam;
beam.beamWidth *= 2f;
__instance.beam.beamWidth = Mathf.Clamp(__instance.beam.beamWidth, 0f, 0.4f);
if (NoWeaponCooldown.NoCooldown)
{
beamdronecd = 0f;
}
else
{
beamdronecd = 6f;
}
}
monitor2.GetComponentInChildren<Slider>().normalizedValue = beamdronecd / 6f;
if (redfreshnessregentimer >= 30f && MonoSingleton<StyleHUD>.instance.GetFreshness(redtcprefab) < 10f)
{
MonoSingleton<StyleHUD>.instance.ResetFreshness(redtcprefab);
redfreshnessregentimer = 0f;
}
else if (!MonoSingleton<InputManager>.Instance.InputSource.Fire1.IsPressed && MonoSingleton<StyleHUD>.instance.GetFreshness(redtcprefab) < 10f)
{
redfreshnessregentimer = Mathf.MoveTowards(redfreshnessregentimer, 30f, Time.deltaTime);
}
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(WeaponPickUp), "Awake")]
public static void RemoveBGMuseumVariant(Spin __instance)
{
if (((Object)((Component)__instance).transform.GetChild(1)).name == "BeamCutter_WIP" && ((ConfigValueElement<bool>)(object)thunderctoggle).Value)
{
((Component)__instance).gameObject.SetActive(false);
}
}
[HarmonyPrefix]
[HarmonyPatch(typeof(Beamgun), "Start")]
public static void RemoveBGDuplicates(Beamgun __instance)
{
if (((Object)((Component)__instance).transform).name != "Railcannon Cutter")
{
Object.Destroy((Object)(object)((Component)__instance).gameObject);
}
}
}
[HarmonyPatch]
public class StrayModeChanges
{
[HarmonyPrefix]
[HarmonyPatch(typeof(ZombieProjectiles), "Update")]
public static void Strayignoreplayer(ZombieProjectiles __instance)
{
if ((__instance.eid.FullName == "Stray" || __instance.eid.FullName == "Soldier") && ((ConfigValueElement<bool>)(object)straymode).Value)
{
__instance.eid.attackEnemies = true;
__instance.eid.ignorePlayer = true;
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(Projectile), "OnTriggerEnter")]
public static void ProjectileStyleBonus(Projectile __instance, Collider other)
{
EnemyIdentifierIdentifier componentInParent = ((Component)other).gameObject.GetComponentInParent<EnemyIdentifierIdentifier>();
if (Object.op_Implicit((Object)(object)componentInParent) && ((Object)(object)__instance.sourceWeapon == (Object)(object)straygun || (Object)(object)__instance.sourceWeapon == (Object)(object)strayshotgun) && __instance.playerBullet && (Object)(object)componentInParent.eid != (Object)null && !componentInParent.eid.dead)
{
if ((Object)(object)__instance.sourceWeapon == (Object)(object)strayshotgun)
{
MonoSingleton<StyleHUD>.instance.AddPoints(15, "ultrakill.nailhit", __instance.sourceWeapon, ((Component)other).GetComponent<EnemyIdentifier>(), 1, "", "");
}
if ((Object)(object)__instance.sourceWeapon == (Object)(object)straygun)
{
MonoSingleton<StyleHUD>.instance.AddPoints(15, "ultrakill.shotgunhit", __instance.sourceWeapon, ((Component)other).GetComponent<EnemyIdentifier>(), 1, "", "");
}
if (__instance.explosive)
{
MonoSingleton<StyleHUD>.instance.AddPoints(15, "ultrakill.explosionhit", (GameObject)null, ((Component)other).GetComponent<EnemyIdentifier>(), 1, "EXPLODED", "");
}
}
}
[HarmonyPrefix]
[HarmonyPatch(typeof(WeaponPickUp), "GotActivated")]
public static bool assg(WeaponPickUp __instance)
{
Log("gave player a shotgun", 1);
if (((ConfigValueElement<bool>)(object)straymode).Value && ((Object)((Component)__instance).transform).name.Contains("Shotgun"))
{
MonoSingleton<PrefsManager>.Instance.SetInt("weapon.sh0", 1);
if (!SceneHelper.IsPlayingCustom)
{
GameProgressSaver.AddGear("sho0");
}
hasstrayshotgun = true;
__instance.activated = true;
Object.Destroy((Object)(object)((Component)__instance).gameObject);
return false;
}
if (((Object)((Component)__instance).transform).name.Contains("Nailgun"))
{
MonoSingleton<PrefsManager>.Instance.SetInt("weapon.nai0", 1);
if (!SceneHelper.IsPlayingCustom)
{
GameProgressSaver.AddGear("nai0");
}
hasstraynailgun = true;
__instance.activated = true;
Object.Destroy((Object)(object)((Component)__instance).gameObject);
return false;
}
return true;
}
}
[Configgable("", "Thunder cannons enabled", 0, "Enables thunder cannons.")]
private static ConfigToggle thunderctoggle = new ConfigToggle(false);
[Configgable("", "Thunder cannons slot", 0, "The slot in which thunder cannons are placed. \n Will default to 6 if the slot is assigned to more than 6.")]
private static ConfigInputField<int> tcslot = new ConfigInputField<int>(6, (Func<int, bool>)null, (Func<string, ValueTuple<bool, int>>)null);
[Configgable("", "Stray mode", 0, "Makes the player slower and have less health, \nStrips all weapons from player and replaces it with ones based on the enemies. \nNot reccomended for new players. \n*ALL WEAPONS ARE IMMEDIATELY UNLOCKED AS OF NOW*")]
private static ConfigToggle straymode = new ConfigToggle(false);
private GameObject thunderbeam;
private GameObject thunderbeam2;
private GameObject thunderbeam3;
private float thundergunchargetime = 3f;
private float ping2delay = 0.15f;
private float currenttcd;
private float currenttcc;
private float curping2delay;
private GameObject pingsnd;
private GameObject beamsnd;
private GameObject beamsnd2;
private GameObject shootsnd;
private static Transform playercam;
private bool canping = true;
private bool canping2 = false;
private GameObject beam;
private GameObject beam2;
private GameObject beam3;
private InputManager inman;
public static GameObject tcprefab;
public static GameObject tcmodel;
public static GameObject monitorobj;
public static GameObject beameffect;
public static GameObject altbeameffect;
public static GameObject beameffect2;
public static GameObject beameffect3;
public static GameObject beameffect4;
public static GameObject beamfire;
private static float rot = 360f;
public static Vector3 playerpos;
public static float inttimer;
public static float firescale;
private static Vector3 beamgunstartpos;
private static float shaketimer;
private static bool bluestylecheck;
public static GameObject greentcprefab;
public static GameObject greentcmodel;
public static GameObject grenade;
public static float greenfirerate = 0.8f;
public static float curgfr;
public static bool green_canshoot;
public static GameObject greenvisualbeam;
public static Material gvbmat;
public static MeshFilter gvbmesh;
private static float gvbrot;
private static float greenshaketimer;
private static float greenshakeamt;
private static float gtcgrenamt = 5f;
private static float gspread = 10f;
private static GameObject antenna;
private static GameObject antenna2;
private static GameObject antenna3;
private static GameObject antenna4;
private static GameObject antenna5;
private static GameObject redtcprefab;
private static GameObject redtcmodel;
private static float redshaketimer;
private static float redshakeamt;
public static GameObject monitor2;
public static GameObject lasersound;
public static GameObject lasersound2;
public static float redfreshnessregentimer;
private bool candoshit = false;
public static float straymodeshootcd;
public static float straymodeshootcharge;
public static GameObject straygun;
public static GameObject straygunchargeeffect;
public static GameObject straygunmodel;
public static GameObject strayshotgun;
public static bool hasstrayshotgun;
public static float strayshotguncd;
public static float pumpcd;
public static float strayshotgunaltcharge;
public static bool canpump1;
public static bool canpump2;
public static bool pumped;
public static bool pumped2;
public static AudioSource shotgunas;
public static float shotgundmg = 0.5f;
public static float coreforce = 250000f;
public static GameObject straysgmonitor;
public static GameObject straysgmodel;
public static float sgrot;
public static Vector3 sgpos;
public static GameObject straynailgun;
public static bool hasstraynailgun;
public static GameObject ngbeam;
public static GameObject strayngcharge;
public static GameObject strayngmodel;
public static float ngjuice = 5f;
public static float ngcharge;
public static float ngbasedmg;
public float strayngbarrelrot;
public float strayngshaketimer;
public static GameObject strayrailgun;
public static bool hasstrayrailgun;
public static GameObject strayrocketgun;
public static bool hasstrayrocketgun;
public static bool cansendhudmsg = true;
public static float beamdronecd;
public static GameObject lightobj;
public static int distancebetweenlights = 2;
public static ConfigBuilder ConfigBuilder { get; private set; }
public void Awake()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Expected O, but got Unknown
ConfigBuilder = new ConfigBuilder("plonk.thundergun", "Plonk's thundergun");
ConfigBuilder.Build();
}
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 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 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 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.thundergun");
val.PatchAll();
beamsnd = Fetch<GameObject>("Assets/Particles/Enemy Weapons/EnemyRevolverCharge.prefab");
thunderbeam = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Lighting Beam Reflected.prefab");
thunderbeam2 = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Railcannon Beam.prefab");
pingsnd = Fetch<GameObject>("Assets/Particles/SoundBubbles/WarningBeep.prefab");
shootsnd = Fetch<GameObject>("Assets/Particles/SoundBubbles/RailcannonMaliciousFire.prefab");
beameffect = Fetch<GameObject>("Assets/Particles/Spawn Effects/SpawnEffect 6.prefab");
altbeameffect = Fetch<GameObject>("Assets/Particles/FireSimple.prefab");
thunderbeam3 = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Railcannon Beam Malicious.prefab");
grenade = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Grenade.prefab");
gvbmat = Fetch<Material>("Assets/Materials/Dev/Projectile.mat");
gvbmesh = grenade.GetComponent<MeshFilter>();
antenna = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Harpoon.prefab");
lasersound = Fetch<GameObject>("Assets/Prefabs/Effects/Charge Effect.prefab");
}
public void Update()
{
//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)
if (!candoshit && SceneHelper.CurrentScene == "Main Menu")
{
candoshit = true;
}
if (candoshit && SceneHelper.CurrentScene != "Main Menu")
{
if ((Object)(object)inman == (Object)null && (Object)(object)MonoSingleton<InputManager>.Instance != (Object)null)
{
inman = MonoSingleton<InputManager>.Instance;
}
if ((Object)(object)playercam == (Object)null && (Object)(object)MonoSingleton<CameraController>.Instance != (Object)null)
{
playercam = ((Component)MonoSingleton<CameraController>.Instance).transform;
}
if ((Object)(object)MonoSingleton<PlayerMovementParenting>.Instance != (Object)null)
{
playerpos = ((Component)MonoSingleton<PlayerMovementParenting>.Instance).transform.position;
}
Straymode();
Beamgun();
}
}
private void Beamgun()
{
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_0aea: Unknown result type (might be due to invalid IL or missing references)
//IL_0d77: Unknown result type (might be due to invalid IL or missing references)
//IL_0e41: Unknown result type (might be due to invalid IL or missing references)
//IL_0e55: Unknown result type (might be due to invalid IL or missing references)
//IL_0e5a: Unknown result type (might be due to invalid IL or missing references)
//IL_0c0c: Unknown result type (might be due to invalid IL or missing references)
//IL_0c30: Unknown result type (might be due to invalid IL or missing references)
//IL_0dcc: Unknown result type (might be due to invalid IL or missing references)
//IL_0de0: Unknown result type (might be due to invalid IL or missing references)
//IL_0de5: Unknown result type (might be due to invalid IL or missing references)
//IL_0df4: Unknown result type (might be due to invalid IL or missing references)
//IL_0dfe: Unknown result type (might be due to invalid IL or missing references)
//IL_0c55: Unknown result type (might be due to invalid IL or missing references)
//IL_0bf3: Unknown result type (might be due to invalid IL or missing references)
//IL_0b5f: Unknown result type (might be due to invalid IL or missing references)
//IL_0b6e: Unknown result type (might be due to invalid IL or missing references)
//IL_0b78: Unknown result type (might be due to invalid IL or missing references)
//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
//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_0311: Unknown result type (might be due to invalid IL or missing references)
//IL_0a4b: Unknown result type (might be due to invalid IL or missing references)
//IL_0444: Unknown result type (might be due to invalid IL or missing references)
//IL_0396: Unknown result type (might be due to invalid IL or missing references)
//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
//IL_0583: Unknown result type (might be due to invalid IL or missing references)
//IL_046a: Unknown result type (might be due to invalid IL or missing references)
//IL_046f: Unknown result type (might be due to invalid IL or missing references)
//IL_0492: Unknown result type (might be due to invalid IL or missing references)
//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
//IL_050d: Unknown result type (might be due to invalid IL or missing references)
//IL_05a6: Unknown result type (might be due to invalid IL or missing references)
//IL_05ab: Unknown result type (might be due to invalid IL or missing references)
//IL_05ce: Unknown result type (might be due to invalid IL or missing references)
//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
//IL_06f0: Unknown result type (might be due to invalid IL or missing references)
//IL_07da: Unknown result type (might be due to invalid IL or missing references)
//IL_07e4: Unknown result type (might be due to invalid IL or missing references)
//IL_0873: Unknown result type (might be due to invalid IL or missing references)
//IL_087d: Unknown result type (might be due to invalid IL or missing references)
bool flag = false;
int num = Mathf.Clamp(((ConfigValueElement<int>)(object)tcslot).Value, 1, 6);
if (!flag && inman.InputSource.ChangeVariation.WasCanceledThisFrame)
{
flag = true;
rot = 390f;
}
if (flag)
{
rot = Mathf.MoveTowards(rot, 360f, Time.deltaTime * 200f);
if (rot > 359f && rot < 361f)
{
flag = false;
}
}
else
{
rot = Mathf.MoveTowards(rot, 360f, Time.deltaTime * 40f);
}
if (!((ConfigValueElement<bool>)(object)thunderctoggle).Value)
{
return;
}
((Behaviour)((Component)MonoSingleton<RailcannonMeter>.instance).GetComponent<Image>()).enabled = true;
MonoSingleton<GunControl>.instance.noWeapons = false;
for (int i = 0; i < ((Component)MonoSingleton<RailcannonMeter>.instance).transform.childCount; i++)
{
if ((Object)(object)((Component)((Component)MonoSingleton<RailcannonMeter>.instance).transform.GetChild(i)).GetComponent<Image>() != (Object)null)
{
((Behaviour)((Component)((Component)MonoSingleton<RailcannonMeter>.instance).transform.GetChild(i)).GetComponent<Image>()).enabled = true;
}
}
if ((Object)(object)tcprefab == (Object)null)
{
tcprefab = MakeBlueThundergun("Railcannon Charge", ((ConfigValueElement<int>)(object)tcslot).Value);
}
else
{
tcprefab.transform.localRotation = Quaternion.Euler(rot, 0f, 0f);
if (currenttcd >= 16f)
{
beameffect2.SetActive(true);
beameffect3.SetActive(true);
}
else
{
beameffect2.SetActive(false);
beameffect3.SetActive(false);
}
for (int j = 0; j < monitorobj.transform.GetChild(0).childCount; j++)
{
if ((Object)(object)((Component)monitorobj.transform.GetChild(0).GetChild(j)).GetComponent<Image>() != (Object)null)
{
((Behaviour)((Component)monitorobj.transform.GetChild(0).GetChild(j)).GetComponent<Image>()).enabled = false;
}
}
if (!tcprefab.activeSelf)
{
shaketimer = 0f;
}
float shakeamt = currenttcc / thundergunchargetime / 10f;
if (shaketimer <= 0f && currenttcc > 0f)
{
tcprefab.transform.localPosition = Shake(beamgunstartpos, tcprefab.transform.localPosition, shakeamt);
shaketimer = 0.1f;
}
if (currenttcc <= 0f)
{
tcprefab.transform.localPosition = beamgunstartpos;
}
shaketimer = Mathf.MoveTowards(shaketimer, 0f, Time.deltaTime * 10f);
((Component)monitorobj.transform).GetComponentInChildren<Slider>().normalizedValue = currenttcc / thundergunchargetime;
if (tcprefab.activeSelf)
{
if ((Object)(object)beamsnd2 == (Object)null)
{
beamsnd2 = Object.Instantiate<GameObject>(beamsnd, tcprefab.transform.position, playercam.rotation * Quaternion.Euler(0f, 90f, 0f), tcprefab.transform);
beamsnd2.transform.localPosition = new Vector3(1f, -1.25f, 5f);
}
else
{
beamsnd2.GetComponent<AudioSource>().pitch = currenttcc;
beamsnd2.transform.localScale = new Vector3(currenttcc / thundergunchargetime, currenttcc / thundergunchargetime, currenttcc / thundergunchargetime);
}
if ((Object)(object)beameffect4 == (Object)null)
{
beameffect4 = Object.Instantiate<GameObject>(beameffect, Vector3.zero, Quaternion.identity, tcprefab.transform);
beameffect4.transform.localPosition = Vector3.zero;
beameffect4.GetComponent<ParticleSystem>().emissionRate = 60f;
beameffect4.GetComponent<ParticleSystem>().loop = true;
((Behaviour)beameffect4.GetComponent<RemoveOnTime>()).enabled = false;
beameffect4.transform.localScale = new Vector3(0.225f, 0.225f, 0.225f);
beameffect4.transform.position = beamsnd2.transform.position;
SetLayerRecursive(beameffect4, "AlwaysOnTop");
beameffect4.GetComponent<AudioSource>().volume = 0f;
beameffect4.GetComponent<ParticleSystem>().playOnAwake = true;
}
else
{
beameffect4.transform.localScale = new Vector3(currenttcc / thundergunchargetime, currenttcc / thundergunchargetime, currenttcc / thundergunchargetime);
}
if ((Object)(object)beamfire == (Object)null)
{
beamfire = Object.Instantiate<GameObject>(altbeameffect, Vector3.zero, Quaternion.identity, tcprefab.transform);
beamfire.transform.localPosition = Vector3.zero;
beamfire.transform.position = beamsnd2.transform.position;
SetLayerRecursive(beamfire, "AlwaysOnTop");
}
else
{
if (firescale >= 0.75f)
{
firescale = Mathf.MoveTowards(firescale, 0.75f, Time.deltaTime / 4f / 2f);
}
if (firescale <= 0.75f)
{
firescale = Mathf.MoveTowards(firescale, 0f, Time.deltaTime * 0.75f / 2f);
}
if (firescale > 0f)
{
beamfire.SetActive(true);
}
else
{
beamfire.SetActive(false);
}
if (!tcprefab.activeSelf)
{
firescale = 0f;
}
beamfire.transform.localScale = new Vector3(firescale, firescale, firescale);
}
if (inman.InputSource.Fire1.IsPressed && currenttcd >= 16f)
{
currenttcc = Mathf.MoveTowards(currenttcc, thundergunchargetime, Time.deltaTime);
}
if (!inman.InputSource.Fire1.IsPressed && currenttcd >= 16f)
{
currenttcc = Mathf.MoveTowards(currenttcc, 0f, Time.deltaTime * 10f);
}
if (currenttcd >= 16f && canping)
{
MonoSingleton<StyleHUD>.Instance.SetFreshness(tcprefab, 10f);
Object.Instantiate<GameObject>(pingsnd, playercam.position, playercam.rotation, playercam);
canping = false;
canping2 = true;
curping2delay = 0f;
}
if (canping2)
{
if (curping2delay < ping2delay)
{
curping2delay = Mathf.MoveTowards(curping2delay, ping2delay, Time.deltaTime);
}
if (curping2delay >= ping2delay)
{
GameObject val = Object.Instantiate<GameObject>(pingsnd, playercam.position, playercam.rotation, playercam);
AudioSource component = val.GetComponent<AudioSource>();
component.pitch *= 1.25f;
canping2 = false;
}
}
if ((((double)currenttcc > 0.5 && inman.InputSource.Fire1.WasCanceledThisFrame) || currenttcc >= thundergunchargetime) && currenttcd >= 16f && MonoSingleton<GunControl>.instance.activated)
{
BeamGunShoot();
}
if (currenttcd < 16f)
{
currenttcc = Mathf.MoveTowards(currenttcc, 0f, Time.deltaTime * 10f);
if (!canping)
{
canping = true;
}
}
currenttcd = MonoSingleton<WeaponCharges>.Instance.raicharge * 3.2f;
if (beam.GetComponent<RevolverBeam>().hitEids != null && bluestylecheck)
{
for (int k = 0; k < beam.GetComponent<RevolverBeam>().hitEids.Count; k++)
{
MonoSingleton<StyleHUD>.Instance.AddPoints(10, "TO", tcprefab, beam.GetComponent<RevolverBeam>().hitEids[k], 1, "REDUCED ", " ATOMS");
}
bluestylecheck = false;
}
}
else
{
currenttcc = 0f;
beamsnd2.GetComponent<AudioSource>().pitch = 0f;
beamsnd2.transform.localScale = new Vector3(0f, 0f, 0f);
}
}
if ((Object)(object)greentcprefab == (Object)null)
{
greentcprefab = MakeGreenThundergun("Railcannon Cluster", ((ConfigValueElement<int>)(object)tcslot).Value);
}
else
{
if (gvbrot > 360f)
{
gvbrot -= 360f;
}
else
{
gvbrot = Mathf.MoveTowards(gvbrot, float.PositiveInfinity, Time.deltaTime * 1000f);
}
greenvisualbeam.transform.localRotation = Quaternion.Euler(0f, 270f, gvbrot);
if (!greentcprefab.activeSelf)
{
greenshaketimer = 0f;
}
if (green_canshoot)
{
greenshakeamt = 0.1f * MonoSingleton<WeaponCharges>.instance.raicharge / 5f;
if (greenshaketimer <= 0f)
{
greentcprefab.transform.localPosition = Shake(beamgunstartpos, greentcprefab.transform.localPosition, greenshakeamt);
greenshaketimer = 0.5f / MonoSingleton<WeaponCharges>.instance.raicharge;
}
greenshaketimer = Mathf.MoveTowards(greenshaketimer, 0f, Time.deltaTime * 10f);
greenvisualbeam.transform.localScale = new Vector3(0.05f * MonoSingleton<WeaponCharges>.instance.raicharge / 5f, 0.05f * MonoSingleton<WeaponCharges>.instance.raicharge / 5f, 0.15f);
}
else
{
greentcprefab.transform.localPosition = beamgunstartpos;
greenvisualbeam.transform.localScale = new Vector3(0.01f, 0.01f, 0.15f);
}
greentcprefab.transform.localRotation = Quaternion.Euler(rot, 0f, 0f);
if (inman.InputSource.Fire1.IsPressed && curgfr <= 0f && MonoSingleton<WeaponCharges>.instance.raicharge > 1f && green_canshoot && greentcprefab.activeSelf && MonoSingleton<GunControl>.instance.activated)
{
GreenBeamGunShoot();
}
curgfr = Mathf.MoveTowards(curgfr, 0f, Time.deltaTime);
if (MonoSingleton<WeaponCharges>.instance.raicharge >= 5f)
{
green_canshoot = true;
}
if ((double)MonoSingleton<WeaponCharges>.instance.raicharge <= 1.25)
{
green_canshoot = false;
}
}
if ((Object)(object)redtcprefab == (Object)null)
{
redtcprefab = MakeRedThundergun("Railcannon Cutter", ((ConfigValueElement<int>)(object)tcslot).Value);
return;
}
redtcprefab.transform.localRotation = Quaternion.Euler(rot, 0f, 0f);
if (inman.InputSource.Fire1.IsPressed)
{
redshakeamt = 0.1f;
if (redshaketimer <= 0f)
{
redtcprefab.transform.localPosition = Shake(beamgunstartpos + new Vector3(0f, 0f, 0.25f), greentcprefab.transform.localPosition, redshakeamt);
redshaketimer = 0.1f;
}
redshaketimer = Mathf.MoveTowards(redshaketimer, 0f, Time.deltaTime * 10f);
}
else
{
redtcprefab.transform.localPosition = beamgunstartpos + new Vector3(0f, 0f, 0.25f);
}
}
public static bool NameContains(string name)
{
for (int i = 0; i < MonoSingleton<GunControl>.instance.allWeapons.Count; i++)
{
if (((Object)MonoSingleton<GunControl>.instance.allWeapons[i]).name.Contains(name))
{
return true;
}
}
return false;
}
public static void Log(string log, int type)
{
switch (type)
{
case 1:
Debug.Log((object)log);
break;
case 2:
Debug.LogWarning((object)log);
break;
case 3:
Debug.LogError((object)log);
break;
}
}
private void Straymode()
{
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
//IL_0d6f: Unknown result type (might be due to invalid IL or missing references)
//IL_0d74: Unknown result type (might be due to invalid IL or missing references)
//IL_0ade: Unknown result type (might be due to invalid IL or missing references)
//IL_0570: Unknown result type (might be due to invalid IL or missing references)
//IL_057a: Unknown result type (might be due to invalid IL or missing references)
//IL_057f: Unknown result type (might be due to invalid IL or missing references)
//IL_0581: Unknown result type (might be due to invalid IL or missing references)
//IL_0586: Unknown result type (might be due to invalid IL or missing references)
//IL_0b32: Unknown result type (might be due to invalid IL or missing references)
//IL_0b3c: Unknown result type (might be due to invalid IL or missing references)
//IL_063f: 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_12a1: Unknown result type (might be due to invalid IL or missing references)
//IL_12ab: Unknown result type (might be due to invalid IL or missing references)
//IL_0e59: Unknown result type (might be due to invalid IL or missing references)
//IL_0e5e: Unknown result type (might be due to invalid IL or missing references)
//IL_0f4c: Unknown result type (might be due to invalid IL or missing references)
//IL_0f61: Unknown result type (might be due to invalid IL or missing references)
//IL_0f28: Unknown result type (might be due to invalid IL or missing references)
//IL_0f2d: Unknown result type (might be due to invalid IL or missing references)
//IL_0eda: Unknown result type (might be due to invalid IL or missing references)
//IL_0edf: Unknown result type (might be due to invalid IL or missing references)
//IL_1489: Unknown result type (might be due to invalid IL or missing references)
//IL_1352: Unknown result type (might be due to invalid IL or missing references)
//IL_135c: Unknown result type (might be due to invalid IL or missing references)
//IL_1366: Unknown result type (might be due to invalid IL or missing references)
//IL_136b: Unknown result type (might be due to invalid IL or missing references)
//IL_1375: Unknown result type (might be due to invalid IL or missing references)
//IL_137f: Unknown result type (might be due to invalid IL or missing references)
//IL_1384: Unknown result type (might be due to invalid IL or missing references)
//IL_138e: Unknown result type (might be due to invalid IL or missing references)
//IL_1398: Unknown result type (might be due to invalid IL or missing references)
//IL_139d: Unknown result type (might be due to invalid IL or missing references)
//IL_13a7: 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_0c6e: Unknown result type (might be due to invalid IL or missing references)
//IL_0cb5: Unknown result type (might be due to invalid IL or missing references)
//IL_0cca: Unknown result type (might be due to invalid IL or missing references)
//IL_0cd4: Unknown result type (might be due to invalid IL or missing references)
//IL_0cde: Unknown result type (might be due to invalid IL or missing references)
//IL_1529: Unknown result type (might be due to invalid IL or missing references)
//IL_1538: Unknown result type (might be due to invalid IL or missing references)
//IL_1542: Unknown result type (might be due to invalid IL or missing references)
//IL_15f6: Unknown result type (might be due to invalid IL or missing references)
//IL_169e: Unknown result type (might be due to invalid IL or missing references)
if (!((ConfigValueElement<bool>)(object)straymode).Value)
{
return;
}
MonoSingleton<NewMovement>.instance.walkSpeed = 600f;
MonoSingleton<NewMovement>.instance.youDiedColor = new Color(0f, 0f, 0f, 0f);
((Component)MonoSingleton<NewMovement>.instance).transform.localScale = new Vector3(1.3f, 1.3f, 1.3f);
((Component)MonoSingleton<NewMovement>.instance).GetComponent<CapsuleCollider>().radius = 0.35f;
if (MonoSingleton<NewMovement>.instance.hp > 50)
{
MonoSingleton<NewMovement>.instance.hp = 50;
}
if (MonoSingleton<NewMovement>.instance.antiHp < 50f)
{
MonoSingleton<NewMovement>.instance.antiHp = 50f;
}
if ((Object)(object)straygun == (Object)null)
{
if (MonoSingleton<GunControl>.instance.slot1.Count > 0)
{
for (int i = 0; i < MonoSingleton<GunControl>.instance.slot1.Count; i++)
{
if (!((Object)(object)MonoSingleton<GunControl>.instance.slot1[i] != (Object)(object)straygun))
{
continue;
}
for (int j = 0; j < MonoSingleton<GunControl>.instance.allWeapons.Count; j++)
{
if (NameContains("Revolver") || NameContains("Justice") || NameContains("Splendor"))
{
MonoSingleton<GunControl>.instance.slotDict.Remove(MonoSingleton<GunControl>.instance.allWeapons[j]);
MonoSingleton<StyleHUD>.instance.weaponFreshness.Remove(MonoSingleton<GunControl>.instance.allWeapons[j]);
MonoSingleton<GunControl>.instance.allWeapons.RemoveAt(j);
}
}
MonoSingleton<GunControl>.instance.slot1.RemoveAt(i);
}
}
straygun = MakeStraygun("Stray gun", 1);
}
else
{
if (MonoSingleton<GunControl>.instance.slot1.Count > 0)
{
for (int k = 0; k < MonoSingleton<GunControl>.instance.slot1.Count; k++)
{
if (!((Object)(object)MonoSingleton<GunControl>.instance.slot1[k] != (Object)(object)straygun))
{
continue;
}
for (int l = 0; l < MonoSingleton<GunControl>.instance.allWeapons.Count; l++)
{
if (NameContains("Revolver") || NameContains("Justice") || NameContains("Splendor"))
{
MonoSingleton<GunControl>.instance.slotDict.Remove(MonoSingleton<GunControl>.instance.allWeapons[l]);
MonoSingleton<StyleHUD>.instance.weaponFreshness.Remove(MonoSingleton<GunControl>.instance.allWeapons[l]);
MonoSingleton<GunControl>.instance.allWeapons.RemoveAt(l);
}
}
MonoSingleton<GunControl>.instance.slot1.RemoveAt(k);
}
}
if (straygun.activeSelf)
{
if (MonoSingleton<NewMovement>.instance.dead)
{
straymodeshootcd = 0f;
straymodeshootcharge = 0f;
}
straygun.transform.localRotation = Quaternion.Euler(390f - Mathf.Clamp(straymodeshootcharge * 180f, 0f, 90f), 0f, 0f);
straygunchargeeffect.transform.localScale = new Vector3(straymodeshootcharge * 2f, straymodeshootcharge * 2f, straymodeshootcharge * 2f);
straygunchargeeffect.GetComponent<AudioSource>().pitch = straymodeshootcharge * 4f;
if (straymodeshootcd <= 0f && MonoSingleton<GunControl>.instance.activated)
{
straygunchargeeffect.SetActive(true);
if (inman.InputSource.Fire1.IsPressed && !inman.InputSource.Fire2.IsPressed)
{
straymodeshootcharge = Mathf.MoveTowards(straymodeshootcharge, 0.5f, Time.deltaTime);
}
if (inman.InputSource.Fire2.IsPressed && !inman.InputSource.Fire1.IsPressed)
{
straymodeshootcharge = Mathf.MoveTowards(straymodeshootcharge, 0.75f, Time.deltaTime);
}
}
if (straymodeshootcharge >= 0.5f && straymodeshootcd <= 0f && inman.InputSource.Fire1.WasCanceledThisFrame)
{
Vector3 val = default(Vector3);
for (int m = 0; m < 4; m++)
{
((Vector3)(ref val))..ctor(Random.Range(-3.5f, 3.5f), Random.Range(-3.5f, 3.5f), Random.Range(-3.5f, 3.5f));
GameObject val2 = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Projectile.prefab"), playercam.position, playercam.rotation * Quaternion.Euler(val));
Projectile component = val2.GetComponent<Projectile>();
component.friendly = true;
component.playerBullet = true;
component.sourceWeapon = straygun;
component.damage /= 6f;
straymodeshootcd = 1.5f;
straygunchargeeffect.SetActive(false);
}
}
if (straymodeshootcharge >= 0.75f && straymodeshootcd <= 0f && inman.InputSource.Fire2.WasCanceledThisFrame)
{
GameObject val3 = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Projectile.prefab"), playercam.position, playercam.rotation);
Projectile component2 = val3.GetComponent<Projectile>();
component2.friendly = true;
component2.playerBullet = true;
component2.sourceWeapon = straygun;
component2.explosive = true;
component2.speed *= 2f;
component2.damage *= 4f;
component2.explosionEffect = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion.prefab");
straymodeshootcd = 2.5f;
}
}
if (straymodeshootcd > 0f)
{
straymodeshootcd = Mathf.MoveTowards(straymodeshootcd, 0f, Time.deltaTime);
straymodeshootcharge = Mathf.MoveTowards(straymodeshootcharge, 0f, Time.deltaTime * 4f);
}
else if (!inman.InputSource.Fire1.IsPressed && !inman.InputSource.Fire2.IsPressed)
{
straymodeshootcharge = Mathf.MoveTowards(straymodeshootcharge, 0f, Time.deltaTime);
}
}
if (GameProgressSaver.CheckGear("sho0") == 1 || GameProgressSaver.CheckGear("sho1") == 1 || GameProgressSaver.CheckGear("sho2") == 1 || GameProgressSaver.CheckGear("sho3") == 1)
{
if ((Object)(object)strayshotgun == (Object)null)
{
for (int n = 0; n < ((Component)MonoSingleton<GunControl>.instance).transform.childCount; n++)
{
if (!((Object)((Component)((Component)MonoSingleton<GunControl>.instance).transform.GetChild(n)).gameObject).name.Contains("Shotgun") || MonoSingleton<GunControl>.instance.slot2.Count <= 0)
{
continue;
}
for (int num = 0; num < MonoSingleton<GunControl>.instance.slot2.Count; num++)
{
if (!((Object)(object)MonoSingleton<GunControl>.instance.slot2[num] != (Object)(object)strayshotgun))
{
continue;
}
for (int num2 = 0; num2 < MonoSingleton<GunControl>.instance.allWeapons.Count; num2++)
{
if (NameContains("Shotgun") || NameContains("Crossbow"))
{
MonoSingleton<GunControl>.instance.slotDict.Remove(MonoSingleton<GunControl>.instance.allWeapons[num2]);
MonoSingleton<StyleHUD>.instance.weaponFreshness.Remove(MonoSingleton<GunControl>.instance.allWeapons[num2]);
MonoSingleton<GunControl>.instance.allWeapons.RemoveAt(num2);
}
}
MonoSingleton<GunControl>.instance.slot2.RemoveAt(num);
}
}
strayshotgun = MakeStrayShotgun("Stray Spread", 2);
}
else
{
if (MonoSingleton<GunControl>.instance.slot2.Count > 0)
{
for (int num3 = 0; num3 < MonoSingleton<GunControl>.instance.slot2.Count; num3++)
{
if (!((Object)(object)MonoSingleton<GunControl>.instance.slot2[num3] != (Object)(object)strayshotgun))
{
continue;
}
for (int num4 = 0; num4 < MonoSingleton<GunControl>.instance.allWeapons.Count; num4++)
{
if (NameContains("Shotgun") || NameContains("Crossbow"))
{
MonoSingleton<GunControl>.instance.slotDict.Remove(MonoSingleton<GunControl>.instance.allWeapons[num4]);
MonoSingleton<StyleHUD>.instance.weaponFreshness.Remove(MonoSingleton<GunControl>.instance.allWeapons[num4]);
MonoSingleton<GunControl>.instance.allWeapons.RemoveAt(num4);
}
}
MonoSingleton<GunControl>.instance.slot2.RemoveAt(num3);
}
}
if (strayshotgun.activeSelf)
{
((Component)straysgmonitor.transform).GetComponentInChildren<Slider>().normalizedValue = strayshotgunaltcharge;
((Graphic)((Component)((Component)((Component)straysgmonitor.transform).GetComponentInChildren<Slider>()).transform.GetChild(1).GetChild(0)).GetComponent<Image>()).color = new Color(strayshotgunaltcharge, 1f - strayshotgunaltcharge, 1f - strayshotgunaltcharge);
if (strayshotguncd <= 0f && inman.InputSource.Fire1.IsPressed && MonoSingleton<GunControl>.instance.activated)
{
GameObject val4 = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Projectile Spread.prefab"), playercam.position, playercam.rotation);
for (int num5 = 0; num5 < val4.transform.childCount; num5++)
{
Projectile component3 = ((Component)val4.transform.GetChild(num5)).GetComponent<Projectile>();
component3.playerBullet = true;
component3.friendly = true;
component3.damage *= shotgundmg;
component3.sourceWeapon = strayshotgun;
}
strayshotguncd = 1f;
canpump1 = true;
pumpcd = 0.4f;
}
if (strayshotguncd <= 0f && inman.InputSource.Fire2.IsPressed && MonoSingleton<GunControl>.instance.activated)
{
strayshotgunaltcharge = Mathf.MoveTowards(strayshotgunaltcharge, 1f, Time.deltaTime);
}
if (strayshotgunaltcharge > 0f && inman.InputSource.Fire2.WasCanceledThisFrame && MonoSingleton<GunControl>.instance.activated)
{
GameObject val5 = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Projectile Explosive HH.prefab"), playercam.position, playercam.rotation);
Projectile component4 = val5.GetComponent<Projectile>();
component4.playerBullet = true;
component4.friendly = true;
component4.sourceWeapon = strayshotgun;
component4.damage *= 1.5f;
component4.homingType = (HomingType)0;
Rigidbody component5 = val5.GetComponent<Rigidbody>();
component5.AddForce(playercam.forward * coreforce * strayshotgunaltcharge);
strayshotgunaltcharge = 0f;
strayshotguncd = 2f;
canpump1 = true;
pumpcd = 1.5f;
shotgunas.clip = Fetch<GameObject>("Assets/Prefabs/Weapons/Shotgun Pump.prefab").GetComponent<Shotgun>().shootSound;
shotgunas.volume = 0.5f;
shotgunas.Play();
sgrot = 380f;
}
}
else
{
sgrot = 304.0009f;
sgpos = new Vector3(0.0145f, -5.4873f, -1.92f);
shotgunas.clip = Fetch<GameObject>("Assets/Prefabs/Weapons/Shotgun Pump.prefab").GetComponent<Shotgun>().pump2sound;
strayshotguncd = 0.25f;
}
strayshotguncd = Mathf.MoveTowards(strayshotguncd, 0f, Time.deltaTime);
pumpcd = Mathf.MoveTowards(pumpcd, 0f, Time.deltaTime);
if ((canpump1 || canpump2) && pumpcd <= 0f)
{
if (canpump2)
{
canpump2 = false;
shotgunas.clip = Fetch<GameObject>("Assets/Prefabs/Weapons/Shotgun Pump.prefab").GetComponent<Shotgun>().pump2sound;
shotgunas.volume = 1f;
sgrot = 304.0009f;
sgpos = new Vector3(0.0145f, -5.4873f, -1.92f);
pumped = true;
}
if (canpump1)
{
pumped = false;
canpump1 = false;
canpump2 = true;
pumpcd = 0.35f;
shotgunas.clip = Fetch<GameObject>("Assets/Prefabs/Weapons/Shotgun Pump.prefab").GetComponent<Shotgun>().pump1sound;
shotgunas.volume = 1f;
sgrot = 323.0009f;
sgpos = new Vector3(0.0145f, -5.4873f, -2.5927f);
pumped2 = true;
}
shotgunas.Play();
}
bool flag = false;
if (strayshotguncd <= 0f)
{
pumped2 = false;
pumped = false;
sgrot = 360f;
sgpos = Vector3.zero;
}
strayshotgun.transform.localRotation = Quaternion.Euler(sgrot, 0f, 0f);
strayshotgun.transform.localPosition = sgpos;
}
}
if (GameProgressSaver.CheckGear("nai0") == 1 || GameProgressSaver.CheckGear("nai1") == 1 || GameProgressSaver.CheckGear("nai2") == 1 || GameProgressSaver.CheckGear("nai3") == 1)
{
if ((Object)(object)straynailgun == (Object)null)
{
for (int num6 = 0; num6 < ((Component)MonoSingleton<GunControl>.instance).transform.childCount; num6++)
{
if (!((Object)((Component)((Component)MonoSingleton<GunControl>.instance).transform.GetChild(num6)).gameObject).name.Contains("Nailgun") || MonoSingleton<GunControl>.instance.slot3.Count <= 0)
{
continue;
}
for (int num7 = 0; num7 < MonoSingleton<GunControl>.instance.slot2.Count; num7++)
{
if (!((Object)(object)MonoSingleton<GunControl>.instance.slot3[num7] != (Object)(object)straynailgun))
{
continue;
}
for (int num8 = 0; num8 < MonoSingleton<GunControl>.instance.allWeapons.Count; num8++)
{
if (NameContains("Nailgun"))
{
MonoSingleton<GunControl>.instance.slotDict.Remove(MonoSingleton<GunControl>.instance.allWeapons[num8]);
MonoSingleton<StyleHUD>.instance.weaponFreshness.Remove(MonoSingleton<GunControl>.instance.allWeapons[num8]);
MonoSingleton<GunControl>.instance.allWeapons.RemoveAt(num8);
}
}
MonoSingleton<GunControl>.instance.slot3.RemoveAt(num7);
}
}
straynailgun = MakeStrayNailgun("Stray Beam", 3);
strayngshaketimer = 0.1f;
}
else
{
if (ngjuice > 5f)
{
ngjuice = 5f;
}
if (MonoSingleton<GunControl>.instance.slot3.Count > 0)
{
for (int num9 = 0; num9 < MonoSingleton<GunControl>.instance.slot2.Count; num9++)
{
if (!((Object)(object)MonoSingleton<GunControl>.instance.slot3[num9] != (Object)(object)straynailgun))
{
continue;
}
for (int num10 = 0; num10 < MonoSingleton<GunControl>.instance.allWeapons.Count; num10++)
{
if (NameContains("Nailgun"))
{
MonoSingleton<GunControl>.instance.slotDict.Remove(MonoSingleton<GunControl>.instance.allWeapons[num10]);
MonoSingleton<StyleHUD>.instance.weaponFreshness.Remove(MonoSingleton<GunControl>.instance.allWeapons[num10]);
MonoSingleton<GunControl>.instance.allWeapons.RemoveAt(num10);
}
}
MonoSingleton<GunControl>.instance.slot3.RemoveAt(num9);
}
}
if ((Object)(object)strayngcharge == (Object)null)
{
strayngcharge = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Particles/SoundBubbles/ElectricChargeBubble.prefab"), playercam.position, playercam.rotation, straynailgun.transform);
strayngcharge.GetComponent<AudioSource>().playOnAwake = true;
strayngcharge.GetComponent<AudioSource>().Play();
}
else
{
strayngcharge.GetComponent<AudioSource>().pitch = 0.5f + ngjuice / 5f;
}
if (straynailgun.activeSelf && MonoSingleton<GunControl>.instance.activated)
{
if ((Object)(object)ngbeam == (Object)null)
{
ngbeam = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Mindflayer Beam.prefab"), playercam.position + playercam.forward * 0.5f + playercam.right * 0.5f + playercam.up * -0.5f, playercam.rotation, straynailgun.transform);
ContinuousBeam component6 = ngbeam.GetComponent<ContinuousBeam>();
component6.canHitPlayer = false;
component6.enemy = false;
ngbasedmg = component6.damage;
}
else
{
ngbeam.GetComponent<AudioSource>().pitch = ngcharge / 2f + ngjuice / 10f;
ngbeam.GetComponent<ContinuousBeam>().damage = ngbasedmg * (0.5f * ngcharge);
ngbeam.GetComponent<ContinuousBeam>().lr.startWidth = ngcharge;
ngbeam.GetComponent<ContinuousBeam>().lr.endWidth = ngcharge;
ngbeam.transform.GetChild(2).localScale = new Vector3(ngjuice, ngjuice, ngjuice);
if (inman.InputSource.Fire1.IsPressed)
{
if (ngjuice > 0f)
{
ngbeam.SetActive(true);
ngcharge = Mathf.MoveTowards(ngcharge, 1f, Time.deltaTime);
ngjuice = Mathf.MoveTowards(ngjuice, 0f, Time.deltaTime);
if (strayngshaketimer <= 0f)
{
straynailgun.transform.localPosition = Shake(Vector3.zero, greentcprefab.transform.localPosition, 0.1f);
strayngshaketimer = 0.1f;
}
strayngshaketimer = Mathf.MoveTowards(strayngshaketimer, 0f, Time.deltaTime * 10f);
}
else
{
ngcharge = Mathf.MoveTowards(ngcharge, 0f, Time.deltaTime * 3f);
if (ngcharge <= 0f)
{
ngbeam.SetActive(false);
}
if (!NoWeaponCooldown.NoCooldown)
{
ngjuice = Mathf.MoveTowards(ngjuice, 0f, Time.deltaTime);
}
straynailgun.transform.localPosition = Vector3.zero;
}
}
else
{
ngcharge = Mathf.MoveTowards(ngcharge, 0f, Time.deltaTime * 3f);
if (ngcharge <= 0f)
{
ngbeam.SetActive(false);
}
if (!inman.InputSource.Fire1.IsPressed && !NoWeaponCooldown.NoCooldown)
{
ngjuice = Mathf.MoveTowards(ngjuice, 5f, Time.deltaTime * 0.75f);
}
straynailgun.transform.localPosition = Vector3.zero;
}
if (NoWeaponCooldown.NoCooldown)
{
ngjuice = 5f;
}
}
}
else
{
ngjuice = Mathf.MoveTowards(ngjuice, 5f, Time.deltaTime * 0.75f);
ngbeam.SetActive(false);
strayngshaketimer = 0.1f;
if (NoWeaponCooldown.NoCooldown)
{
ngjuice = 5f;
}
}
}
}
bool flag2 = false;
if ((GameProgressSaver.CheckGear("rai0") == 1 || GameProgressSaver.CheckGear("rai1") == 1 || GameProgressSaver.CheckGear("rai2") == 1 || GameProgressSaver.CheckGear("rai3") == 1 || GameProgressSaver.CheckGear("rock0") == 1 || GameProgressSaver.CheckGear("rock1") == 1 || GameProgressSaver.CheckGear("rock2") == 1 || GameProgressSaver.CheckGear("rock3") == 1) && cansendhudmsg)
{
SendHudMessage("<color=red>Rocket launcher and Railcannon are not yet supported in straymode.</color>", 0, silent: false);
cansendhudmsg = false;
}
}
private void BeamGunShoot()
{
//IL_0039: 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_005f: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01b2: Expected O, but got Unknown
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_0225: Unknown result type (might be due to invalid IL or missing references)
//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
//IL_0335: Unknown result type (might be due to invalid IL or missing references)
//IL_033f: Expected O, but got Unknown
MonoSingleton<WeaponCharges>.instance.raicharge = 0f;
rot = 360f - 40f * (currenttcc / thundergunchargetime);
Object.Instantiate<GameObject>(shootsnd, playercam.position, playercam.rotation);
beam = Object.Instantiate<GameObject>(thunderbeam, tcprefab.transform.position, ((Component)playercam).transform.rotation);
beam.transform.parent = tcprefab.transform;
beam.transform.localPosition = new Vector3(0f, 0f, 1f);
beam.transform.parent = null;
beam.transform.localScale = new Vector3(18f * (currenttcc / thundergunchargetime), 18f * (currenttcc / thundergunchargetime), 18f * (currenttcc / thundergunchargetime));
RevolverBeam component = beam.GetComponent<RevolverBeam>();
component.damage *= 0f;
((Component)beam.transform.GetChild(1)).GetComponent<LineRenderer>().startWidth = currenttcc / thundergunchargetime * 30f;
((Component)beam.transform.GetChild(1)).GetComponent<LineRenderer>().endWidth = currenttcc / thundergunchargetime * 30f;
beam.GetComponent<RevolverBeam>().hitParticle = new AssetReference("Assets/Particles/Spawn Effects/SpawnEffect.prefab");
beam2 = Object.Instantiate<GameObject>(thunderbeam2, tcprefab.transform.position, ((Component)playercam).transform.rotation);
beam2.transform.localScale = new Vector3(18f * (currenttcc / thundergunchargetime), 18f * (currenttcc / thundergunchargetime), 18f * (currenttcc / thundergunchargetime));
RevolverBeam component2 = beam2.GetComponent<RevolverBeam>();
component2.damage *= 10f * (currenttcc / thundergunchargetime) / 2f;
beam2.GetComponent<RevolverBeam>().screenshakeMultiplier = 1.5f;
beam2.transform.parent = tcprefab.transform;
beam2.transform.localPosition = new Vector3(0f, 0f, 1f);
beam2.transform.parent = null;
((Component)beam2.transform.GetChild(1)).GetComponent<LineRenderer>().startWidth = currenttcc / thundergunchargetime * 30f;
((Component)beam2.transform.GetChild(1)).GetComponent<LineRenderer>().endWidth = currenttcc / thundergunchargetime * 30f;
beam2.GetComponent<RevolverBeam>().hitParticle = new AssetReference("Assets/Particles/Spawn Effects/SpawnEffect.prefab");
beam.GetComponent<RevolverBeam>().sourceWeapon = tcprefab;
beam2.GetComponent<RevolverBeam>().sourceWeapon = tcprefab;
MonoSingleton<CameraController>.Instance.CameraShake(3f);
MonoSingleton<RumbleManager>.Instance.SetVibration(RumbleProperties.GunFireStrong);
firescale = 1f;
bluestylecheck = true;
shaketimer = 0f;
greenshaketimer = 0f;
redshaketimer = 0f;
if (NoWeaponCooldown.NoCooldown)
{
currenttcc = 0f;
}
}
private void GreenBeamGunShoot()
{
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: 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_00b4: 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_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0111: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
rot = 330f;
curgfr = greenfirerate;
float raicharge = MonoSingleton<WeaponCharges>.instance.raicharge;
MonoSingleton<WeaponCharges>.instance.raicharge = 0f;
if (raicharge == 5f)
{
WeaponCharges instance = MonoSingleton<WeaponCharges>.instance;
instance.raicharge += raicharge - 1.25f;
}
else
{
WeaponCharges instance2 = MonoSingleton<WeaponCharges>.instance;
instance2.raicharge += raicharge - 1f;
}
for (int i = 0; (float)i < gtcgrenamt; i++)
{
GameObject val = Object.Instantiate<GameObject>(grenade, playercam.position + playercam.forward, playercam.rotation);
val.transform.rotation = playercam.rotation * Quaternion.Euler(Random.Range(0f - gspread, gspread), Random.Range(0f - gspread, gspread), Random.Range(0f - gspread, gspread));
val.GetComponent<Rigidbody>().AddForce(val.transform.forward * 10000f);
val.GetComponent<Grenade>().explosion = Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Malicious Railcannon.prefab");
Grenade component = val.GetComponent<Grenade>();
component.totalDamageMultiplier *= (0.75f + raicharge / 5f) / gtcgrenamt;
val.GetComponent<Grenade>().sourceWeapon = greentcprefab;
MonoSingleton<GrenadeList>.instance.AddGrenade(val.GetComponent<Grenade>());
}
GameObject val2 = Object.Instantiate<GameObject>(shootsnd, playercam.position, playercam.rotation, playercam);
MonoSingleton<CameraController>.Instance.CameraShake(1f);
MonoSingleton<RumbleManager>.Instance.SetVibration(RumbleProperties.GunFireStrong);
shaketimer = 0f;
greenshaketimer = 0f;
redshaketimer = 0f;
}
public static GameObject MakeStraygun(string name, int slot)
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: 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_0176: Unknown result type (might be due to invalid IL or missing references)
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
slot = Mathf.Clamp(slot, 1, 6);
GameObject val = new GameObject();
val.transform.parent = ((Component)MonoSingleton<GunControl>.Instance).transform;
val.transform.position = ((Component)MonoSingleton<GunControl>.Instance).transform.position;
val.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
MonoSingleton<GunControl>.Instance.slot1.Add(val);
MonoSingleton<GunControl>.Instance.allWeapons.Add(val);
MonoSingleton<GunControl>.Instance.slotDict.Add(val, slot - 1);
((Object)val).name = name;
if ((Object)(object)val.GetComponent<WeaponIcon>() == (Object)null)
{
val.AddComponent<WeaponIcon>();
}
if ((Object)(object)val.GetComponent<WeaponIdentifier>() == (Object)null)
{
val.AddComponent<WeaponIdentifier>();
}
val.GetComponent<WeaponIcon>().weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>();
val.GetComponent<WeaponIcon>().weaponDescriptor.weaponName = name;
val.GetComponent<WeaponIcon>().weaponDescriptor.icon = Fetch<Sprite>("Assets/Textures/UI/SpawnerArm.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.glowIcon = Fetch<Sprite>("Assets/Textures/UI/SpawnerArm.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.variationColor = (WeaponVariant)2;
SetLayerRecursive(val, "AlwaysOnTop");
straygunchargeeffect = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Attacks and Projectiles/Projectile Decorative.prefab"), playercam.position + playercam.right + playercam.forward * 1.5f, playercam.rotation, val.transform);
((Behaviour)straygunchargeeffect.GetComponent<Projectile>()).enabled = false;
((Behaviour)straygunchargeeffect.GetComponent<DestroyOnCheckpointRestart>()).enabled = false;
((Behaviour)straygunchargeeffect.GetComponentInChildren<Breakable>()).enabled = false;
for (int i = 0; i < straygunchargeeffect.transform.childCount; i++)
{
((Component)straygunchargeeffect.transform.GetChild(i)).tag = "Untagged";
}
((Component)straygunchargeeffect.transform).tag = "Untagged";
((Behaviour)((Component)straygunchargeeffect.transform.GetChild(0)).GetComponent<AudioSource>()).enabled = false;
straygunchargeeffect.GetComponent<AudioSource>().playOnAwake = true;
straygunchargeeffect.GetComponent<AudioSource>().Play();
((Collider)straygunchargeeffect.GetComponentInChildren<SphereCollider>()).enabled = false;
SetLayerRecursive(straygunchargeeffect, "AlwaysOnTop");
MonoSingleton<StyleHUD>.Instance.weaponFreshness.Add(val, 10f);
val.SetActive(false);
MonoSingleton<GunControl>.Instance.ForceWeapon(val, true);
return val;
}
public static GameObject MakeStrayShotgun(string name, int slot)
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: Unknown result type (might be due to invalid IL or missing references)
//IL_0152: Expected O, but got Unknown
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_0211: Unknown result type (might be due to invalid IL or missing references)
//IL_021b: Unknown result type (might be due to invalid IL or missing references)
//IL_0249: Unknown result type (might be due to invalid IL or missing references)
slot = Mathf.Clamp(slot, 1, 6);
GameObject val = new GameObject();
val.transform.parent = ((Component)MonoSingleton<GunControl>.Instance).transform;
val.transform.position = ((Component)MonoSingleton<GunControl>.Instance).transform.position;
val.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
MonoSingleton<GunControl>.Instance.slot2.Add(val);
MonoSingleton<GunControl>.Instance.allWeapons.Add(val);
MonoSingleton<GunControl>.Instance.slotDict.Add(val, slot - 1);
((Object)val).name = name;
if ((Object)(object)val.GetComponent<WeaponIcon>() == (Object)null)
{
val.AddComponent<WeaponIcon>();
}
if ((Object)(object)val.GetComponent<WeaponIdentifier>() == (Object)null)
{
val.AddComponent<WeaponIdentifier>();
}
val.GetComponent<WeaponIcon>().weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>();
val.GetComponent<WeaponIcon>().weaponDescriptor.weaponName = name;
val.GetComponent<WeaponIcon>().weaponDescriptor.icon = Fetch<Sprite>("Assets/Textures/UI/ShotgunGlow.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.glowIcon = Fetch<Sprite>("Assets/Textures/UI/ShotgunGlow.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.variationColor = (WeaponVariant)0;
val.AddComponent<AudioSource>();
shotgunas = val.GetComponent<AudioSource>();
GameObject val2 = new GameObject();
GameObject val3 = Fetch<GameObject>("Assets/Prefabs/Weapons/Components/Shotgun Screen Canvas.prefab");
straysgmonitor = Object.Instantiate<GameObject>(val3, val2.transform.position, val2.transform.rotation, val2.transform);
val2.transform.parent = val.transform;
val2.transform.localPosition = new Vector3(2.0319f, -2.6515f, 4.343f);
val2.transform.localRotation = Quaternion.Euler(16.0711f, 90f, 0f);
val2.transform.localScale = new Vector3(0.0322f, 0.04f, 0.04f);
SetLayerRecursive(val2, "AlwaysOnTop");
straysgmodel = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Models/Weapons/EnemyShotgun.fbx"), playercam.position, playercam.rotation, val.transform);
straysgmodel.transform.localPosition = new Vector3(3.1807f, -3.3296f, 7.8506f);
SetLayerRecursive(straysgmodel, "AlwaysOnTop");
SetLayerRecursive(straysgmodel, "AlwaysOnTop");
SetLayerRecursive(val, "AlwaysOnTop");
MonoSingleton<StyleHUD>.instance.weaponFreshness.Add(val, 10f);
val.SetActive(false);
MonoSingleton<GunControl>.Instance.ForceWeapon(val, true);
return val;
}
public static GameObject MakeStrayNailgun(string name, int slot)
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
slot = Mathf.Clamp(slot, 1, 6);
GameObject val = new GameObject();
val.transform.parent = ((Component)MonoSingleton<GunControl>.Instance).transform;
val.transform.position = ((Component)MonoSingleton<GunControl>.Instance).transform.position;
val.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
MonoSingleton<GunControl>.Instance.slot3.Add(val);
MonoSingleton<GunControl>.Instance.allWeapons.Add(val);
MonoSingleton<GunControl>.Instance.slotDict.Add(val, slot - 1);
((Object)val).name = name;
if ((Object)(object)val.GetComponent<WeaponIcon>() == (Object)null)
{
val.AddComponent<WeaponIcon>();
}
if ((Object)(object)val.GetComponent<WeaponIdentifier>() == (Object)null)
{
val.AddComponent<WeaponIdentifier>();
}
val.GetComponent<WeaponIcon>().weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>();
val.GetComponent<WeaponIcon>().weaponDescriptor.weaponName = name;
val.GetComponent<WeaponIcon>().weaponDescriptor.icon = Fetch<Sprite>("Assets/Textures/UI/NailgunGlow2.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.glowIcon = Fetch<Sprite>("Assets/Textures/UI/NailgunGlow2.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.variationColor = (WeaponVariant)0;
val.AddComponent<AudioSource>();
SetLayerRecursive(val, "AlwaysOnTop");
strayngmodel = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Models/Weapons/Nailgun/Old/NailgunFinal 2.fbx"), playercam.position, playercam.rotation, val.transform);
strayngmodel.transform.localPosition = new Vector3(0.4541f, -0.476f, 0.6984f);
strayngmodel.transform.localScale = new Vector3(1.25f, 1.25f, 1.25f);
SetLayerRecursive(strayngmodel, "AlwaysOnTop");
MonoSingleton<StyleHUD>.Instance.weaponFreshness.Add(val, 10f);
val.SetActive(false);
MonoSingleton<GunControl>.Instance.ForceWeapon(val, true);
return val;
}
public static GameObject MakeBlueThundergun(string name, int slot)
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0184: Unknown result type (might be due to invalid IL or missing references)
//IL_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
//IL_021f: 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_0245: Expected O, but got Unknown
//IL_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_026c: Unknown result type (might be due to invalid IL or missing references)
//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0312: Unknown result type (might be due to invalid IL or missing references)
//IL_0332: Unknown result type (might be due to invalid IL or missing references)
//IL_0352: Unknown result type (might be due to invalid IL or missing references)
//IL_0362: Unknown result type (might be due to invalid IL or missing references)
//IL_0367: Unknown result type (might be due to invalid IL or missing references)
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
//IL_041a: Unknown result type (might be due to invalid IL or missing references)
//IL_044f: Unknown result type (might be due to invalid IL or missing references)
//IL_0454: Unknown result type (might be due to invalid IL or missing references)
//IL_0477: Unknown result type (might be due to invalid IL or missing references)
//IL_04e3: 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_053d: Unknown result type (might be due to invalid IL or missing references)
//IL_0542: Unknown result type (might be due to invalid IL or missing references)
slot = Mathf.Clamp(slot, 1, 6);
GameObject val = new GameObject();
val.transform.parent = ((Component)MonoSingleton<GunControl>.Instance).transform;
val.transform.position = ((Component)MonoSingleton<GunControl>.Instance).transform.position;
val.transform.localRotation = Quaternion.Euler(rot, 0f, 0f);
if (slot <= MonoSingleton<GunControl>.Instance.slots.Count)
{
MonoSingleton<GunControl>.Instance.slots[slot - 1].Add(val);
}
MonoSingleton<GunControl>.Instance.allWeapons.Add(val);
MonoSingleton<GunControl>.Instance.slotDict.Add(val, slot - 1);
((Object)val).name = name;
if ((Object)(object)val.GetComponent<WeaponIcon>() == (Object)null)
{
val.AddComponent<WeaponIcon>();
}
if ((Object)(object)val.GetComponent<WeaponIdentifier>() == (Object)null)
{
val.AddComponent<WeaponIdentifier>();
}
MonoSingleton<StyleHUD>.Instance.weaponFreshness.Add(val, 10f);
val.GetComponent<WeaponIcon>().weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>();
val.GetComponent<WeaponIcon>().weaponDescriptor.weaponName = name;
val.GetComponent<WeaponIcon>().weaponDescriptor.icon = Fetch<Sprite>("Assets/Textures/UI/Railcannon.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.glowIcon = Fetch<Sprite>("Assets/Textures/UI/RailcannonGlow.png");
SetLayerRecursive(val, "Ignore Raycast");
GameObject val2 = Fetch<GameObject>("Assets/Models/Old/Beamcutter/BeamCutter_WIP.fbx");
tcmodel = Object.Instantiate<GameObject>(val2, val.transform.position, val.transform.rotation, val.transform);
((Renderer)tcmodel.GetComponent<MeshRenderer>()).material = Fetch<Material>("Assets/Materials/Environment/Metal/Metal Decoration 6B.mat");
tcmodel.transform.localRotation = Quaternion.Euler(270f, 90f, 0f);
tcmodel.transform.localScale = new Vector3(8f, 10f, 10f);
tcmodel.transform.localPosition = new Vector3(0.6f, -1.25f, 1.5f);
SetLayerRecursive(tcmodel, "AlwaysOnTop");
GameObject val3 = new GameObject("Monitorparent");
val3.transform.parent = tcmodel.transform;
GameObject val4 = Fetch<GameObject>("Assets/Prefabs/Weapons/Components/Shotgun Screen Canvas.prefab");
monitorobj = Object.Instantiate<GameObject>(val4, Vector3.zero, Quaternion.identity, val3.transform);
SetLayerRecursive(monitorobj, "AlwaysOnTop");
monitorobj.transform.localScale = new Vector3(0.0015f, 0.0008f, 0.002f);
monitorobj.transform.localPosition = new Vector3(0f, 0f, 0f);
monitorobj.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
val3.transform.localScale = new Vector3(0.37f, 0.87f, 0.87f);
val3.transform.localRotation = Quaternion.Euler(0f, 70f, 90f);
val3.transform.localPosition = new Vector3(0.115f, -0.002f, 0.09f);
beameffect2 = Object.Instantiate<GameObject>(beameffect, Vector3.zero, Quaternion.identity, tcmodel.transform);
beameffect2.transform.localPosition = Vector3.zero;
beameffect2.GetComponent<ParticleSystem>().emissionRate = 60f;
beameffect2.GetComponent<ParticleSystem>().loop = true;
beameffect2.GetComponent<ParticleSystem>().playOnAwake = true;
((Behaviour)beameffect2.GetComponent<RemoveOnTime>()).enabled = false;
beameffect2.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
beameffect2.transform.localPosition = new Vector3(-0.1f, 0f, 0.05f);
SetLayerRecursive(beameffect2, "AlwaysOnTop");
beameffect2.GetComponent<AudioSource>().volume = 0f;
beameffect3 = Object.Instantiate<GameObject>(beameffect, Vector3.zero, Quaternion.identity, tcmodel.transform);
beameffect3.transform.localPosition = Vector3.zero;
beameffect3.GetComponent<ParticleSystem>().emissionRate = 60f;
beameffect3.GetComponent<ParticleSystem>().loop = true;
beameffect3.GetComponent<ParticleSystem>().playOnAwake = true;
((Behaviour)beameffect3.GetComponent<RemoveOnTime>()).enabled = false;
beameffect3.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
beameffect3.transform.localPosition = new Vector3(-0.05f, 0f, 0.05f);
SetLayerRecursive(beameffect3, "AlwaysOnTop");
beameffect3.GetComponent<AudioSource>().volume = 0f;
beamgunstartpos = val.transform.localPosition;
val.SetActive(false);
return val;
}
public static GameObject instantiateantenna()
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Object.Instantiate<GameObject>(antenna, greentcmodel.transform.position, greentcmodel.transform.rotation, greentcmodel.transform);
((Behaviour)val.GetComponent<TimeBomb>()).enabled = false;
((Behaviour)val.GetComponent<AudioSource>()).enabled = false;
val.GetComponent<Rigidbody>().isKinematic = true;
((Behaviour)val.GetComponent<Harpoon>()).enabled = false;
((Collider)val.GetComponent<BoxCollider>()).enabled = false;
((Behaviour)val.GetComponentInChildren<Magnet>()).enabled = false;
((Behaviour)val.GetComponentInChildren<Breakable>()).enabled = false;
((Behaviour)val.GetComponent<Animator>()).enabled = false;
SetLayerRecursive(val, "AlwaysOnTop");
val.transform.localScale = new Vector3(0.005f, 0.005f, 0.005f);
((Component)val.transform.GetChild(3)).tag = "Untagged";
((Collider)((Component)val.transform.GetChild(3)).GetComponent<BoxCollider>()).enabled = false;
val.GetComponent<TrailRenderer>().endWidth = 0.1f;
val.GetComponent<TrailRenderer>().startWidth = 0.1f;
val.GetComponent<TrailRenderer>().startColor = new Color(1f, 0.569f, 0f, 0.7f);
return val;
}
public static GameObject MakeGreenThundergun(string name, int slot)
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_0191: Unknown result type (might be due to invalid IL or missing references)
//IL_019c: Unknown result type (might be due to invalid IL or missing references)
//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
//IL_0208: Unknown result type (might be due to invalid IL or missing references)
//IL_022c: Unknown result type (might be due to invalid IL or missing references)
//IL_024c: Unknown result type (might be due to invalid IL or missing references)
//IL_0256: Expected O, but got Unknown
//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0330: Unknown result type (might be due to invalid IL or missing references)
//IL_0354: Unknown result type (might be due to invalid IL or missing references)
//IL_0382: 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_03d4: Unknown result type (might be due to invalid IL or missing references)
//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0426: Unknown result type (might be due to invalid IL or missing references)
//IL_044a: Unknown result type (might be due to invalid IL or missing references)
slot = Mathf.Clamp(slot, 1, 6);
GameObject val = new GameObject();
val.transform.parent = ((Component)MonoSingleton<GunControl>.Instance).transform;
val.transform.position = ((Component)MonoSingleton<GunControl>.Instance).transform.position;
val.transform.localRotation = Quaternion.Euler(rot, 0f, 0f);
if (slot <= MonoSingleton<GunControl>.Instance.slots.Count)
{
MonoSingleton<GunControl>.Instance.slots[slot - 1].Add(val);
}
MonoSingleton<GunControl>.Instance.allWeapons.Add(val);
MonoSingleton<GunControl>.Instance.slotDict.Add(val, slot - 1);
((Object)val).name = name;
if ((Object)(object)val.GetComponent<WeaponIcon>() == (Object)null)
{
val.AddComponent<WeaponIcon>();
}
if ((Object)(object)val.GetComponent<WeaponIdentifier>() == (Object)null)
{
val.AddComponent<WeaponIdentifier>();
}
MonoSingleton<StyleHUD>.Instance.weaponFreshness.Add(val, 10f);
val.GetComponent<WeaponIcon>().weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>();
val.GetComponent<WeaponIcon>().weaponDescriptor.weaponName = name;
val.GetComponent<WeaponIcon>().weaponDescriptor.icon = Fetch<Sprite>("Assets/Textures/UI/railcannonmalicious.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.glowIcon = Fetch<Sprite>("Assets/Textures/UI/railcannonmalicious.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.variationColor = (WeaponVariant)1;
SetLayerRecursive(val, "Ignore Raycast");
GameObject val2 = Fetch<GameObject>("Assets/Models/Old/Beamcutter/BeamCutter_WIP.fbx");
greentcmodel = Object.Instantiate<GameObject>(val2, val.transform.position, val.transform.rotation, val.transform);
((Renderer)greentcmodel.GetComponent<MeshRenderer>()).material = Fetch<Material>("Assets/Materials/Environment/Metal/Metal Decoration 6B.mat");
greentcmodel.transform.localRotation = Quaternion.Euler(270f, 90f, 0f);
greentcmodel.transform.localScale = new Vector3(8f, 10f, 10f);
greentcmodel.transform.localPosition = new Vector3(0.6f, -1.25f, 1.5f);
SetLayerRecursive(greentcmodel, "AlwaysOnTop");
greenvisualbeam = new GameObject("GreenTCVisualBeam");
greenvisualbeam.AddComponent<MeshRenderer>();
((Renderer)greenvisualbeam.GetComponent<MeshRenderer>()).material = gvbmat;
greenvisualbeam.AddComponent<MeshFilter>();
greenvisualbeam.GetComponent<MeshFilter>().mesh = gvbmesh.mesh;
greenvisualbeam.transform.parent = greentcmodel.transform;
greenvisualbeam.transform.localPosition = new Vector3(0f, 0f, 0.052f);
greenvisualbeam.transform.localScale = new Vector3(0.05f, 0.05f, 0.15f);
SetLayerRecursive(greenvisualbeam, "AlwaysOnTop");
antenna2 = instantiateantenna();
antenna2.transform.localPosition = new Vector3(-0.0229f, 0.0845f, -0.0102f);
antenna2.transform.localRotation = Quaternion.Euler(28.0081f, 281.7161f, 1.7091f);
antenna3 = instantiateantenna();
antenna3.transform.localPosition = new Vector3(-0.0327f, 0.0889f, 0.0458f);
antenna3.transform.localRotation = Quaternion.Euler(29.1938f, 285.9551f, 0f);
antenna4 = instantiateantenna();
antenna4.transform.localPosition = new Vector3(-0.0544f, -0.1233f, -0.0055f);
antenna4.transform.localRotation = Quaternion.Euler(318.6179f, 284.7983f, 0f);
antenna5 = instantiateantenna();
antenna5.transform.localPosition = new Vector3(-0.0544f, -0.1243f, 0.0514f);
antenna5.transform.localRotation = Quaternion.Euler(318.6179f, 288.0894f, 0f);
val.SetActive(false);
return val;
}
public static GameObject MakeRedThundergun(string name, int slot)
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: 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_01df: Expected O, but got Unknown
//IL_0201: Unknown result type (might be due to invalid IL or missing references)
//IL_0206: 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_0268: Unknown result type (might be due to invalid IL or missing references)
//IL_028c: Unknown result type (might be due to invalid IL or missing references)
//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
//IL_0311: Unknown result type (might be due to invalid IL or missing references)
//IL_0355: Unknown result type (might be due to invalid IL or missing references)
//IL_0375: Unknown result type (might be due to invalid IL or missing references)
//IL_0395: Unknown result type (might be due to invalid IL or missing references)
slot = Mathf.Clamp(slot, 1, 6);
GameObject val = Object.Instantiate<GameObject>(Fetch<GameObject>("Assets/Prefabs/Weapons/Old/Beamcutter Blue.prefab"), playercam.position, playercam.rotation, playercam);
redtcmodel = ((Component)val.transform.GetChild(1)).gameObject;
((Renderer)redtcmodel.GetComponent<MeshRenderer>()).material = Fetch<Material>("Assets/Materials/Environment/Metal/Metal Decoration 6B.mat");
val.transform.parent = ((Component)MonoSingleton<GunControl>.Instance).transform;
val.transform.position = ((Component)MonoSingleton<GunControl>.Instance).transform.position;
val.transform.localRotation = Quaternion.Euler(rot, 0f, 0f);
if (slot <= MonoSingleton<GunControl>.Instance.slots.Count)
{
MonoSingleton<GunControl>.Instance.slots[slot - 1].Add(val);
}
MonoSingleton<GunControl>.Instance.allWeapons.Add(val);
MonoSingleton<GunControl>.Instance.slotDict.Add(val, slot - 1);
((Object)val).name = name;
if ((Object)(object)val.GetComponent<WeaponIcon>() == (Object)null)
{
val.AddComponent<WeaponIcon>();
}
if ((Object)(object)val.GetComponent<WeaponIdentifier>() == (Object)null)
{
val.AddComponent<WeaponIdentifier>();
}
MonoSingleton<StyleHUD>.Instance.weaponFreshness.Add(val, 10f);
val.GetComponent<WeaponIcon>().weaponDescriptor = ScriptableObject.CreateInstance<WeaponDescriptor>();
val.GetComponent<WeaponIcon>().weaponDescriptor.weaponName = name;
val.GetComponent<WeaponIcon>().weaponDescriptor.icon = Fetch<Sprite>("Assets/Textures/UI/railcannonscrew.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.glowIcon = Fetch<Sprite>("Assets/Textures/UI/railcannonscrewglow.png");
val.GetComponent<WeaponIcon>().weaponDescriptor.variationColor = (WeaponVariant)2;
SetLayerRecursive(val, "AlwaysOnTop");
GameObject val2 = new GameObject("Monitorparent");
val2.transform.parent = redtcmodel.transform;
GameObject val3 = Fetch<GameObject>("Assets/Prefabs/Weapons/Components/Shotgun Screen Canvas.prefab");
monitor2 = Object.Instantiate<GameObject>(val3, Vector3.zero, Quaternion.identity, val2.transform);
SetLayerRecursive(monitorobj, "AlwaysOnTop");
monitor2.transform.localScale = new Vector3(0.0015f, 0.0008f, 0.002f);
monitor2.transform.localPosition = new Vector3(0f, 0f, 0f);
monitor2.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
monitor2.GetComponentInChildren<Slider>().m_Direction = (Direction)1;
((Component)((Component)monitor2.GetComponentInChildren<Slider>()).transform.GetChild(1)).GetComponentInChildren<Image>().m_Type = (Type)3;
((Component)((Component)monitor2.GetComponentInChildren<Slider>()).transform.GetChild(1)).GetComponentInChildren<Image>().m_PreserveAspect = true;
((Component)monitor2.GetComponentInChildren<Slider>()).transform.GetChild(1).GetChild(0).localScale = new Vector3(1.52f, 1f, 1f);
monitor2.GetComponentInChildren<Slider>().m_MaxValue = 8f;
monitor2.GetComponentInChildren<Slider>().m_WholeNumbers = true;
val2.transform.localScale = new Vector3(0.37f, 0.87f, 0.87f);
val2.transform.localRotation = Quaternion.Euler(0f, 70f, 90f);
val2.transform.localPosition = new Vector3(0.115f, -0.002f, 0.09f);
for (int i = 0; i < monitor2.transform.GetChild(0).childCount; i++)
{
if (i > 0)
{
((Behaviour)((Component)monitor2.transform.GetChild(0).GetChild(i)).GetComponent<Image>()).enabled = false;
}
}
MonoSingleton<StyleHUD>.Instance.UpdateItems();
val.SetActive(false);
return val;
}
}