using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using CyconiAPI;
using MelonLoader;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("CyconiAPI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CyconiAPI")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: MelonInfo(typeof(Main), "CyconiAPI", "0.0.1", "Cyconi", null)]
[assembly: MelonGame(null, "Lethal Company")]
[assembly: MelonColor(ConsoleColor.Green)]
[assembly: ComVisible(false)]
[assembly: Guid("bf5f29d8-8605-4439-9b77-6810f5c65722")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 CyconiAPI
{
public class Main : MelonMod
{
}
public class BackButton
{
public BackButton(Transform parent, UnityAction listener)
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Expected O, but got Unknown
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/SettingsPanel/BackButton");
GameObject val2 = Object.Instantiate<GameObject>(val, parent);
val2.transform.localScale = val.transform.localScale;
val2.transform.position = val.transform.position;
val2.transform.rotation = val.transform.rotation;
SettingsOption component = val2.GetComponent<SettingsOption>();
Object.Destroy((Object)(object)component);
Button component2 = val2.GetComponent<Button>();
component2.onClick = new ButtonClickedEvent();
((UnityEventBase)component2.onClick).RemoveAllListeners();
((UnityEvent)component2.onClick).AddListener(listener);
}
}
public class Button
{
public Button(Transform parentMenu, string text, float x, float y, UnityAction listener)
{
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Expected O, but got Unknown
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/SettingsPanel/PleaseConfirmChangesPanel/Panel/Confirm");
GameObject val2 = Object.Instantiate<GameObject>(val, parentMenu);
((Object)val2).name = text;
((TMP_Text)val2.GetComponentInChildren<TextMeshProUGUI>()).text = text;
((Component)val2.GetComponentInChildren<TextMeshProUGUI>()).gameObject.transform.localScale = new Vector3(1.3f, 1.3f, 1f);
val2.transform.position = GridPos.GridCoord(x, y);
val2.transform.localScale = new Vector3(0.6474f, 0.6474f, 0.9474f);
val2.transform.rotation = val.transform.rotation;
Object.Destroy((Object)(object)val2.GetComponent<SettingsOption>());
Object.Destroy((Object)(object)val2.GetComponent<DeleteFileButton>());
Button component = val2.GetComponent<Button>();
component.onClick = new ButtonClickedEvent();
((UnityEventBase)component.onClick).RemoveAllListeners();
((UnityEvent)component.onClick).AddListener(listener);
}
public Button(Transform parentMenu, string text, Vector3 pos, UnityAction listener)
{
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Expected O, but got Unknown
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/SettingsPanel/PleaseConfirmChangesPanel/Panel/Confirm");
GameObject val2 = Object.Instantiate<GameObject>(val, parentMenu);
((Object)val2).name = text;
((TMP_Text)val2.GetComponentInChildren<TextMeshProUGUI>()).text = text ?? "";
val2.transform.position = pos;
val2.transform.localScale = new Vector3(2.7987f, 2.7987f, 2.7987f);
val2.transform.rotation = val.transform.rotation;
Button component = val2.GetComponent<Button>();
component.onClick = new ButtonClickedEvent();
((UnityEventBase)component.onClick).RemoveAllListeners();
((UnityEvent)component.onClick).AddListener(listener);
}
}
public class ClearButton
{
private bool isOn = false;
public ClearButton(Transform parentMenu, string text, float x, float y, UnityAction listener)
{
//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_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Expected O, but got Unknown
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/SettingsPanel/MicSettings/TalkMode");
GameObject val2 = Object.Instantiate<GameObject>(val, parentMenu);
((Object)val2).name = text;
((TMP_Text)val2.GetComponentInChildren<TextMeshProUGUI>()).text = text;
((TMP_Text)val2.GetComponentInChildren<TextMeshProUGUI>()).alignment = (TextAlignmentOptions)514;
val2.GetComponentInChildren<Image>().pixelsPerUnitMultiplier = 6f;
val2.transform.position = GridPos.GridCoord(x, y);
val2.transform.localScale = val.transform.localScale;
val2.transform.rotation = val.transform.rotation;
Object.Destroy((Object)(object)val2.GetComponent<SettingsOption>());
Object.Destroy((Object)(object)val2.GetComponent<DeleteFileButton>());
Button component = val2.GetComponent<Button>();
component.onClick = new ButtonClickedEvent();
((UnityEventBase)component.onClick).RemoveAllListeners();
((UnityEvent)component.onClick).AddListener(listener);
}
}
public class LongButton
{
public LongButton(Transform parentMenu, string text, Vector3 pos, bool isSubmenu, UnityAction listener)
{
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: 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)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Expected O, but got Unknown
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/MainButtons/Settings");
GameObject val2 = Object.Instantiate<GameObject>(val, parentMenu);
((Object)val2).name = text;
((TMP_Text)val2.GetComponentInChildren<TextMeshProUGUI>()).text = "> " + text;
val2.transform.position = pos;
if (!isSubmenu)
{
val2.transform.localScale = new Vector3(2.7987f, 2.7987f, 2.7987f);
}
else
{
val2.transform.localScale = new Vector3(1.3f, 1.3f, 1.3f);
}
val2.transform.rotation = val.transform.rotation;
Button component = val2.GetComponent<Button>();
component.onClick = new ButtonClickedEvent();
((UnityEventBase)component.onClick).RemoveAllListeners();
((UnityEvent)component.onClick).AddListener(listener);
}
}
internal class GridPos
{
internal static Vector3 GridCoord(float x, float y)
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
float num = 0.7f * (x - 1f) + -23.2f;
float num2 = 0.2f * (y - 1f) + 58.28f;
Vector3 result = default(Vector3);
((Vector3)(ref result))..ctor(num, 0f - num2, 12.17f);
return result;
}
}
public class Menu
{
public Menu(Transform parent, GameObject menu)
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/SettingsPanel");
menu.transform.SetParent(parent);
menu.transform.localScale = val.transform.localScale;
menu.transform.position = val.transform.position;
}
}
public class ClearToggle
{
private bool isOn = false;
public ClearToggle(Transform parentMenu, string textOff, string textOn, float x, float y, Action listenerOn, Action listenerOff)
{
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0128: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Expected O, but got Unknown
//IL_014c: Unknown result type (might be due to invalid IL or missing references)
//IL_0156: Expected O, but got Unknown
ClearToggle clearToggle = this;
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/SettingsPanel/MicSettings/TalkMode");
GameObject button = Object.Instantiate<GameObject>(val, parentMenu);
((Object)button).name = "C_Toggle";
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOff;
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).alignment = (TextAlignmentOptions)514;
button.GetComponentInChildren<Image>().pixelsPerUnitMultiplier = 6f;
button.transform.position = GridPos.GridCoord(x, y);
button.transform.localScale = val.transform.localScale;
button.transform.rotation = val.transform.rotation;
Object.Destroy((Object)(object)button.GetComponent<SettingsOption>());
Button component = button.GetComponent<Button>();
component.onClick = new ButtonClickedEvent();
((UnityEventBase)component.onClick).RemoveAllListeners();
((UnityEvent)component.onClick).AddListener(new UnityAction(Toggle));
void Toggle()
{
clearToggle.isOn = !clearToggle.isOn;
if (clearToggle.isOn)
{
listenerOn();
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOn;
}
else
{
listenerOff();
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOff;
}
}
}
}
public class LongToggle
{
private bool isOn = false;
public LongToggle(Transform parentMenu, string textOff, string textOn, Vector3 pos, bool isSubmenu, Action listenerOn, Action listenerOff)
{
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: 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_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Expected O, but got Unknown
//IL_0154: Unknown result type (might be due to invalid IL or missing references)
//IL_015e: Expected O, but got Unknown
LongToggle longToggle = this;
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/MainButtons/Settings");
GameObject button = Object.Instantiate<GameObject>(val, parentMenu);
((Object)button).name = "L_Toggle";
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOff;
button.transform.position = pos;
if (!isSubmenu)
{
button.transform.localScale = new Vector3(2.7987f, 2.7987f, 2.7987f);
}
else
{
button.transform.localScale = new Vector3(1.5f, 1.5f, 1.5f);
}
button.transform.rotation = val.transform.rotation;
Object.Destroy((Object)(object)button.GetComponent<SettingsOption>());
Button component = button.GetComponent<Button>();
component.onClick = new ButtonClickedEvent();
((UnityEventBase)component.onClick).RemoveAllListeners();
((UnityEvent)component.onClick).AddListener(new UnityAction(Toggle));
void Toggle()
{
longToggle.isOn = !longToggle.isOn;
if (longToggle.isOn)
{
listenerOn();
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOn;
}
else
{
listenerOff();
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOff;
}
}
}
}
public class Toggle
{
private bool isOn = false;
public Toggle(Transform parentMenu, string textOff, string textOn, float x, float y, Action listenerOn, Action listenerOff)
{
//IL_00b0: 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_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_013e: Expected O, but got Unknown
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Expected O, but got Unknown
Toggle toggle = this;
GameObject val = GameObject.Find("Systems/UI/Canvas/QuickMenu/SettingsPanel/PleaseConfirmChangesPanel/Panel/Confirm");
GameObject button = Object.Instantiate<GameObject>(val, parentMenu);
((Object)button).name = "Toggle";
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOff;
((Component)button.GetComponentInChildren<TextMeshProUGUI>()).gameObject.transform.localScale = new Vector3(1.3f, 1.3f, 1f);
button.transform.position = GridPos.GridCoord(x, y);
button.transform.localScale = new Vector3(0.6474f, 0.6474f, 0.9474f);
button.transform.rotation = val.transform.rotation;
Object.Destroy((Object)(object)button.GetComponent<SettingsOption>());
Button component = button.GetComponent<Button>();
component.onClick = new ButtonClickedEvent();
((UnityEventBase)component.onClick).RemoveAllListeners();
((UnityEvent)component.onClick).AddListener(new UnityAction(Toggle));
void Toggle()
{
toggle.isOn = !toggle.isOn;
if (toggle.isOn)
{
listenerOn();
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOn;
}
else
{
listenerOff();
((TMP_Text)button.GetComponentInChildren<TextMeshProUGUI>()).text = textOff;
}
}
}
}
}