using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("TimeMachine")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Time Machine")]
[assembly: AssemblyTitle("TimeMachine")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[DebuggerDisplay("Count = {System.Collections.ICollection.Count}")]
[CompilerGenerated]
internal sealed class <>z__ReadOnlySingleElementList<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T>
{
private sealed class Enumerator : IDisposable, IEnumerator, IEnumerator<T>
{
object IEnumerator.Current => _item;
T IEnumerator<T>.Current => _item;
public Enumerator(T item)
{
_item = item;
}
bool IEnumerator.MoveNext()
{
if (!_moveNextCalled)
{
return _moveNextCalled = true;
}
return false;
}
void IEnumerator.Reset()
{
_moveNextCalled = false;
}
void IDisposable.Dispose()
{
}
}
int ICollection.Count => 1;
bool ICollection.IsSynchronized => false;
object ICollection.SyncRoot => this;
object IList.this[int index]
{
get
{
if (index != 0)
{
throw new IndexOutOfRangeException();
}
return _item;
}
set
{
throw new NotSupportedException();
}
}
bool IList.IsFixedSize => true;
bool IList.IsReadOnly => true;
int IReadOnlyCollection<T>.Count => 1;
T IReadOnlyList<T>.this[int index]
{
get
{
if (index != 0)
{
throw new IndexOutOfRangeException();
}
return _item;
}
}
int ICollection<T>.Count => 1;
bool ICollection<T>.IsReadOnly => true;
T IList<T>.this[int index]
{
get
{
if (index != 0)
{
throw new IndexOutOfRangeException();
}
return _item;
}
set
{
throw new NotSupportedException();
}
}
public <>z__ReadOnlySingleElementList(T item)
{
_item = item;
}
IEnumerator IEnumerable.GetEnumerator()
{
return new Enumerator(_item);
}
void ICollection.CopyTo(Array array, int index)
{
array.SetValue(_item, index);
}
int IList.Add(object value)
{
throw new NotSupportedException();
}
void IList.Clear()
{
throw new NotSupportedException();
}
bool IList.Contains(object value)
{
return EqualityComparer<T>.Default.Equals(_item, (T)value);
}
int IList.IndexOf(object value)
{
if (!EqualityComparer<T>.Default.Equals(_item, (T)value))
{
return -1;
}
return 0;
}
void IList.Insert(int index, object value)
{
throw new NotSupportedException();
}
void IList.Remove(object value)
{
throw new NotSupportedException();
}
void IList.RemoveAt(int index)
{
throw new NotSupportedException();
}
IEnumerator<T> IEnumerable<T>.GetEnumerator()
{
return new Enumerator(_item);
}
void ICollection<T>.Add(T item)
{
throw new NotSupportedException();
}
void ICollection<T>.Clear()
{
throw new NotSupportedException();
}
bool ICollection<T>.Contains(T item)
{
return EqualityComparer<T>.Default.Equals(_item, item);
}
void ICollection<T>.CopyTo(T[] array, int arrayIndex)
{
array[arrayIndex] = _item;
}
bool ICollection<T>.Remove(T item)
{
throw new NotSupportedException();
}
int IList<T>.IndexOf(T item)
{
if (!EqualityComparer<T>.Default.Equals(_item, item))
{
return -1;
}
return 0;
}
void IList<T>.Insert(int index, T item)
{
throw new NotSupportedException();
}
void IList<T>.RemoveAt(int index)
{
throw new NotSupportedException();
}
}
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[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;
}
}
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class ExtensionMarkerAttribute : Attribute
{
private readonly string <Name>k__BackingField;
public string Name => <Name>k__BackingField;
public ExtensionMarkerAttribute(string name)
{
<Name>k__BackingField = name;
}
}
}
namespace TimeMachine
{
public class AssetFinder
{
public Sprite uiTitlebarEmptyBlack;
public TMP_FontAsset ticketingSdf;
private static Regex duplicatePostfixPattern = new Regex("_(0|[1-9][0-9]*)$");
public AssetFinder()
{
uiTitlebarEmptyBlack = ((IEnumerable<Sprite>)Resources.FindObjectsOfTypeAll<Sprite>()).FirstOrDefault((Func<Sprite, bool>)((Sprite x) => RemoveDuplicatePostfix(((Object)x).name) == "UI_Titlebar_Empty_Black"));
ticketingSdf = ((IEnumerable<TMP_FontAsset>)Resources.FindObjectsOfTypeAll<TMP_FontAsset>()).FirstOrDefault((Func<TMP_FontAsset, bool>)((TMP_FontAsset x) => RemoveDuplicatePostfix(((Object)x).name) == "Ticketing SDF"));
}
private static string RemoveDuplicatePostfix(string name)
{
return duplicatePostfixPattern.Replace(name, "");
}
}
public static class Extensions
{
[SpecialName]
public sealed class <G>$5E80EE1F91F68F4C0C8D9D82C38C5E67
{
[SpecialName]
public static class <M>$1BB8029C7CF361A6863B83BB827FC169
{
}
[ExtensionMarker("<M>$1BB8029C7CF361A6863B83BB827FC169")]
public RectTransform rectTransform
{
[ExtensionMarker("<M>$1BB8029C7CF361A6863B83BB827FC169")]
get
{
throw new NotSupportedException();
}
}
}
[SpecialName]
public sealed class <G>$D50C47355EFA71DA0F6DB3230FE5D4AD
{
[SpecialName]
public static class <M>$73622D3B9F17B43D1AEB8C472A49ACF3
{
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetLocalEulerAngles(float x, float y, float z)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetAnchoredPosition(float x, float y)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetAnchoredPosition3D(float x, float y, float z)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetAnchorMax(float x, float y)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetAnchorMin(float x, float y)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetOffsetMax(float x, float y)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetOffsetMin(float x, float y)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetPivot(float x, float y)
{
throw new NotSupportedException();
}
[ExtensionMarker("<M>$73622D3B9F17B43D1AEB8C472A49ACF3")]
public RectTransform SetSizeDelta(float x, float y)
{
throw new NotSupportedException();
}
}
public static RectTransform get_rectTransform(GameObject gameObject)
{
Transform transform = gameObject.transform;
return (RectTransform)(object)((transform is RectTransform) ? transform : null);
}
public static RectTransform SetLocalEulerAngles(this RectTransform rectTransform, float x, float y, float z)
{
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
((Transform)rectTransform).localEulerAngles = new Vector3(x, y, z);
return rectTransform;
}
public static RectTransform SetAnchoredPosition(this RectTransform rectTransform, float x, float y)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
rectTransform.anchoredPosition = new Vector2(x, y);
return rectTransform;
}
public static RectTransform SetAnchoredPosition3D(this RectTransform rectTransform, float x, float y, float z)
{
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
rectTransform.anchoredPosition3D = new Vector3(x, y, z);
return rectTransform;
}
public static RectTransform SetAnchorMax(this RectTransform rectTransform, float x, float y)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
rectTransform.anchorMax = new Vector2(x, y);
return rectTransform;
}
public static RectTransform SetAnchorMin(this RectTransform rectTransform, float x, float y)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
rectTransform.anchorMin = new Vector2(x, y);
return rectTransform;
}
public static RectTransform SetOffsetMax(this RectTransform rectTransform, float x, float y)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
rectTransform.offsetMax = new Vector2(x, y);
return rectTransform;
}
public static RectTransform SetOffsetMin(this RectTransform rectTransform, float x, float y)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
rectTransform.offsetMin = new Vector2(x, y);
return rectTransform;
}
public static RectTransform SetPivot(this RectTransform rectTransform, float x, float y)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
rectTransform.pivot = new Vector2(x, y);
return rectTransform;
}
public static RectTransform SetSizeDelta(this RectTransform rectTransform, float x, float y)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
rectTransform.sizeDelta = new Vector2(x, y);
return rectTransform;
}
}
[BepInPlugin("TimeMachine", "Time Machine", "1.0.0")]
public class TimeMachine : BaseUnityPlugin
{
private const string disableLeaderboardsFlag = "time-machine-affected-run";
private static ManualLogSource Logger;
private static ConfigEntry<string> desiredDateTime;
private void Awake()
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Expected O, but got Unknown
Logger = ((BaseUnityPlugin)this).Logger;
desiredDateTime = ((BaseUnityPlugin)this).Config.Bind<string>("TimeMachine", "SpoofedTime", "3AM October 31", "What time the game will think it currently is. Leave empty to disable mod.");
Harmony val = new Harmony("com.company.project.product");
try
{
val.PatchAll(typeof(TimeMachine));
}
catch
{
val.UnpatchSelf();
Logger.LogInfo((object)"Patches failed. Unpatching and stopping mod loading process");
throw;
}
Logger.LogInfo((object)"Patches applied");
SceneManager.sceneLoaded += OnSceneLoaded;
Logger.LogInfo((object)"Scene loading callback created");
}
public static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
if (((Scene)(ref scene)).name != "Main-Menu")
{
return;
}
AssetFinder assets = new AssetFinder();
Transform val = ((Scene)(ref scene)).GetRootGameObjects().First((GameObject x) => ((Object)x).name == "Canvas - Main Menu").transform.Find("Main Menu");
GameObject val2 = UIHelpers.MakeTextInput(assets, "Time Machine - DateTime input", "e.g. 3AM October 31");
((Transform)Extensions.get_rectTransform(val2).SetAnchorMin(0f, 0f).SetAnchorMax(0f, 0f)
.SetAnchoredPosition(110f, 25f)
.SetSizeDelta(200f, 30f)).SetParent(val, false);
val2.SetActive(false);
val2.SetActive(true);
GameObject val3 = UIHelpers.MakeText(assets, "Time Machine - Info", "", Color.gray);
((Transform)Extensions.get_rectTransform(val3).SetAnchorMin(0f, 0f).SetAnchorMax(0f, 0f)
.SetAnchoredPosition(220f, 25f)
.SetSizeDelta(0f, 30f)).SetParent(val, false);
val3.SetActive(false);
val3.SetActive(true);
TMP_InputField inputComponent = val2.GetComponent<TMP_InputField>();
TMP_Text infoComponent = val3.GetComponent<TMP_Text>();
((UnityEvent<string>)(object)inputComponent.onValueChanged).AddListener((UnityAction<string>)delegate(string text)
{
//IL_001e: 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_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
DateTime result;
if (Utility.IsNullOrWhiteSpace(text))
{
infoComponent.text = "Time machine is disabled";
((Graphic)infoComponent).color = Color.gray;
((Graphic)inputComponent.textComponent).color = Color.white;
desiredDateTime.Value = text;
}
else if (!DateTime.TryParse(text, out result))
{
infoComponent.text = "Invalid input!";
((Graphic)infoComponent).color = Color.red;
((Graphic)inputComponent.textComponent).color = Color.red;
}
else
{
infoComponent.text = $"Time machine set to: {result:F}";
((Graphic)infoComponent).color = Color.gray;
((Graphic)inputComponent.textComponent).color = Color.white;
desiredDateTime.Value = text;
}
});
inputComponent.text = desiredDateTime.Value;
if (inputComponent.text == "")
{
((UnityEvent<string>)(object)inputComponent.onValueChanged).Invoke(inputComponent.text);
}
}
private static DateTime ParseWithSpoofedTime(string text, DateTime dateTime)
{
DateTime result = DateTime.Parse(text, null, DateTimeStyles.NoCurrentDateDefault);
if (result.Date.Ticks == 0L)
{
result = result.AddYears(dateTime.Year - 1).AddMonths(dateTime.Month - 1).AddDays(dateTime.Day - 1);
}
result.AddYears(dateTime.Year - result.Year);
return result;
}
[HarmonyPatch(typeof(SSM_DateTimeRange), "Check")]
[HarmonyPostfix]
[HarmonyWrapSafe]
private static void Spoofer(SSM_DateTimeRange __instance, ref float __result)
{
if (!Utility.IsNullOrWhiteSpace(desiredDateTime.Value) && DateTime.TryParse(desiredDateTime.Value, out var result))
{
DateTime dateTime = ParseWithSpoofedTime(__instance.startTime, result);
DateTime dateTime2 = ParseWithSpoofedTime(__instance.endTime, result);
float num = ((!(result >= dateTime) || !(result <= dateTime2)) ? __instance.falseValue : __instance.trueValue);
if (__result != num)
{
CL_GameManager.SetGameFlag("time-machine-affected-run", true, "", false, false);
__result = num;
}
}
}
[HarmonyPatch(typeof(Leaderboard_Panel), "Refresh")]
[HarmonyPostfix]
[HarmonyWrapSafe]
private static void DisableLeaderboardUI(Leaderboard_Panel __instance)
{
if (CL_GameManager.HasActiveFlag("time-machine-affected-run", false))
{
((Component)__instance).gameObject.SetActive(false);
}
}
[HarmonyPatch(typeof(M_Gamemode), "Finish")]
[HarmonyTranspiler]
private static IEnumerable<CodeInstruction> PreventLeaderboardSubmission(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Expected O, but got Unknown
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Expected O, but got Unknown
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Expected O, but got Unknown
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Expected O, but got Unknown
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Expected O, but got Unknown
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: Expected O, but got Unknown
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Expected O, but got Unknown
CodeMatcher val = new CodeMatcher(instructions, generator);
val.MatchStartForward((CodeMatch[])(object)new CodeMatch[1]
{
new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction x) => CodeInstructionExtensions.Calls(x, AccessTools.Method(typeof(CL_Leaderboard), "CreateUserDataFromCurrentSession", (Type[])null, (Type[])null))), (string)null)
});
if (val.IsInvalid)
{
val.Start().MatchStartForward((CodeMatch[])(object)new CodeMatch[1]
{
new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction x) => CodeInstructionExtensions.LoadsField(x, AccessTools.Field(typeof(CommandConsole), "hasCheated"), false)), (string)null)
});
}
val.ThrowIfInvalid("Could not find not call to CreateUserDataFromCurrentSession or access to hasCheated");
Label label = generator.DefineLabel();
val.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[5]
{
new CodeInstruction(OpCodes.Ldstr, (object)"time-machine-affected-run"),
new CodeInstruction(OpCodes.Ldc_I4_0, (object)null),
new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(CL_GameManager), "HasActiveFlag", (Type[])null, (Type[])null)),
new CodeInstruction(OpCodes.Brfalse, (object)label),
new CodeInstruction(OpCodes.Ret, (object)null)
}).AddLabels((IEnumerable<Label>)new <>z__ReadOnlySingleElementList<Label>(label));
return val.InstructionEnumeration();
}
}
public static class UIHelpers
{
public static GameObject MakeText(AssetFinder assets, string name, string textValue, Color color)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Expected O, but got Unknown
GameObject val = new GameObject(name, new Type[2]
{
typeof(RectTransform),
typeof(CanvasRenderer)
})
{
layer = LayerMask.NameToLayer("UI")
};
TextMeshProUGUI obj = val.AddComponent<TextMeshProUGUI>();
((Graphic)obj).color = color;
((TMP_Text)obj).font = assets.ticketingSdf;
((TMP_Text)obj).fontSharedMaterial = ((TMP_Asset)assets.ticketingSdf).material;
((TMP_Text)obj).fontSize = 14f;
((TMP_Text)obj).fontStyle = (FontStyles)0;
((TMP_Text)obj).horizontalAlignment = (HorizontalAlignmentOptions)1;
((TMP_Text)obj).verticalAlignment = (VerticalAlignmentOptions)512;
((TMP_Text)obj).overflowMode = (TextOverflowModes)0;
((TMP_Text)obj).textWrappingMode = (TextWrappingModes)3;
((TMP_Text)obj).text = textValue;
return val;
}
public static GameObject MakeTextInput(AssetFinder assets, string name, string placeholderText)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Expected O, but got Unknown
//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
//IL_021d: Unknown result type (might be due to invalid IL or missing references)
//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject(name, new Type[2]
{
typeof(RectTransform),
typeof(CanvasRenderer)
});
val.layer = LayerMask.NameToLayer("UI");
Image val2 = val.AddComponent<Image>();
val2.type = (Type)1;
val2.sprite = assets.uiTitlebarEmptyBlack;
TMP_InputField val3 = val.AddComponent<TMP_InputField>();
((Selectable)val3).targetGraphic = (Graphic)(object)val2;
ColorBlock colors = default(ColorBlock);
((ColorBlock)(ref colors)).normalColor = new Color(1f, 1f, 1f);
((ColorBlock)(ref colors)).highlightedColor = new Color(1f, 0.6179246f, 0.6179246f);
((ColorBlock)(ref colors)).pressedColor = new Color(0.7843137f, 0.7843137f, 0.7843137f);
((ColorBlock)(ref colors)).selectedColor = new Color(1f, 0f, 0f);
((ColorBlock)(ref colors)).disabledColor = new Color(0.7843137f, 0.7843137f, 0.7843137f);
((ColorBlock)(ref colors)).colorMultiplier = 1f;
((ColorBlock)(ref colors)).fadeDuration = 0.1f;
((Selectable)val3).colors = colors;
GameObject val4 = new GameObject("Text Area", new Type[2]
{
typeof(RectTransform),
typeof(RectMask2D)
});
val4.layer = LayerMask.NameToLayer("UI");
((Transform)Extensions.get_rectTransform(val4).SetAnchorMin(0f, 0f).SetAnchorMax(1f, 1f)
.SetOffsetMin(3f, 3f)
.SetOffsetMax(-3f, -3f)).SetParent(((Component)val3).transform, false);
val3.textViewport = Extensions.get_rectTransform(val4);
GameObject val5 = MakeText(assets, "Placeholder", placeholderText, Color.gray);
((Transform)Extensions.get_rectTransform(val5).SetAnchorMin(0f, 0f).SetAnchorMax(1f, 1f)
.SetOffsetMin(5f, 5f)
.SetOffsetMax(-5f, -5f)).SetParent(val4.transform, false);
val3.placeholder = val5.GetComponent<Graphic>();
GameObject val6 = MakeText(assets, "Text", "", Color.white);
((Transform)Extensions.get_rectTransform(val6).SetAnchorMin(0f, 0f).SetAnchorMax(1f, 1f)
.SetOffsetMin(5f, 5f)
.SetOffsetMax(-5f, -5f)).SetParent(val4.transform, false);
val3.textComponent = val6.GetComponent<TMP_Text>();
val3.fontAsset = val3.textComponent.font;
val3.pointSize = val3.textComponent.fontSize;
val3.characterLimit = 100;
val3.contentType = (ContentType)0;
val3.lineType = (LineType)0;
val3.selectionColor = new Color(1f, 0f, 0f, 0.25f);
val3.customCaretColor = true;
val3.caretColor = Color.white;
val3.caretWidth = 2;
return val;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "TimeMachine";
public const string PLUGIN_NAME = "Time Machine";
public const string PLUGIN_VERSION = "1.0.0";
}
}