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 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.Fallout4Workstations;
[BepInPlugin("cityrobo.Fallout4Workstations", "Fallout4Workstations", "1.0.0")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class Fallout4WorkstationsPlugin : 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()
{
OtherLoader.RegisterDirectLoad(BasePath, "cityrobo.Fallout4Workstations", "", "", "fallout4workbenches", "");
}
}
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);
}
}
}
}