Decompiled source of SkyMarshal9mmRevolver v1.0.0

SkyMarshal9mmRevolver.dll

Decompiled 3 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 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]
public class UnhideObjectOnRotation : MonoBehaviour
{
	public GameObject objectToUnhide;

	public Transform targetObject;

	public float targetAngle = 90f;

	public string rotationAxis = "Z";

	private void Update()
	{
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		float num = 0f;
		switch (rotationAxis.ToUpper())
		{
		case "X":
			num = targetObject.eulerAngles.x;
			break;
		case "Y":
			num = targetObject.eulerAngles.y;
			break;
		case "Z":
			num = targetObject.eulerAngles.z;
			break;
		default:
			Debug.LogError((object)"Invalid rotation axis specified.");
			return;
		}
		if (Mathf.Abs(num - targetAngle) <= 1f && (Object)(object)objectToUnhide != (Object)null && !objectToUnhide.activeInHierarchy)
		{
			objectToUnhide.SetActive(true);
		}
	}
}
namespace Volksterism.SkyMarshal9mmRevolver;

[BepInPlugin("Volksterism.SkyMarshal9mmRevolver", "SkyMarshal9mmRevolver", "1.0.0")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class SkyMarshal9mmRevolverPlugin : 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(), "Volksterism.SkyMarshal9mmRevolver");
		OtherLoader.RegisterDirectLoad(BasePath, "Volksterism.SkyMarshal9mmRevolver", "", "", "skymarshal9mmrevolver", "");
	}
}