Decompiled source of LEDGlock17 v1.0.2

Ledglock_Plugin/Glock.dll

Decompiled 10 hours ago
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using Receiver2;
using Receiver2ModdingKit;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
[BepInPlugin("Unknown.Glock", "Glock", "1.0.0")]
public class GlockLoader : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Expected O, but got Unknown
		BepInPlugin val = (BepInPlugin)Attribute.GetCustomAttribute(typeof(GlockLoader), typeof(BepInPlugin));
		((BaseUnityPlugin)this).Logger.LogInfo((object)("Plugin " + val.GUID + " is loaded!"));
	}
}
public class GlockScript : ModGunScript
{
	public override void InitializeGun()
	{
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)((GunScript)this).loaded_cartridge_prefab != (Object)null)
		{
			ShellCasingScript component = ((GunScript)this).loaded_cartridge_prefab.GetComponent<ShellCasingScript>();
			if ((Object)(object)component != (Object)null)
			{
				ShellCasingScript val2;
				component.ammo_box_prefab = ((ShellCasingScript)ReceiverCoreScript.Instance().generic_prefabs.First((InventoryItem item) => (val2 = (ShellCasingScript)(object)((item is ShellCasingScript) ? item : null)) != null && (int)val2.cartridge_type == 0 && ((Object)val2).name != "load_progression")).ammo_box_prefab;
			}
		}
		if ((Object)(object)((GunScript)this).pooled_muzzle_flash.object_prefab == (Object)null)
		{
			GunScript val;
			((GunScript)this).pooled_muzzle_flash = ((GunScript)ReceiverCoreScript.Instance().generic_prefabs.First((InventoryItem item) => (val = (GunScript)(object)((item is GunScript) ? item : null)) != null && (int)val.gun_model == 0)).pooled_muzzle_flash;
		}
	}

	public override void AwakeGun()
	{
	}

	public override void UpdateGun()
	{
		((ModGunScript)this).UpdateAnimatedComponents();
	}

	public override void LateUpdateGun()
	{
	}
}