using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using FistVR;
using HarmonyLib;
using OtherLoader;
using UnityEngine;
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Cityrobo
{
public class FirearmEjectAndDeleteMagOnEmpty : MonoBehaviour
{
public FVRFireArm Firearm;
public bool DeleteMagazineEntirely = false;
public void Update()
{
if ((Object)(object)Firearm.Magazine != (Object)null && !Firearm.Magazine.HasARound())
{
FVRFireArmMagazine magazine = Firearm.Magazine;
Firearm.EjectMag(false);
if (DeleteMagazineEntirely)
{
Object.Destroy((Object)(object)((Component)magazine).gameObject);
}
}
}
}
}
namespace ShermanJumbo.GL21_Grenade_Launcher
{
[BepInPlugin("ShermanJumbo.GL21_Grenade_Launcher", "GL21_Grenade_Launcher", "1.0.2")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class GL21_Grenade_LauncherPlugin : BaseUnityPlugin
{
private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
internal static ManualLogSource Logger;
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
LoadAssets();
}
private void LoadAssets()
{
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "ShermanJumbo.GL21_Grenade_Launcher");
OtherLoader.RegisterDirectLoad(BasePath, "ShermanJumbo.GL21_Grenade_Launcher", "ShermanJumbo-Helldivers_2_Ammo_and_Optics-1.0.0", "", "shermanjumbo_gl21", "");
}
}
}