using System.Collections;
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]
[BepInPlugin("MeatKit", "MeatKit Plugin", "1.0.0")]
[BepInProcess("h3vr.exe")]
public class MeatKitPlugin : 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()
{
}
}
public class ProjectileExtractor : MonoBehaviour
{
public FVRFireArmRound Round;
public BallisticProjectile Projectile;
[ContextMenu("Extract")]
public void Extract()
{
if ((Object)(object)Round != (Object)null && (Object)(object)Projectile == (Object)null)
{
Projectile = Object.Instantiate<GameObject>(Round.BallisticProjectilePrefab).GetComponent<BallisticProjectile>();
}
if ((Object)(object)Projectile.ExtraDisplay != (Object)null)
{
Object.Instantiate<GameObject>(Projectile.ExtraDisplay);
}
foreach (Submunition submunition in Projectile.Submunitions)
{
foreach (GameObject prefab in submunition.Prefabs)
{
Object.Instantiate<GameObject>(prefab);
}
}
}
}
namespace cityrobo.ExtendedBergmannMagazines;
[BepInPlugin("cityrobo.ExtendedBergmannMagazines", "ExtendedBergmannMagazines", "1.0.0")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class ExtendedBergmannMagazinesPlugin : BaseUnityPlugin
{
private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
internal static ManualLogSource Logger;
private const string QUADSTACK_ID = "cityrobo.ModernizedBergMagQuad";
private const string DRUM_ID = "cityrobo.ModernizedBergMagDrum";
private const string BERGMANN_STANDARD_ID = "NW.ModernizedBergmann(Steel)";
private const string BERGMANN_HARDENED_ID = "NW.ModernizedBergmann";
private const string BERGMANN_BLACK_ID = "NW.ModernizedBergmann(Black)";
private const string BERGMANN_TAC_ID = "NW.ModernizedBergmann(Tac)";
private const string BERGMANN_AUTO_ID = "NW.ModernizedBergmannMachinePistol";
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
LoadAssets();
((MonoBehaviour)this).StartCoroutine(WaitForOtherloader());
}
private IEnumerator WaitForOtherloader()
{
while (LoaderStatus.GetLoaderProgress() != 1f)
{
yield return null;
}
ItemSpawnerEntry currentISEtoEdit5 = OtherLoader.SpawnerEntriesByID["NW.ModernizedBergmann(Steel)"];
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagQuad");
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagDrum");
currentISEtoEdit5 = OtherLoader.SpawnerEntriesByID["NW.ModernizedBergmann"];
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagQuad");
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagDrum");
currentISEtoEdit5 = OtherLoader.SpawnerEntriesByID["NW.ModernizedBergmann(Black)"];
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagQuad");
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagDrum");
currentISEtoEdit5 = OtherLoader.SpawnerEntriesByID["NW.ModernizedBergmann(Tac)"];
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagQuad");
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagDrum");
currentISEtoEdit5 = OtherLoader.SpawnerEntriesByID["NW.ModernizedBergmannMachinePistol"];
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagQuad");
currentISEtoEdit5.SecondaryObjectIDs.Add("cityrobo.ModernizedBergMagDrum");
FVRObject correctObjectWrapper = IM.OD["NW.ModernizedBergmannMachinePistol"];
GameObject prefab = ((AnvilAsset)correctObjectWrapper).GetGameObject();
prefab.GetComponent<FVRPhysicalObject>().ObjectWrapper = correctObjectWrapper;
}
private void LoadAssets()
{
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "cityrobo.ExtendedBergmannMagazines");
OtherLoader.RegisterDirectLoad(BasePath, "cityrobo.ExtendedBergmannMagazines", "", "", "cityrobo_extended_berg_mags", "");
}
}