Decompiled source of FastTravel v1.0.1

FastTravel.dll

Decompiled a year 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 CustomAppAPI;
using Reptile;
using Reptile.Phone;
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("FastTravel")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FastTravel")]
[assembly: AssemblyCopyright("Copyright © tari.dance 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("cd10bd64-e258-4ef5-8df7-fa8e6b1c67db")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.1.0")]
namespace FastTravel;

public class AppFastTravel : CustomApp
{
	public override string DisplayName => "call taxi";

	public override Texture2D Icon => CustomApp.LoadTexture(Path.Combine(FastTravelMod.Instance.ModFolderPath, "taxiIcon.png"));

	public override void OnAppEnable()
	{
		((App)this).OnAppEnable();
		((App)this).MyPhone.CloseCurrentApp();
		((App)this).MyPhone.TurnOff(false);
		if (!Core.Instance.SaveManager.CurrentSaveSlot.GetCurrentStageProgress().taxiFound)
		{
			return;
		}
		Taxi val = Object.FindObjectOfType<Taxi>(true);
		if ((Object)(object)val == (Object)null)
		{
			FastTravelMod.Log.LogWarning((object)"No Taxi found.");
			return;
		}
		NPC component = ((Component)val).GetComponent<NPC>();
		if ((Object)(object)component == (Object)null)
		{
			FastTravelMod.Log.LogWarning((object)"No Taxi NPC found.");
		}
		else
		{
			component.StartTalkingWithConvoStarter((ConversationStarter)16);
		}
	}
}
[BepInPlugin("dance.tari.bombrushcyberfunk.fasttravel", "FastTravel", "1.0.1")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInProcess("Bomb Rush Cyberfunk.exe")]
public class FastTravelMod : BaseUnityPlugin
{
	private static FastTravelMod _modInstance;

	public static FastTravelMod Instance => _modInstance;

	public string ModFolderPath => Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location);

	public static ManualLogSource Log => ((BaseUnityPlugin)_modInstance).Logger;

	private void Awake()
	{
		_modInstance = this;
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin FastTravel loaded successfully.");
	}
}
public static class PluginMetadata
{
	public const string GUID = "dance.tari.bombrushcyberfunk.fasttravel";

	public const string Name = "FastTravel";

	public const string Version = "1.0.1";
}