Decompiled source of ActivateNocturnalOS v2.0.0

plugins/ActivateNocturnalOS.dll

Decompiled a week ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using Microsoft.CodeAnalysis;
using Notiffy.API;
using Notiffy.Utils;
using TMPro;
using ThornClient.Core;
using ThornClient.Core.ConfigurableElements;
using ThornClient.Core.DataTypes;
using ThornClient.HUD;
using ThornClient.System;
using UnityEngine;
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("ActivateNocturnalOS")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+0999c51cd664805ffecb82e0353ab7142f757d1f")]
[assembly: AssemblyProduct("ActivateNocturnalOS")]
[assembly: AssemblyTitle("ActivateNocturnalOS")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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;
		}
	}
}
namespace ActivateNocturnalOS
{
	[BepInPlugin("com.github.end-4.activateNocturnalOS", "ActivateNocturnalOS", "2.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Core : BaseUnityPlugin
	{
		internal static ManualLogSource? Log;

		public static string workingPath = Assembly.GetExecutingAssembly().Location;

		public static string workingDir = Path.GetDirectoryName(workingPath);

		public const string PluginGUID = "com.github.end-4.activateNocturnalOS";

		public const string PluginName = "ActivateNocturnalOS";

		public const string PluginVersion = "2.0.0";

		private static GameObject? nagCanvas;

		private static TMP_FontAsset? ukFont;

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			SceneManager.sceneLoaded += OnSceneLoaded;
			UserHints.Initialize();
			Log.LogInfo((object)"ActivateNocturnalOS loaded!");
		}

		private static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			if ((Object)(object)ukFont == (Object)null)
			{
				ukFont = ((IEnumerable<TMP_FontAsset>)Resources.FindObjectsOfTypeAll<TMP_FontAsset>()).FirstOrDefault((Func<TMP_FontAsset, bool>)((TMP_FontAsset f) => ((Object)f).name.Contains("VCR")));
			}
			CreateLicenseNag();
			((Setting)NocturnalLicense.Activated).OnChanged += UpdateNagText;
			((Setting)NocturnalLicense.NagTitle).OnChanged += UpdateNagText;
			((Setting)NocturnalLicense.NagTitleFontSize).OnChanged += UpdateNagText;
			((Setting)NocturnalLicense.NagTitleColor).OnChanged += UpdateNagText;
			NocturnalLicense.NagTitleColor.OnEffectiveValueChanged += UpdateNagText;
			((Setting)NocturnalLicense.NagBodyText).OnChanged += UpdateNagText;
			((Setting)NocturnalLicense.NagBodyFontSize).OnChanged += UpdateNagText;
			((Setting)NocturnalLicense.NagOpacity).OnChanged += UpdateNagText;
			((Setting)NocturnalLicense.NagBodyColor).OnChanged += UpdateNagText;
			NocturnalLicense.NagBodyColor.OnEffectiveValueChanged += UpdateNagText;
		}

		private static void CreateLicenseNag()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: 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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)nagCanvas != (Object)null))
			{
				nagCanvas = new GameObject("NocturnalOS_NagCanvas");
				Object.DontDestroyOnLoad((Object)(object)nagCanvas);
				Canvas obj = nagCanvas.AddComponent<Canvas>();
				obj.renderMode = (RenderMode)0;
				obj.sortingOrder = 999;
				CanvasScaler obj2 = nagCanvas.AddComponent<CanvasScaler>();
				obj2.uiScaleMode = (ScaleMode)1;
				obj2.referenceResolution = new Vector2((float)Screen.width, (float)Screen.height);
				obj2.screenMatchMode = (ScreenMatchMode)0;
				obj2.matchWidthOrHeight = 0.5f;
				GameObject val = new GameObject("NagContainer");
				val.transform.SetParent(nagCanvas.transform);
				RectTransform obj3 = val.AddComponent<RectTransform>();
				obj3.anchorMin = new Vector2(1f, 0f);
				obj3.anchorMax = new Vector2(1f, 0f);
				obj3.pivot = new Vector2(1f, 0f);
				obj3.anchoredPosition = new Vector2(-45f, 45f);
				obj3.sizeDelta = new Vector2(410f, 150f);
				VerticalLayoutGroup obj4 = val.AddComponent<VerticalLayoutGroup>();
				((LayoutGroup)obj4).childAlignment = (TextAnchor)6;
				((HorizontalOrVerticalLayoutGroup)obj4).childControlHeight = true;
				((HorizontalOrVerticalLayoutGroup)obj4).childControlWidth = true;
				((HorizontalOrVerticalLayoutGroup)obj4).childForceExpandHeight = false;
				((HorizontalOrVerticalLayoutGroup)obj4).childForceExpandWidth = false;
				((HorizontalOrVerticalLayoutGroup)obj4).spacing = 5f;
				CreateText(val.transform, "Activate Nocturnal OS", NocturnalLicense.NagTitleFontSize.Value, (FontStyles)0, NocturnalLicense.NagTitleColor.Value.GetCurrentColor());
				CreateText(val.transform, "Go to Settings to activate Nocturnal OS", NocturnalLicense.NagBodyFontSize.Value, (FontStyles)0, NocturnalLicense.NagBodyColor.Value.GetCurrentColor());
				UpdateNagText();
			}
		}

		internal static void UpdateNagText()
		{
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)nagCanvas == (Object)null)
			{
				return;
			}
			nagCanvas.SetActive(!NocturnalLicense.Activated.Value);
			TextMeshProUGUI[] componentsInChildren = nagCanvas.GetComponentsInChildren<TextMeshProUGUI>(true);
			if (componentsInChildren.Length >= 2)
			{
				if (((TMP_Text)componentsInChildren[0]).text != NocturnalLicense.NagTitle.Value)
				{
					((TMP_Text)componentsInChildren[0]).text = NocturnalLicense.NagTitle.Value;
				}
				if (!Mathf.Approximately(((TMP_Text)componentsInChildren[0]).fontSize, NocturnalLicense.NagTitleFontSize.Value))
				{
					((TMP_Text)componentsInChildren[0]).fontSize = NocturnalLicense.NagTitleFontSize.Value;
				}
				((Graphic)componentsInChildren[0]).color = NocturnalLicense.NagTitleColor.Value.GetCurrentColor();
				if (((TMP_Text)componentsInChildren[1]).text != NocturnalLicense.NagBodyText.Value)
				{
					((TMP_Text)componentsInChildren[1]).text = NocturnalLicense.NagBodyText.Value;
				}
				if (!Mathf.Approximately(((TMP_Text)componentsInChildren[1]).fontSize, NocturnalLicense.NagBodyFontSize.Value))
				{
					((TMP_Text)componentsInChildren[1]).fontSize = NocturnalLicense.NagBodyFontSize.Value;
				}
				((Graphic)componentsInChildren[1]).color = NocturnalLicense.NagBodyColor.Value.GetCurrentColor();
			}
			TextMeshProUGUI[] array = componentsInChildren;
			foreach (TextMeshProUGUI obj in array)
			{
				Color color = ((Graphic)obj).color;
				color.a = NocturnalLicense.NagOpacity.Value;
				((Graphic)obj).color = color;
			}
		}

		private static void CreateText(Transform parent, string content, float fontSize, FontStyles style, Color color)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("NagText_" + ((content.Length >= 5) ? content.Substring(0, 5) : content));
			val.transform.SetParent(parent);
			TextMeshProUGUI val2 = val.AddComponent<TextMeshProUGUI>();
			((TMP_Text)val2).text = content;
			((TMP_Text)val2).fontSize = fontSize;
			((TMP_Text)val2).fontStyle = style;
			((Graphic)val2).color = color;
			((TMP_Text)val2).alignment = (TextAlignmentOptions)513;
			if ((Object)(object)ukFont != (Object)null)
			{
				((TMP_Text)val2).font = ukFont;
			}
		}

		private void Update()
		{
			RandomNotifications.OnUpdate();
		}
	}
	public class DraggableReminder : TextHudModule
	{
		public override string[] Tags => new string[3] { "legal", "genuine", "smilesoft" };

		public override Sprite Icon => Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "icon.png"), 100f, (SpriteMeshType)1);

		public DraggableReminder()
			: base("activateNocturnalOS.draggableReminder", "Nocturnal OS License Reminder", "A friendly reminder that you should activate your license")
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			((Configurable)this).CreateHeader("note", "Note", "Appearance settings are adjusted in the main Nocturnal OS License module", (HeaderType)0, (SettingGroup)null);
			((Setting)base.ForegroundColor).Hints = new InterfaceHints
			{
				Hidden = true
			};
		}

		protected override void OnHudModuleEnable()
		{
			((Setting)NocturnalLicense.Activated).OnChanged += UpdateText;
			((Setting)NocturnalLicense.NagTitle).OnChanged += UpdateText;
			((Setting)NocturnalLicense.NagTitleFontSize).OnChanged += UpdateText;
			((Setting)NocturnalLicense.NagTitleColor).OnChanged += UpdateText;
			NocturnalLicense.NagTitleColor.OnEffectiveValueChanged += UpdateText;
			((Setting)NocturnalLicense.NagBodyText).OnChanged += UpdateText;
			((Setting)NocturnalLicense.NagBodyFontSize).OnChanged += UpdateText;
			((Setting)NocturnalLicense.NagOpacity).OnChanged += UpdateText;
			((Setting)NocturnalLicense.NagBodyColor).OnChanged += UpdateText;
			NocturnalLicense.NagBodyColor.OnEffectiveValueChanged += UpdateText;
			UpdateText();
		}

		protected override void OnHudModuleDisable()
		{
			((Setting)NocturnalLicense.Activated).OnChanged -= UpdateText;
			((Setting)NocturnalLicense.NagTitle).OnChanged -= UpdateText;
			((Setting)NocturnalLicense.NagTitleFontSize).OnChanged -= UpdateText;
			((Setting)NocturnalLicense.NagTitleColor).OnChanged -= UpdateText;
			NocturnalLicense.NagTitleColor.OnEffectiveValueChanged -= UpdateText;
			((Setting)NocturnalLicense.NagBodyText).OnChanged -= UpdateText;
			((Setting)NocturnalLicense.NagBodyFontSize).OnChanged -= UpdateText;
			((Setting)NocturnalLicense.NagOpacity).OnChanged -= UpdateText;
			((Setting)NocturnalLicense.NagBodyColor).OnChanged -= UpdateText;
			NocturnalLicense.NagBodyColor.OnEffectiveValueChanged -= UpdateText;
		}

		private void UpdateText()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: 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)
			string value = NocturnalLicense.NagTitle.Value;
			string value2 = NocturnalLicense.NagBodyText.Value;
			Color currentColor = NocturnalLicense.NagTitleColor.Value.GetCurrentColor();
			Color currentColor2 = NocturnalLicense.NagBodyColor.Value.GetCurrentColor();
			float value3 = NocturnalLicense.NagOpacity.Value;
			Color val = default(Color);
			((Color)(ref val))..ctor(currentColor.r, currentColor.g, currentColor.b, value3);
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(currentColor2.r, currentColor2.g, currentColor2.b, value3);
			string arg = "#" + ColorUtility.ToHtmlStringRGBA(val);
			string arg2 = "#" + ColorUtility.ToHtmlStringRGBA(val2);
			string text = $"<size={NocturnalLicense.NagTitleFontSize.Value}><color={arg}>{value}</color></size>";
			string text2 = $"<size={NocturnalLicense.NagBodyFontSize.Value}><color={arg2}>{value2}</color></size>";
			string text3 = "<size=5> </size>";
			((TextHudModule)this).Text = text + "\n" + text3 + "\n" + text2;
		}
	}
	public class NocturnalLicense : Module
	{
		public static Setting<bool> Activated;

		public static Setting<string> NagTitle;

		public static Setting<float> NagTitleFontSize;

		public static Setting<EnhancedColor> NagTitleColor;

		public static Setting<string> NagBodyText;

		public static Setting<float> NagBodyFontSize;

		public static Setting<EnhancedColor> NagBodyColor;

		public static Setting<float> NagOpacity;

		public static Setting<bool> SendNotifications;

		public static Setting<int> NotificationInterval;

		public static Setting<string> LastVersion;

		public override string[] Tags => new string[3] { "legal", "genuine", "smilesoft" };

		public override Sprite Icon => Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "icon.png"), 100f, (SpriteMeshType)1);

		public NocturnalLicense()
			: base("activateNocturnalOS.activation", "Nocturnal OS License", "Get a genuine license from Smilesoft.", (ModuleCategory)3, (KeyCode)0, (KeyCode)0, false, false)
		{
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Expected O, but got Unknown
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Expected O, but got Unknown
			((Configurable)this).CreateHeader("status", "Activation status", "", (HeaderType)0, (SettingGroup)null);
			Activated = ((Configurable)this).CreateSetting<bool>("activated", "Activate NocturnalOS license", "Click to activate the license", false, (SettingGroup)null);
			((Configurable)this).CreateHeader("reminderSettings", "Reminder settings", "Note: There's a draggable version in the HUD tab", (HeaderType)0, (SettingGroup)null);
			NagTitle = ((Configurable)this).CreateSetting<string>("nagTitle", "Title text", "Title text for the reminder", "Activate Nocturnal OS", (SettingGroup)null);
			NagTitleFontSize = ((Configurable)this).CreateSetting<float>("nagTitleFontSize", "Title font size", "Font size of the title", 28f, (SettingGroup)null);
			NagTitleColor = ((Configurable)this).CreateSetting<EnhancedColor>("nagTitleColor", "Title color", "Color of the title text", new EnhancedColor(Color.white, (EnhancedColorMode)0), (SettingGroup)null);
			NagBodyText = ((Configurable)this).CreateSetting<string>("nagBodyText", "Body text", "Body text for the reminder", "Go to Thorn menu to activate Nocturnal OS", (SettingGroup)null);
			NagBodyFontSize = ((Configurable)this).CreateSetting<float>("nagBodyFontSize", "Body text font size", "Font size of the body text", 18f, (SettingGroup)null);
			NagBodyColor = ((Configurable)this).CreateSetting<EnhancedColor>("nagBodyColor", "Body color", "Color of the body text", new EnhancedColor(Color.white, (EnhancedColorMode)0), (SettingGroup)null);
			NagOpacity = ((Configurable)this).CreateSetting<float>("nagOpacity", "Opacity", "Opacity for the reminder", 0.4f, (SettingGroup)null);
			((Setting)NagOpacity).Hints = InterfaceHints.RangeHint(0f, 1f);
			((Configurable)this).CreateHeader("notifications", "Notifications", "Receive news and updates from Smilesoft", (HeaderType)0, (SettingGroup)null);
			SendNotifications = ((Configurable)this).CreateSetting<bool>("notificationsEnabled", "Send notifications", "Whether to send random notifications", true, (SettingGroup)null);
			NotificationInterval = ((Configurable)this).CreateSetting<int>("notificationInterval", "Notification interval (secs)", "Interval between notifications in seconds", 2700, (SettingGroup)null);
			LastVersion = ((Configurable)this).CreateSetting<string>("lastVersion", "Last version", "The last version of the application", "1.0.0", (SettingGroup)null);
			((Setting)LastVersion).Hints = new InterfaceHints
			{
				Hidden = true
			};
		}
	}
	public static class RandomNotifications
	{
		private static float? lastNotification;

		private static Notification[] notifs = (Notification[])(object)new Notification[11]
		{
			new Notification
			{
				Summary = "Backup to FourDrive",
				Body = "Keep your files safe from attacks",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/fourdrive.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(4) { "yes", "Set up", "no", "Maybe later" }
			},
			new Notification
			{
				Summary = "Get a genuine NocturnalOS license",
				Body = "You may be a Fraud",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "icon.png"), 100f, (SpriteMeshType)1)
			},
			new Notification
			{
				Summary = "Try Smilesoft365",
				Body = "Work smarter across Smilesoft365 with Coroutine. AI built into Smilesoft365 helps you create, collaborate, and work across documents, presentations, and data.",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/smilesoft365.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(4) { "yes", "30 days free", "no", "I'll pass" }
			},
			new Notification
			{
				Summary = "Smilesoft Incel",
				Body = "View, filter and analyze at scale. Become a freak in the sheets.",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/incel.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(2) { "yes", "Try it" }
			},
			new Notification
			{
				Summary = "Smilesoft Letter",
				Body = "I like your funny words magic man",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/letter.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(2) { "yes", "Try it" }
			},
			new Notification
			{
				Summary = "Smilesoft PowerFinger",
				Body = "Ready to impress, when you are.",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/powerfinger.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(2) { "yes", "Try it" }
			},
			new Notification
			{
				Summary = "Smilesoft FourNote",
				Body = "All your notes, in four places.",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/fournote.png"), 100f, (SpriteMeshType)1)
			},
			new Notification
			{
				Summary = "Underlook: New message",
				Body = "[email protected]:\nFUCKING NIKKON",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/underlook.png"), 100f, (SpriteMeshType)1)
			},
			new Notification
			{
				Summary = "Smilesoft Gangs",
				Body = "Stay in the know. Turn on desktop notifications.",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/gangs.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(4) { "yes", "Turn on", "no", "Not now" }
			},
			new Notification
			{
				Summary = "Get YBox Game Pass",
				Body = "Play next-level games on your NocturnalOS system with YBox Game Pass.",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/ybox.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(4) { "yes", "Join now", "no", "Dismiss" }
			},
			new Notification
			{
				Summary = "Try Goon",
				Body = "Built on the same technology as Chroma, with the added trust of Smilesoft.",
				NotificationIcon = Img2Sprite.LoadNewSprite(Path.Combine(Core.workingDir, "assets/goon.png"), 100f, (SpriteMeshType)1),
				Actions = new List<string>(4) { "yes", "Take me there", "no", "No thanks" }
			}
		};

		public static void OnUpdate()
		{
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			if (!lastNotification.HasValue)
			{
				lastNotification = Time.time;
			}
			else if (NocturnalLicense.SendNotifications.Value && Time.time - lastNotification >= (float)NocturnalLicense.NotificationInterval.Value)
			{
				lastNotification = Time.time;
				NotificationSystem.Notify(notifs[Random.Range(0, notifs.Length)]);
			}
		}
	}
	public static class UserHints
	{
		public static void IssueUpdateNoticeIfNecessary()
		{
			Version value = new Version(NocturnalLicense.LastVersion.Value);
			if (new Version("2.0.0").CompareTo(value) == 1)
			{
				NocturnalLicense.LastVersion.Value = "2.0.0";
				NotificationSystem.NotifySend("<color=#3a93e9>Nocturnal OS</color> notice", "Your license has expired. Go to the Thorn menu (" + ThornModule.Instance.OpenClickGUI.Value.ToString(true) + ") to activate a new license.", (Sprite)null, Path.Combine(Core.workingDir, "icon.png"), (Urgency)1, "NotifySend", 0u, (Dictionary<string, string>)null, 10000);
			}
		}

		public static void IssueUpdateNoticeIfNecessary(Scene _, LoadSceneMode __)
		{
			IssueUpdateNoticeIfNecessary();
		}

		public static void Initialize()
		{
		}

		static UserHints()
		{
			SceneManager.sceneLoaded += IssueUpdateNoticeIfNecessary;
		}
	}
}