Decompiled source of MelanieMelicious fAnCy ShIp v0.0.0

MelanieFancyShip.dll

Decompiled 5 hours ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("WiderShipMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WiderShipMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3b42a851-dbf6-428d-a7f2-0af1d6039c22")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
public class HarmonyPatches
{
	[HarmonyPrefix]
	[HarmonyPatch(typeof(StartOfRound), "Start")]
	private static void StartPatch()
	{
		Setup.ShipSetup();
	}
}
public class Setup : MonoBehaviour
{
	public static void ShipSetup()
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0137: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Unknown result type (might be due to invalid IL or missing references)
		//IL_0194: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0210: Unknown result type (might be due to invalid IL or missing references)
		//IL_022f: Unknown result type (might be due to invalid IL or missing references)
		//IL_024e: Unknown result type (might be due to invalid IL or missing references)
		//IL_026d: Unknown result type (might be due to invalid IL or missing references)
		//IL_028c: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0308: Unknown result type (might be due to invalid IL or missing references)
		//IL_0327: Unknown result type (might be due to invalid IL or missing references)
		Object.Instantiate<GameObject>(Plugin.bundle.LoadAsset<GameObject>("Assets/MelanieFancyShip/Prefab/ShipInside.prefab"), GameObject.Find("Environment/HangarShip/ShipInside").transform.position, GameObject.Find("Environment/HangarShip/ShipInside").transform.rotation, GameObject.Find("Environment/HangarShip/ShipInside").transform.parent);
		Delete("Environment/HangarShip/ShipInside");
		Delete("CatwalkShip");
		Delete("CatwalkRailLining");
		Delete("CatwalkRailLiningB");
		Delete("CatwalkUnderneathSupports");
		Delete("ShipRails");
		Delete("ShipRailPosts");
		Delete("Environment/HangarShip/Plane.001");
		Delete("Environment/HangarShip/Railing/Cube");
		Delete("Environment/HangarShip/Railing/Cube (1)");
		Delete("Environment/HangarShip/Railing/Cube (2)");
		Delete("Environment/HangarShip/Railing/Cube (3)");
		Delete("Environment/HangarShip/Railing/Cube (4)");
		Delete("Environment/HangarShip/Railing/Cube (5)");
		Delete("Environment/HangarShip/Railing/Cube (6)");
		Delete("Environment/HangarShip/Railing/Cube (7)");
		Delete("Environment/HangarShip/Railing/Cube (8)");
		Delete("Environment/HangarShip/Railing/Cube (9)");
		Delete("LeavingShip (6)");
		Move("ShipLightsPost", new Vector3(0f, 5f, 0f));
		Move("LadderShort", new Vector3(9.4f, -2.6f, 1.4f));
		Move("LadderShort (1)", new Vector3(-9f, -2.6f, -9.7f));
		Move("LeavingShip (1)", new Vector3(0.8f, 3.3f, 11.3f));
		Move("LeavingShip (3)", new Vector3(-2.8f, 3.3f, -5.8f));
		Move("LeavingShip (4)", new Vector3(13.7f, 3.3f, 13f));
		Move("OutsideShip (1)", new Vector3(-2.5f, 0f, -3.8f));
		Move("OutsideShip (2)", new Vector3(2.3f, 3.2f, 8.9f));
		Move("OutsideShip (3)", new Vector3(14.1f, 3.2f, 6.1f));
		Move("OutsideShipRoom", new Vector3(0f, 0f, 2f));
		Move("ShipBoundsTrigger", new Vector3(1.5f, 4.2f, -6.7f));
		Move("ShipInnerRoomBoundsTrigger", new Vector3(1.4f, 1.8f, -6.6f));
		Size("LeavingShip (3)", new Vector3(3f, 12.2f, 0.8f));
		Size("OutsideShip (1)", new Vector3(2.4f, 1.8f, 1.1f));
		Size("OutsideShipRoom", new Vector3(1f, 2f, 1f));
		Size("ShipBoundsTrigger", new Vector3(23.8f, 10.1f, 22f));
		Size("ShipInnerRoomBoundsTrigger", new Vector3(18f, 11f, 16f));
	}

	private static void Move(string obj, Vector3 pos)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		GameObject.Find(obj).transform.localPosition = pos;
	}

	private static void Size(string obj, Vector3 scale)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		GameObject.Find(obj).transform.localScale = scale;
	}

	private static void Delete(string obj)
	{
		Object.Destroy((Object)(object)GameObject.Find(obj));
	}
}
[BepInPlugin("MelanieMelicious.fancyShip", "Melanie Melicious - fAnCy ShIp", "0.0.0")]
public class Plugin : BaseUnityPlugin
{
	private const string GUID = "MelanieMelicious.fancyShip";

	private const string NAME = "Melanie Melicious - fAnCy ShIp";

	private const string VERSION = "0.0.0";

	private readonly Harmony harmony = new Harmony("MelanieMelicious.fancyShip");

	public static ManualLogSource mls;

	public static AssetBundle bundle;

	private static Plugin instance;

	private void Awake()
	{
		instance = this;
		harmony.PatchAll(typeof(HarmonyPatches));
		string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "melanieshipfancy");
		bundle = AssetBundle.LoadFromFile(text);
		((BaseUnityPlugin)this).Logger.LogInfo((object)"poop and pee ship loaded");
	}
}