Decompiled source of PicatinnyClamps v1.0.0

PicatinnyClamps.dll

Decompiled 2 months ago
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.PicatinnyClamps;

[BepInPlugin("cityrobo.PicatinnyClamps", "PicatinnyClamps", "1.0.0")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class PicatinnyClampsPlugin : 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.PicatinnyClamps", "", "", "picatinny_clamps", "");
	}
}
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);
			}
		}
	}
}
public class ScopeSettings : MonoBehaviour
{
	public ChromaticAberrationQuality chromaticAberrationQuality = (ChromaticAberrationQuality)0;

	public ExitPupilDifficulty exitPupilDifficulty = (ExitPupilDifficulty)1;

	public bool enableLensSurface = true;

	public ReflectionOcclusion reflectionOcclusion = (ReflectionOcclusion)0;

	public bool dualEyeStereo = true;

	public int renderTextureResolution = 1024;

	public int renderTextureAntiAliasing = 1;

	public float renderDistance = 2500f;

	public int simultaneousRenderingScopeCount = 1;

	public int recursiveScopeRenderingLimit = 1;

	public bool useParallax = true;

	public bool spectatorCameraParallaxRotationalCorrection = false;

	private void Update()
	{
		//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)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		PIPScope.chromaticAberrationQuality = chromaticAberrationQuality;
		PIPScope.exitPupilDifficulty = exitPupilDifficulty;
		PIPScope.enableLensSurface = enableLensSurface;
		PIPScope.reflectionOcclusion = reflectionOcclusion;
		PIPScope.dualEyeStereo = dualEyeStereo;
		PIPScope.renderTextureResolution = renderTextureResolution;
		PIPScope.renderTextureAntiAliasing = renderTextureAntiAliasing;
		PIPScope.simultaneousRenderingScopeCount = simultaneousRenderingScopeCount;
		PIPScope.recursiveScopeRenderingLimit = recursiveScopeRenderingLimit;
		PIPScope.renderDistance = renderDistance;
		PIPScope.useParallax = useParallax;
		PIPScope.spectatorCameraParallaxRotationalCorrection = spectatorCameraParallaxRotationalCorrection;
		PIPScope.UpdateScopeMaterials();
	}
}
public class UpdateScopePlayMode : MonoBehaviour
{
	public PIPScope Scope;

	public void Update()
	{
		if ((Object)(object)Scope != (Object)null)
		{
			Scope.UpdateParameters();
		}
	}
}