Decompiled source of ModulBasilisk v1.1.0

ModulBasilisk.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 FistVR;
using OpenScripts2;
using OtherLoader;
using Sodalite.Api;
using UnityEngine;
using UnityEngine.UI;

[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.ModulBasilisk;

[BepInPlugin("cityrobo.ModulBasilisk", "ModulBasilisk", "1.1.0")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
[BepInDependency("h3vr.cityrobo.ModularWorkshopManager", "1.0.0")]
[BepInDependency("nrgill28.Sodalite", "1.4.1")]
public class ModulBasiliskPlugin : 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.ModulBasilisk", "", "", "basiliskmodular", "");
		GameAPI.PreloadAllAssets(Path.Combine(BasePath, "mw_modulbasilisk"));
	}
}
public class BasiliskLaserInterface : FVRInteractiveObject
{
	public GameObject RedLaser;

	public GameObject GreenLaser;

	public Text OnOffText;

	public Text LaserText;

	public Transform LaserSelectButton;

	public Vector3 RedSelected;

	public Vector3 GreenSelected;

	private bool _isLaserOn;

	private bool _greenLaserOn;

	public override void Awake()
	{
		((FVRInteractiveObject)this).Awake();
		UpdateLaser();
	}

	public override void UpdateInteraction(FVRViveHand hand)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		((FVRInteractiveObject)this).UpdateInteraction(hand);
		if (OpenScripts2_BasePlugin.TouchpadDirPressed(hand, Vector2.up))
		{
			_isLaserOn = !_isLaserOn;
			OnOffText.text = ((!_isLaserOn) ? "Off" : "On");
			UpdateLaser();
		}
		else if (OpenScripts2_BasePlugin.TouchpadDirPressed(hand, Vector2.down))
		{
			_greenLaserOn = !_greenLaserOn;
			LaserText.text = ((!_greenLaserOn) ? "Red Laser" : "Green Laser");
			UpdateLaser();
		}
	}

	private void UpdateLaser()
	{
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		RedLaser.SetActive(_isLaserOn && !_greenLaserOn);
		GreenLaser.SetActive(_isLaserOn && _greenLaserOn);
		if ((Object)(object)LaserSelectButton != (Object)null)
		{
			LaserSelectButton.localPosition = ((!_greenLaserOn) ? RedSelected : GreenSelected);
		}
	}
}
public class Test : MonoBehaviour
{
	private void Start()
	{
	}

	private void Update()
	{
	}
}