using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using TerminalApi;
using TerminalApi.Classes;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
[assembly: AssemblyCompany("TimeTerminalCommand")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A terminal command that displays the current time")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+1a2514fa93128e97eb6629af37744c80d84a8510")]
[assembly: AssemblyProduct("TimeTerminalCommand")]
[assembly: AssemblyTitle("TimeTerminalCommand")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace TimeTerminalCommand
{
[BepInPlugin("atomic.timecommand", "Time Command", "1.1.0")]
[BepInDependency("atomic.terminalapi", "1.5.0")]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
//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)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin TimeTerminalCommand is loaded!");
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
TerminalApi.AddCommand("time", new CommandInfo
{
Category = "other",
Description = "Displays the current time.",
DisplayTextSupplier = OnTimeCommand
}, "check", true);
}
private string OnTimeCommand()
{
return (!StartOfRound.Instance.currentLevel.planetHasTime || !StartOfRound.Instance.shipDoorsEnabled) ? "You're not on a moon. There is no time here.\n" : ("The time is currently " + ((TMP_Text)HUDManager.Instance.clockNumber).text.Replace('\n', ' ') + ".\n");
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "TimeTerminalCommand";
public const string PLUGIN_NAME = "TimeTerminalCommand";
public const string PLUGIN_VERSION = "1.0.0";
}
}