Decompiled source of SplashText v2.3.0

Mods/SplashText.dll

Decompiled 2 months ago
using System;
using System.Collections;
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 BoneLib;
using BoneLib.BoneMenu;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSLZ.Bonelab.SaveData;
using Il2CppSLZ.Marrow.SaveData;
using Il2CppSLZ.Marrow.SceneStreaming;
using Il2CppSLZ.Marrow.Warehouse;
using Il2CppTMPro;
using MelonLoader;
using MelonLoader.Preferences;
using MelonLoader.Utils;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using WeatherElectric.SplashText;
using WeatherElectric.SplashText.Melon;
using WeatherElectric.SplashText.Menu;
using WeatherElectric.SplashText.Scripts;
using WeatherElectric.SplashText.Scripts.Helpers;
using WeatherElectric.SplashText.Scripts.Lists;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Adds splash text to Void G114's menu.")]
[assembly: AssemblyDescription("Adds splash text to Void G114's menu.")]
[assembly: AssemblyCompany("Weather Electric")]
[assembly: AssemblyProduct("SplashText")]
[assembly: AssemblyCopyright("Developed by Mabel Amber")]
[assembly: AssemblyTrademark("Weather Electric")]
[assembly: AssemblyFileVersion("2.3.0")]
[assembly: MelonInfo(typeof(Main), "SplashText", "2.3.0", "Mabel Amber", "https://bonelab.thunderstore.io/package/SoulWithMae/SplashText/")]
[assembly: MelonColor(255, 255, 239, 0)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyVersion("2.3.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 WeatherElectric.SplashText
{
	public class Main : MelonMod
	{
		internal const string Name = "SplashText";

		internal const string Description = "Adds splash text to Void G114's menu.";

		internal const string Author = "Mabel Amber";

		internal const string Company = "Weather Electric";

		internal const string Version = "2.3.0";

		internal const string DownloadLink = "https://bonelab.thunderstore.io/package/SoulWithMae/SplashText/";

		public static Save SaveData;

		public override void OnInitializeMelon()
		{
			ModConsole.Setup(((MelonBase)this).LoggerInstance);
			Preferences.Setup();
			BoneMenu.Setup();
			UserData.Setup();
			TemplateProcessing.CacheUserFiles();
			TemplateProcessing.CacheSteamGames();
			SaveData = ((MarrowDataManager<DataManager, Save, Settings, PlayerSettings, PlayerProgression, PlayerUnlocks>)(object)DataManager.Instance)._activeSave;
			Hooking.OnUIRigCreated += OnUIRigCreated;
		}

		private static void OnUIRigCreated()
		{
			if (!(((Scannable)SceneStreamer.Session.Level).Barcode.ID != "fa534c5a868247138f50c62e424c4144.Level.VoidG114"))
			{
				ModConsole.Msg("Void G114 loaded, creating splash text host", 1);
				TextManager.Start();
			}
		}
	}
}
namespace WeatherElectric.SplashText.Scripts
{
	internal static class TextManager
	{
		private static GameObject _splashTextHost;

		private static TextMeshPro _textMeshPro;

		public static void Start()
		{
			CreateGameObject();
			SetGameObjectPosition();
			SetText();
		}

		private static void CreateGameObject()
		{
			GameObject val = FuckYouSLZ("//-----UI");
			ModConsole.Msg("Found UI root: " + ((Object)val).name, 1);
			Transform obj = val.transform.Find("CANVAS_UX");
			ModConsole.Msg("Found canvas root", 1);
			Transform val2 = obj.Find("MENU");
			ModConsole.Msg("Found menu root", 1);
			GameObject gameObject = ((Component)val2.Find("txt_buildInfo")).gameObject;
			ModConsole.Msg("Found build info object", 1);
			_splashTextHost = Object.Instantiate<GameObject>(gameObject, ((Component)val2).transform);
			ModConsole.Msg("Created splash text host", 1);
			static GameObject FuckYouSLZ(string name)
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				Scene activeScene = SceneManager.GetActiveScene();
				return ((IEnumerable<GameObject>)Il2CppArrayBase<GameObject>.op_Implicit((Il2CppArrayBase<GameObject>)(object)((Scene)(ref activeScene)).GetRootGameObjects())).FirstOrDefault((Func<GameObject, bool>)((GameObject rootObject) => ((Object)rootObject).name == name));
			}
		}

		private static void SetGameObjectPosition()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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)
			if (!((Object)(object)_splashTextHost == (Object)null))
			{
				RectTransform component = _splashTextHost.GetComponent<RectTransform>();
				ModConsole.Msg("Got splash text rect", 1);
				((Transform)component).position = new Vector3(28.1982f, 2.1303f, -3.7628f);
				ModConsole.Msg("Set splash text position", 1);
				((Transform)component).rotation = Quaternion.Euler(0f, -180f, 30f);
				ModConsole.Msg("Set splash text rotation", 1);
				((Transform)component).localScale = new Vector3(10f, 10f, 10f);
				ModConsole.Msg("Set splash text scale", 1);
				((Object)_splashTextHost).name = "SplashTextHost";
				ModConsole.Msg("Renamed splash text host", 1);
				_textMeshPro = _splashTextHost.GetComponent<TextMeshPro>();
				((Graphic)_textMeshPro).color = Color.yellow;
			}
		}

		public static void SetText()
		{
			if (!((Object)(object)_textMeshPro == (Object)null))
			{
				switch (Preferences.SplashMode.Value)
				{
				case SplashMode.Minecraft:
					((TMP_Text)_textMeshPro).text = MinecraftSplashes.GetRandomSplash();
					break;
				case SplashMode.UserEntries:
					((TMP_Text)_textMeshPro).text = EntryHelper.GetRandomEntry();
					break;
				case SplashMode.Bonelab:
					SetBonelabSplash();
					break;
				case SplashMode.Terraria:
					((TMP_Text)_textMeshPro).text = TerrariaSplashes.GetRandomSplash();
					break;
				default:
					ModConsole.Error("Invalid splash mode! Defaulting to BONELAB.");
					SetBonelabSplash();
					break;
				}
			}
		}

		private static void SetBonelabSplash()
		{
			if (Preferences.OfflineMode.Value)
			{
				((TMP_Text)_textMeshPro).text = BonelabSplashes.GetRandomOfflineSplash();
			}
			else
			{
				BonelabSplashes.GetRandomOnlineSplash(Boobs);
			}
			static void Boobs(string text)
			{
				((TMP_Text)_textMeshPro).text = text;
			}
		}
	}
}
namespace WeatherElectric.SplashText.Scripts.Lists
{
	public static class BonelabSplashes
	{
		public delegate void FetchTextCallback(string fetchedText);

		internal static readonly string[] Splashes = new string[91]
		{
			"Into the void with you!", "What up, son!", "Thursday, Yes, This Thursday!", "how i get spiderlab?", "bring back bonetome", "zonelab", "cam PLEAS give me the mono build", "why'd they make this game il2cpp", "Sadly On Quest!", "Also try Boneworks!",
			"Also try Duck Season!", "Also try Hover Junkers!", "Also try Half Life Alyx!", "Also try Nervbox!", "the blankbox entity is here", "rigmanager's null lol", "today i will sync physics; duplicalte camera", "The new source of bodycam footage for edgy kids!", "I bet my life it'll be Thursday!", "evil brandon be like: i WILL release a update on thursday",
			"cant wait for project 4!", "MissingMethodException: Default constructor not found for type UnityEngine.Video.VideoPlayer", "TargetException: Instance constructor requires a target", "il2cpp compiler removing all useful components", "Invalid pallet.json!", "There you go!", "Pick it up!", "Put it down!", "Don't fence me in!", "Stuck inside this desert hell!",
			"Dogs are gonna get what you hold dear!", "Nulla Molles Accentus", "Faciem Coegi Vos", "I'm feelin so strange", "Ima Say Ma Namowa!", "Never enough photons.", "NEP.Paranoia.Scripts.Managers.ParanoiaManager!", "breadsoup's cooking \ud83d\udd25", "6 hour buffer fucking SUCKS", "i'm gonna put 9 realtime lights in the scene, suffer",
			"Only [PalletCount] mods installed? smh", "[CurrentAvatar]? what a lame avatar", "oh cool, [CurrentAvatar], thats a good avatar", "lol [Height]", "you really use [RandomFavoriteSpawnable]?", "you liked [RandomFavoriteAvatar] enough to put it in your BODYLOG?", "you csnt act like I dont innovare bonelab", "there's a nullbody behind you btw", "Now on Nintendo Labo!", "Use mod-help instead of mod-general you dinguses",
			"pysics sink", "hop on entanglement", "use UABE to install mods!", "the grand migration to melonloader 0.2", "C:/Users/[UserName]/AppData/LocalLow/Stress Level Zero/BONELAB/Mods!", "Patch 7?", "bring back bw chaos", "oregano's texture streaming hell!", "hi adam!", "hi cam!",
			"hi [UserName]!", "with the man who sold the world", "fuck you, i'm putting mesh colliders on everything. convex? no, CONCAVE!", "BL unity upgrade to 2022 when", "I WILL NEVER PACK FOR QUEST!", "damn shader variants", "LitMAS Standard!", "RIP depth texture (on quest lol)", "RIP constant force (on quest lol)", "Don't bother with the dungeon warrior secret, its ass",
			"[RandomFavoriteSpawnable] isn't even good.", "hey wait, you're not [CurrentAvatar], you're [UserName]!", "this is the 73rd line of the splash text list!", "im a wizard, watch, you have [RandomFavoriteAvatar] on your bodylog, was i right?", "cam's furry comission will be in patch 7!", "quest code modding died, rest in piss", "hateful of all else!", ":3", "fuck you, i'm a bonelab splash", "fuckin [UserName] is here",
			"do you think steam would take down bonelab's page because the game uses AI in some places", "my mom asked me if i did the dishes. i yelled \"StressLevelZero!” and she smiled. she knew it was washed.", "the hands will get you.", "fuck you [UserName]", "SLZ PLEAS make hotmk and b-side for just PC", "Quest: A Detriment To VR!", "<color=\"yellow\">and when you return to the place that you call home, <color=\"green\">he <color=\"yellow\">will be there, <color=\"green\">he <color=\"yellow\">will be there.", "if this game had wallrunning it'd be peak", "this mod is loaded by an actually good modloader!", "<color=\"green\">Ford",
			"get pink screen of death'd, idiot"
		};

		private const string SplashAPI = "https://splashtext.weatherelectric.xyz/";

		public static void GetRandomOnlineSplash(FetchTextCallback callback)
		{
			MelonCoroutines.Start(FetchText(callback));
		}

		private static IEnumerator FetchText(FetchTextCallback callback)
		{
			UnityWebRequest request = UnityWebRequest.Get("https://splashtext.weatherelectric.xyz/");
			UnityWebRequestAsyncOperation asyncOperation = request.SendWebRequest();
			while (!((AsyncOperation)asyncOperation).isDone)
			{
				yield return null;
			}
			if ((int)request.result == 1)
			{
				string text = request.downloadHandler.text;
				ModConsole.Msg("Text recieved: " + text, 1);
				text = TemplateProcessing.Process(text);
				callback(text);
				yield break;
			}
			ModConsole.Error("Failed to fetch random text. Webserver is likely offline. Using backup method.");
			Result result = request.result;
			ModConsole.Error("Webrequest Result: " + ((object)(Result)(ref result)).ToString());
			result = request.result;
			if (result - 2 <= 1)
			{
				ModConsole.Error("Error: " + request.error);
			}
			callback(GetRandomOfflineSplash());
		}

		public static string GetRandomOfflineSplash()
		{
			Random random = new Random();
			return TemplateProcessing.Process(Splashes[random.Next(Splashes.Length)]);
		}
	}
	public static class FileContents
	{
		private static readonly string[] Texts = new string[391]
		{
			"fish", "PREPARE THYSELF", "JUDGEMENT!", "WARNING: EXTREME DAMAGE SUSTAINED.RUNNING DIAGNOSTICERROR: ARM CORE MODULE #1 NOT RESPONDINGERROR: ARM CORE MODULE #2 NOT RESPONDINGWARNING: COMBAT SYSTEMS INOPERABLEATTEMTPING RECONSTRUCTIONERROR: SELF-REPAIR NEXUS NOT RESPONDINGINSUFFICIENT BLOODINSUFFICIENT BLOODINITIATING ESCAPE PROTOCOLATTEMTPING CONNECTION WITH LIMBIC MODULESERROR: LEG CORE MODULE #1 NOT RESPONDINGERROR: LEG CORE MODULE #2 NOT RESPONDINGWARNING: UNABLE TO SUSTAIN MOTOR FUNCTIONSERROR: VISUAL CORTEX MALFUNCTIONERROR: LIMBIC FUNCTION NOT RESPONDINGINSUFFICIENT BLOODINSUFFICIENT BLOODWARNING: UNABLE TO SUSTAIN INTERNAL ORGANS! PULSE FAILURE !! PULSE FAILURE !! PULSE FAILURE !-!- SHUTDOWN IMMINENT -!-ERROR: NO VOCAL INTERFACE DETECTED. UNABLE TO COMPLETE TASK! PULSE FAILURE !! PULSE FAILURE !INSUFFICIENT BLOODINSUFFICIENT BLOODWARNING: UNABLE TO SUSTAIN BASIC FUNCTIONS-!- SHUTDOWN IMMINENT -!--!- SHUTDOWN IMMINENT -!-I DON'T WANT TO DIE.I DON'T WANT TO DIE.I DON'T WANT TO DIE.I DON'T WANT T", "hi :3", "hi [UserName]", "[CPU]", "hey man, nice shot!", "no not now", "maybe later",
			"it's the only way to live, in cars", "oh no, not me, i never lost control", "always on about the day it should have flown", "you can't stake your lives on a savior machine", "go play titanfall 2", "we should kill elon musk", "yt-dlp is better than youtube-dl", "kill john lennon", "the grabbing hands grab all they can", "blank stare, disrepair, there's a big black hole gonna eat me up someday",
			"and when you return to the place that you call home, we will be there. we will be there.", "nico you're blue", "[FreeDiskSpace] out of [TotalDiskSpace], and this file is taking up just a LITTLE bit more :3", "you know what that means, FISH!", "[RandomFavoriteSpawnable] stinks", "hi [CurrentAvatar]", "my name is david, dad, i want some ice cream, david, that is my name, david, i want another, david, where is my ball? i'm running out on the road, there is a car, and it is going to hit me", "gomer", "d'oh", "jake get a job, jake get a job, jake get a job, a job jake get",
			"go play littlebigplanet 2", "rip scrieel scrieq squirel rip rrelq quis squer reuq rille skin skin squiriel", "nba a afas", "kill it all for a like supreme", "will you bite the hand that feeds you?", "will you stay down on your knees?", "switch on the TV, we may pick him up on channel two", "could you wanna take my picture?", "cause i won't remember", "go listen to the fragile",
			"go listen to the pleasure principle", "go listen to absolution", "go listen to short bus", "go listen to rat wars", "go listen to welcome oblivion", "here in my car, i feel safest of all", "you say too late to start, got your heart in a headlock", "i call me, sweet alibi", "i don't have to see you right now", "i'll set fire to the whole place",
			"go play risk of rain 2", "what goes up must come barreling down", "it's behaviour not behavior", "this is more than a party", "it ain't easy to get to heaven when you're going down", "you desecrate the things that you don't understand, come catch me if you can", "did you think you were cool?", "so cool", "hey my children, what seems important won't last forever", "rush in with your dogs, clear out the cobblestone",
			"go listen to loksmith", "go play psychonauts 2", "go play psychopomp gold", "woah it's so insane to synthesize another strain", "there's something in these futures that we have to be told", "future's made of virtual insanity", "my mallory heart is sure to fail", "i could crawl around the floor just like i'm real", "like you", "you had all of them on your side, didn't you?",
			"you believed in all your lies, didn't you?", "daydream, i fell asleep amid the flowers", "all the blood lying on the floor", "sense the crowd expecting something more", "opened up, proudly on display", "what we tried so hard to hide away", "trying to fill the spaces in between", "you know what you have done", "welcome oblivion", "the beginning is the end, and it keeps coming around again",
			"you wait your turn, you'll be last in line", "this is the beginning", "are you looking for the truth or for another fight?", "this man and his army are praying in their fortresses making guns of steeples", "technology has failed us, gunshots by computer", "shame on us, doomed from the start, may god have mercy on our dirty little hearts", "shame on us, for all we have done, and all we ever were, just zeros and ones", "you will find a better place in this twilight", "this prison, to hold, ME?", "all i can do, driving me through, into you",
			"someday, fades away, like a memory, or a place that you'd rather be", "what if this whole crusade's a charade, and behind it all there's a price to be paid for the blood on which we dine, justified in the name of the holy and the divine", "just how deep do you believe?", "et quand le jour arrive, map toune le ciel, et map toune la mer, et la mer ve embrasse moi, et delivre moi lakay, an rien peut arreter moi konin la", "and when the day arrives, i'll become the sky, and i'll become the sea, and the sea will come to kiss me, for i am going home, nothing can stop me now", "and just for the record, just so you know, i did not believe that you could sink so low", "are you alone? isn't everyone?", "you're free to die, i'm not going to stop you", "through every forest, above the trees, within my stomach, scraped off my knees", "same as it ever was",
			"lettin' the days go by, let the water hold me down", "and i am the willing victim of a cannibal", "you understand mechanical hands are the ruler of everything", "it's never to late to re-invent the bicycle", "this ballgame's in the refridgerator, the door is closed, the lights are out, and the butter's getting hard", "what a splendid pie, pizza pizza pie, every minute every second, buy buy buy buy buy", "pepperoni and green peppers, mushrooms, olives, chives", "need therapy, therapy, advertising causes need", "war is overdue, the time has come for you to shoot your leaders down", "aim, shoot, kill your leaders, aim, kill them all",
			"hey can you go give me a reason to listen to hey man nice shot, just like find that orange idiot and actually hit your target unlike the last guy", "kill the president", "wild and bereft, assassin is born", "amortise, downsize, lay off", "what a pathetic string of words", "i don't believe it, i had to see it, i came back haunted", "i think i may have even listened to you, at the height of my demise", "breath, breathe, breathe, break through the surface and breathe", "i am forgiven, i am free, i am a field on fire", "i tried to get so high, i made it ten miles high",
			"all i do i can still feel you", "underneath it all, we feel so small", "the heavens fall, but still we crawl", "he couldn't believe how easy it was", "iwouldnevertellyouanythingthatwasntabsolutelytruethathadntcomerightfromhismouthandhewantsmetotellyou", "iamtryingtobelieve", "we think we climb so high, up all the backs we've condemned", "and when you return to the place that you call home, we will be there. we will be there.", "into fire you can send us, from the fire we return", "you can label us a consequence of how much you have to learn",
			"but you'd do the same thing in the circumstance i'm sure you'll understand", "everything is right on track, we are letting you get away", "you will never, ever, ever get to me in here", "so what are you waiting for?", "did it fix what was wrong with you?", "are you <?", "go and look what you've gone done, come on, welcome oblivion", "the world is bleeding out, it folds itself in two", "behind the background world is always bleeding through", "are you sure this is what you want?",
			"as hard as you try not to see it", "and this is not my face, and this is not my life", "i shouldn't go, but you're wrenching, dragging, shaking me", "turn off the sun, pull the stars from the sky", "when figures from the past stand tall", "he dreamed a god up and called it christianity", "if there is a hell, i'll see you there", "will you die for this?", "burning with your god in humility", "this is the last time i'll abandon you",
			"and this is the last time i'll forget you", "I wish I could", "And I don't want you to think that I care, I never would, I never could again", "iirc there was someone in the bw community that slowly faded away from it and one time i checked their twitter, and they liked a tweet saying 'peeing yourself is super cute' guh, am i right", "thinkin abt the joys of inhaling from a fine cuban smokeable whilst kicking up ones feet in a sun-drenched tropical paradise (like isle delfino)", "thinkin abt how much fun twisty straws were to drink chocolate milk through as a child", "thinkin abt the immorality of eating string cheese bite-by-bite instead of peeling off strings and eating those strings", "thinkin abt that time Reggie Fils-Aimé, as then president of Nintendo of America, said 'Link is hot' on national television", "thinkin abt whether or not a quirked out boy could be considered goated with the sauce given the precondition that they are busting it down (sexual style)", "thinkin abt jackin off w/ icyhot and finishin before it reaches the hot part",
			"thinkin abt the disturbing lack of sympathy for the coin eaters of the world", "thinkin abt the disappointing decline in swag throughout this once great country, and on a larger scale, the world", "thinkin abt the fact that in 1998, The Undertaker threw Mankind off Hell In A Cell, and plummeted 16 ft through an announcer's table", "couldnt handle that they/them pussy", "the he/they talkin?", "is it gay to say youd give markiplier head? hes a marvel of humanity, so i say its like looking at the mona lisa - but better. cause its markiplier. and youre not just looking.", "everhood goes hard, play that banger game", "they call me a tv network cause i serialize murder", "smoking dick", "fuck you if youre from the midwest theres a reason they call it the MIDwest, cause everything there is MID the food, the 'culture', the people all MID.",
			"this mod is only 8 GB without all these strings btw\n(this is not true in this case, this is from BW chaos)", "amazon did a great job of making people think shipping is both a trivial cost and trivially easy to make fast.", "The Industrial Revolution and its consequences have been a disaster for the human race. They have greatly increased the life-expectancy of those of us who live in “advanced” countries, but they have destabilized society, have made life unfulfilling, have subjected human beings to indignities, have led to widespread psychological suffering (in the Third World to physical suffering as well) and have inflicted severe damage on the natural world. The continued development of technology will worsen the situation. It will certainly subject human beings to greater indignities and inflict greater damage on the natural world, it will probably lead to greater social disruption and psychological suffering, and it may lead to increased physical suffering even in “advanced” countries", "kopunit", "dereferencing a null pointer", "doing 'if (value == true)'", "coalescence in JS using the falsy values, null, undefined, false, an empty string, 0, and NaN", "women call me life cause im the longest thing theyll ever experience, and im hard af", "      hi :)", "the breakcore intelligent dance music hyperpop gigashart robloxcore megafuck music",
			"mfs ask if im good like im not fantastical in perpetuity", "yield return null;", "this source code is a MESS", "do it grip the meat?", "pussy so wet i became percy jackson's dad", "do diabetics swap insulin pumps instead of shaking hands", "pussy so wet i thought i saw a pineapple, rock, and moyai", "thank god im athiest", "i wonder if the sock will ask for child support", "1-703-697-1001",
			"192.168.182.73 this u bro?", "thinkin abt that one DAW plugin that was a synth with a cat meowing the sound the synth was making", "GO Bank (collaboration heist with Counter Strike: Global Offensive) from Payday 2 (sequel to Payday: The Heist)", "I SIP. PURE. <i>WOCK.</i>", "can we honestly e date? you're so beautiful. You always make me laugh, you always make me smile. You literally make me want to become a better person... I relly enjoy every moment we spend together. My time has no value unless its spent with you. I tell everyone of my irls how awesome you are. Thank you for being you. Whenever you need someone to be there for you, know that i'll always be right there by your side. I love you so much. I don't think you ever realize how amazing you are sometimes. Life isn't as fun when you're not around. You are truly stunning. I want you to be my soulmate. I love the way you smile, your eyes are absolutely gorgeous. If I had a star for everytime you crossed my mind i could make the entire galaxy. Your personality is as pretty as you are thats saying something. I love you, please date me. I am not even calling it e dating anymore because I know we will meet soon enough heart OK I ADMIT IT I LOVE YOU OK i fucking love you and it breaks my heart when i see you play with someone else or anyone commenting in your profile i just want to be your boyfriend and put a heart in my profile linking to your profile and have a walltext of you commenting cute ethings i want to play video games talk in discord all night and watch a movie together but you just seem so interested in me it fucking kills me", "\ud83e\udeb1 (if u cant see it, this is a worm emoji)", "ORPHANS ARE A DRAIN ON THE SYSTEM AND SHOULD BE REMOVED ...from system memory.", "u should play Septic Survival", "you got the dud!", "nothing beats a bald scrotum",
			"Under Articles 1 and 2 of the document Rules and Info, you are prohibited from sending homosexual porn in the general chat on the Unofficial BONELAB Discord Server", "Announcement to release window of 6 days. Hope my divorce has that kind of turnaround time.", "Drop kick a bitch", "He looks just like you, poindexter!", "Get Addicted To Nicotine To Combat Depression. -Chair", "if your avatar is your fursona, i regret to inform you that originality is not your strong suit", "i need pussy from a bitch from the psych ward", "forget pussy from a bitch from the psych ward, i need bussy from a boy who knows 5+ javascript frameworks", "autism speaks, but maybe we <i>shouldn't</i> listen. ", "WARNING - HEALTH AND SAFET <b>   NOBODY CARES   </b> ",
			"<sup><b>Press your Penis into buttcunts. yis.</b></sup>", "<b>Stop Using Your Cock To Fuck That Sock</b> Learn this simple trick and she'll beg to suck your dick! <sup><b><u>Click here to learn more >></u></b></sup>", "i'm looking for a boy with amazing elves who can sucj the bark off a dog", "press <b>X</b> to get Goombella to talk your ear off about a bunch of borring bullshit in battle, she attacks with Donkey Kong", "that security guard guy is always complaining about being a Hot Dad..", "All bitches that Mario has on his diiiiiiiiick.", "KILLA UP ?", "OW, SPIDER BIT ME BAD SPIDER BITE BIT ME HOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", "ILL THROW IN A BRAND NEW CAR, BEHIND ONE OF TWO DOORS, CHOOSE WISELY.  WILL MAR MAR CHOOSE THE CORRECT DOOR OR WILL HE GET A BOX OF DEAD KITTENS!?  SORRY IT WAS THE DEAD KITTYS", "Rub your hot salami all up in between my toes. ITS REALLY GOOD TRUST ME.",
			"HALF MY FAT GOES TO MY ASS AND THE OTHER TO MY TOES, THESE TOES ARE BASICALLY THE BOOTY", "GOD I wish I had a mouth so I could stuff my face in and motorboat those fine tits of light's.", "JENNA ORTEGA AND JULIA ORTEGA PLEASE COME TO MY HOUSE! ITS JUST SO WE CAN CHAT AT LEAST.", "marijuana is now legal everywhere! mmmkay", "Joe Biden has no idea what he is doing... Sleep maybe?", "FEDS have my brokerage account can't trade but will get car anyway KKKKKKKKK!!!", "ALL NUCLEAR WEAPONS MUST BE DEACTIVATED!! For the sake of the people..,", "Ain't no RICO case that can stop another brody from droping!!!!", "I ain't in a gang you just caught me hangin with em!!!!!", "The FEDS are on me bro what is this life. GTA type shit maybe my mic will work today @FBI please daddy. Also @CIA",
			"Can I have the presidential position? @JoeBiden", "How can I bring nothing to the table!?!When I'm the table!!!", ".@JoeBiden any ideas sir, on how to proceed?!", "Dense fucks everywhere in politics here in America but we can fix that! Corruption on many levels", "Marry me @jennaortega", "BACK FROM JAIL ... AGAIN. Update soon!!! ZThey say I'm a menace to society!!", "Another day another dollar as they say!!!!", ".@FBI what is the solution here?! @Ferrari I need 4 cars sir can you help?", "Most of the demons have been conquered! World peace is more achievable than ever. This life is worth living ... we are all just trying our best!", "Is everyone brainwashed or am I retarded?!",
			"Am I an AI?", "im just like my car i drive when i get ethanol in me.", "The HTTP status 418 indicates that the server is, in fact, a teapot. On the Mozilla Web Docs, it's listed as \"418 I'm a teapot\"", "hwabag long live the sharty", "im religious af the way all i make r god classes", "got so much sauce these bitches call me a1", "get out my kitched if u dont like the way i cook", "ive seen vids of ppl slammin the birthday boy's face in cake.... i hope they slam my face in <i>her</i> cake...", "She pine for my needle till I give her a seedling", "she gherkin my pickle till i strike a dill on the prenup",
			"fuck 'freedom fighters' and 'liberation', <i>I'm</i> the only cause im interested in.", "bush did it", "Diane Feinstein was born before the invention of Chocolate Chip Cookies", "you can buy a wall mounted water fountain (like the ones at school) for $401 on amazon", "the wonderful rizzard of oz", "Yeah you could say I have a porn addiction. An addiction to porn myself another glass of dr.pepper", "i got her ice-screamin \ud83c\udf66\ud83c\udf66\ud83c\udf66 when i put a banana split in it \ud83c\udf4c\ud83c\udf4c\ud83c\udf4c", "had 2 hit it from tha bak cz da front wasnt tite enuf", "im a devout christian if a solicitor ever comes to my home, ill share the love of god with them by sending them to him.", "I need me a trip down mammary lane \ud83d\ude4f\ud83d\ude4f\ud83d\ude4f",
			"hulu + disneyplus + netflix + paramountplus + peacock + prime video + hbo max + apple tv plus: like $104/mo  <b>qbittorrent (free) and a paid vpn: like $5/mo</b> follow for more financial advice.", "to improve aerodynamics, remove your car's side mirrors. this will increase fuel efficiency and reduce drag, so you'll accelerate faster and, more importantly, <b>get more miles per gallon!</b> follow for more financial advice", "coom eternal jerk and stroke until it is cum", "being poor is a choice", "the only mental health i need is at the bottom of budweiser", "the statue of liberty is the only woman i respect", "the only difference between france and germany is that theyre too ethnic", "the greatest american sport is fishing. runner up: tax evasion", "someone should make a bunch of immigrants battle in a demolition derby, last functional truck wins. and call it deportation derby", "No service employee is a legitimate member of the working class",
			"It’s not fair that it’s easier for white people to get sunburnt ", "It should be aspirational to hit 7k rpm on/near a residential (Straight piped)", "If it’s just hand stuff it doesn’t count as gay. Same with topping.", "Tipping is for suckers", "if you have a pet you should recognize that as a mistake and instead replace all your pets with firearms", "teachers and nurses should be paid less actually. whats a nurse even? stock a vending machine with advil and it can do the same job and if teachers want to make more money they should be smart enough to be principals", "i miss the hollywood blacklist", "coal is good actually. the only way to improve it is by making it dirtier and possibly if woody spacey owned a coal mine.", "abraham lincoln deserved it", "sushi should be made with grapes",
			"miss piggy is a full-on sex offender", "The best part of a white christmas is the white part", "we should encourage more people to use motorcycles as they bolster the availability of donor organs", "donuts are gay bagels and should be restricted and/or criminalized in the middle east as such", "if you pay money for a game that is less than 20 hours in length than youre a money-squandering fool who should be taxed one above your bracket so that the government can spend it in a wiser manner", "We should normalize platonic creampies", "we should start graping and martyring", "hey whats up guys i just took this gay test it says i passed.  <i>hey wait...</i>", "women only want things from you. alcohol will listen thoughtfully. jagermeister is calling. smirnoff is on the line. everclear is looking for you.", "i want a cheeseburger, pussy, and a cigarette",
			"shorty gimme theatrical head, call her the phantom of the slopera", "i call yo mama Vietnam the way she got all my dong", "“THRASHER” style shirt that says “THATCHER”, with “WICKED BITCH ☠\ufe0f” below", "Never trust a man in a white suit. He has enough money to buy a new one if he ever stains it, and you dont get \"white suit money\" without doing bad things.", "slap bass like a military man's wife, call that a funky beating", "I need that bass slapped like a woman who'll show up to court and say \"HE NEVER DID ANYTHING STOPPPPP\"", "Better caul sall", "According to my SSD's power on count and power on hours, my PC's average uptime is around 1 week (157.9 hours aka 6.6 days)", "democracy means 'government by the people, of the people, for the people', but the people are fucking dumb", "i need to do a demographic survey of my haters cuz the more they pray for me the bigger my stacks, so im tryna get some more catholic haters to pray for the wicked",
			"i call your mom UPS the way she throw that box at me", "if a clown farts on your balls it technically isn't gay because it's not human", "<b>communication tip</b>: \"i love you\" is 8 letters so is \"lets fuck\"  <b>communicate your intentions clearly and concisely</b>", "they say im always at ground zero the way i got her bedrockin", "call me daft punk the way i robot rocked your mothers world last night \u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b", "call me Kennedy the way she F. with my John", "georgia o queef", "Fun (?) fact: There are people that eat at Del Taco. i do not know who or why", "the best thing to come from the increased prominence of trucks (esp. lifted trucks) is the ease of access to fresh catalytic converters", "my body is a machine that takes Kickstart My Heart by Motley Crue and turns it into speeding tickets",
			"u ever think a neurosurgeon looks at someones brain and goes i bet those wrinkles feel sooooo gooooooodddd...", "time is a whore that doesnt stop sucking", "I wish I had someone that had me like Costco food court/rotisserie chicken got me", "They call me Goku the way I be dragon my balls over their moms faces", "call that pussy the matrix cuz im in this bitch and cant get out", "slowly fadin into darkness and i let the darkness take him", "i need more sequoia banshee boogers ", "dont be shy girl i love me some pastrami mud flaps", "welcome to the cream kingdom bitch open up", "i balled so hard they thought i was a nutsack",
			"popped a perc 30 got straight to fuckin", "me manipulating my 4 foot long vr e-penis after the 3d model avatar of my clock app says \"its time for you to get some...\" while my friend thomas watches everything happen live via the cast to my google chromecast ultra that i got free as a part of buying the stadia founders edition pack\n", "nexus gives hella ads to users, throttles downloads like shit, limits simultaneous downloads, and killed my grandma", "APFS killed my grandma", "this lil guy killed my grandma have some respect", "this clip killed my grandma", "these probes killed my grandma", "these colliders killed my grandma", "hlbs killed my grandma how insensitive of you", "this pizza killed my g",
			"camobiwon killed my grandma", "i bet cam killed my grandma", "patch 3 going on the live branch killed my grandma", "A 2003 Acura CL Type-S fuel pump killed my grandma", "this version number killed my grandma", "3 pixel delta killed my grandma", "this site killed my gr corolla", "i will forever consider your mental faculties diminished for that", "lets see if this is true or gay porn", "its gay porn",
			"THIS FUCKING SUCKS \ud83d\udd25\ud83d\udd25\ud83d\udd25\ud83d\udd25\ud83d\udd25\ud83d\udd25", "FUCK YOUR PLUNGER", "fuck these trucks", "OBJECTS IVE SHOVED UP MY ARSE", "I REALLY HATE SIMON FUCKING COWELL", "PEOPLE I DONT REALLY LIKE\nYOU\nMYSELF\nSIMON FUCKING COWELL", "THE TWAT", "PENS", "PENCILS", "COINS",
			"PEBBLES", "BROOMSTICK HANDLE", "FISHING ROD HANDLE", "VIBRATORS", "MARGARET THATCHER IS DEAD", "DING DONG THE WICKED BITCH IS DEAD", "ITS A SHAME THE BITCH DIDNT DIE 87 YEARS AGO", "They shot our face, Johnny! THEY SHOT OUR FACE!", "Who up tugging they gooch", "rabbit — 01/01/2024 4:24 AM\nPrepare ur. Grave.  [EXTREMELYLOUDINCORRECTBUZZER]",
			"I got a big AR this’ll turn you to piss", "Trailer 1\nTuesday, December 5th\n9AM ET", "YSL cologne bitch, this not Axe", "bn g", "gf", ".n", "etjrh", "do you like my car", "for the love of god and all that is holy my anus is bleeding", "pewdiepie bridge incident",
			"i am the milkman. my milk is delicious.", "i am the milkman. my milk is delicious. special delivery today.", "everybody wants to be a cat", "look at this dude", "oh moon of alabama", "kill yourself", "fuck you, i like the color red", "go fuck the sidewalk already", "gimme the cummies", "bitch i am a cow",
			"quack", "the only thing i hate more than myself is you", "oh my god, i just realized that the word \"dick\" is in \"dictionary\". that's so funny, i'm gonna tell my friends about this.", "booty is the only thing that matters", "dick", "you're gonna get a visit from the FBI", "string cheese is the only thing that matters", "System.out.println(\"Boobs\");", "i'm eating a banana", "a banana",
			"qweef"
		};

		public static string GetRandomText()
		{
			Random random = new Random();
			string obj = Texts[random.Next(Texts.Length)];
			TemplateProcessing.Process(obj, skipActions: true);
			return obj;
		}
	}
	public static class MinecraftSplashes
	{
		private static readonly string[] Splashes = new string[242]
		{
			"...!", ".party()!", "IS YOU! I HAVE MY FRIEND", "1% sugar!", "100% pure!", "10 years of Mining and Crafting! It’s a Minecraft anniversary!", "12 herbs and spices! It’s a parody of KFC?!", "12345 is a bad password! What should you do?", "150 bpm for 400000 minutes!", "150% hyperbole!",
			"20 GOTO 10!", "4815162342 lines of code!", "90% bug free!", "90210!", "A skeleton popped out!", "Absolutely fixed relatively broken coordinates?", "Absolutely no memes!", "Afraid of the big, black bat! You gonna run away", "Age of Wonders is better!", "Ahhhhhh!",
			"All inclusive!", "All is full of love! Even the Icelanders", "All rumors are true!", "\"Almost never\" is an interesting concept!", "Also try Braid!", "Also try Limbo!", "Also try Mount And Blade!", "Also try Pixeljunk Shooter!", "Also try Project Zomboid!", "Also try Super Meat Boy!",
			"Also try Terraria!", "Also try VVVVVV!", "Also try World of Goo!", "An illusion! What are you hiding?", "Any computer is a laptop if you're brave enough!", "A riddle, wrapped in a mystery!", "As seen on TV! “What the heck is this?!”", "Ask your doctor! If you have a syndrome,severe,headache etc", "\"Autological\" is…", "Autonomous!",
			"Awesome community!", "Awesome game design right there!", "Awesome! This is Cool", "Bees, bees, bees, bees!", "Bekarton guards the gate!", "Best in class!", "Big Pointy Teeth!", "Bigger than a bread box!", "Blue warrior shot the food!", "Boats FTW",
			"Boots with the fur!", "Bread is pain!", "Bring it on!", "Bring me Ray Cokes!", "Bringing home the bacon!", "BTAF used to be good!", "Buckets of lava!", "Buzzy Bees!", "Call your mother!", "Casual gaming!",
			"Ceci n'est pas une title screen!", "Check it out!", "Check out the far lands!", "Child's play!", "Classy!", "Closed source!", "Cloud computing!", "Cogito ergo sum!", "Collaborate and listen!", "Colormatic",
			"Complex cellular automata!", "Consummate V's!", "Conventional!", "Cow Tools!", "Create!", "Cruising streets for gold!", "Cześć Polsko!", "Déjà vu!", "Déjà vu!", "Do it all, everything!",
			"Do not distribute!", "Do you want to join my server?", "Does barrel rolls!", "Doesn't avoid double negatives!", "Doesn't use the U-word!", "Don't bother with the clones!", "Don't feed avocados to parrots!", "Don't feed chocolate to parrots!", "Don't look directly at the bugs!", "Don’t worry, be happy!",
			"doot doot", "Double buffered!", "Down with O.P.P.!", "DRR! DRR! DRR!", "Dungeon!", "DungeonQuest is unfair!", "Engage!", "Enhanced!", "Eple (original edit)!", "Euclidian!",
			"Excitement!", "Exclusive!", "Exploding creepers!", "Extra things!", "Falling off cliffs!", "Falling with style!", "Fan fiction!", "Fantasy!", "Fat free!", "Feature packed!",
			"Finally complete!", "Finally with ladders!", "Finger-licking!", "Flashing letters!", "Flavor with no seasoning!", "Flaxkikare!", "Fnord!", "Follow the train, CJ!", "Freaky!", "Free dental!",
			"From the streets of Södermalm!", "Full of stars!", "Funk soul brother!", "FUNKY LOL", "Gargamel plays it!", "Gasp!", "Getting ready to drop!", "Getting ready to freak!", "Getting ready to know!", "Getting ready to shock!",
			"Getting ready to show!", "Getting ready to speak!", "Ghoughpteighbteau tchoghs!", "Replaced molten cheese with blood?", "Representing Edsbyn!", "Reticulating splines!", "Ride the pig!", "Rise from your grave!", "Rita is the new top dog!", "Rule #1: it's never my fault",
			"Run, coward! I hunger!", "Ryan also has amazing hair!", "Scary!", "See you next Friday or so!", "Seecret Friday update!", "Sensational!", "Sexy!", "Should not be played while driving", "Singleplayer!", "Slow acting portals!",
			"So fresh, so clean!", "Something funny!", "Something's not quite right...", "So sweet, like a nice bon bon!", "Spiders everywhere!", "sqrt(-1) love you!", "Stay a while, stay forever!", "Stay a while and listen!", "Stop being reasonable, this is the Internet!", "Stop, hammertime!",
			"Strange, but not a stranger!", "Sublime!", "Supercalifragilisticexpialidocious!", "Survive!", "Switches and ores!", "SWM forever!", "Swords for everyone!", "Synecdoche!", "Take an eggbeater and beat it against a skillet!", "Take frequent breaks!",
			"Take her pillow!", "Take the elevator to the mezzanine!", "Technically good!", "Technologic!", "Teetsuuuuoooo!", "Tell your friends!", "Terrestrial!", "Testificates!", "Thank you for the fish!", "That's no moon!",
			"That's Numberwang!", "That's super!", "The bee's knees!", "The creeper is a spy!", "The sky is the limit!", "The sum of its parts!", "The true meaning of covfefe", "There's no stopping the Trollmaso", "This is good for Realms.", "This is my true form!",
			"This message will never appear on the splash screen, isn't that weird?", "This text is hard to read if you play the game at the default resolution, but at 1080p it's fine!", "Thousands of colors!", "Throw a blanket over it!", "Throw yourself at the ground and miss", "Tip your waiter!", "Totally forgot about Dre!", "Tougher than diamonds, rich like cream!", "Treatment for your rash!", "Truly gone fishing!",
			"Try it!", "Try the mushroom stew!", "Try the Nether!", "Twittered about!", "Turing complete!", "Tyrion would love it!", "Ultimate edition!", "umop-apisdn!", "Undefeated!", "Undocumented!",
			"Une baguette!", "Uninflammable!", "Uses LWJGL!", "Verlet intregration!", "Very fun!", "Very influential in its circle!", "Vote for net neutrality!", "Warning! A huge battleship \"STEVE\" is approaching fast!", "Water bottle!", "Water proof!",
			"Welcome to your Doom!", "What do you expect?", "What’s the question?", "What's up, Doc?", "Where there is not light, there can spider!", "Who put it there?", "Whoa, dude!", "Woah.", "Woo, /v/!", "Woo, facepunch!",
			"Woo, reddit!", "Woo, 2pp!", "Woo, somethingawful!", "Woo, tigsource!", "Woo, worldofminecraft!", "Wow!", "Yaaay!", "Yay, puppies for everyone!", "Yes, sir!", "You can't explain that!",
			"You're going too fast!", "You've got a brand new key!"
		};

		public static string GetRandomSplash()
		{
			Random random = new Random();
			string text = Splashes[random.Next(Splashes.Length)];
			if (text.Contains("IS YOU! I HAVE MY FRIEND"))
			{
				text = Environment.UserName + " IS YOU! I HAVE MY FRIEND";
			}
			return text;
		}
	}
	public static class TerrariaSplashes
	{
		private static readonly string[] Splashes = new string[68]
		{
			"Dig Peon, Dig!", "Epic Dirt", "Adaman-TIGHT!", "Sand is Overpowered", "Terraria Part 3: The Return of the Guide", "A Bunnies Tale", "Dr. Bones and the Temple of Blood Moon", "Slimeassic Park", "The Grass Is Greener on This Side", "Small Blocks, Not For Children Under the Age of 5",
			"Digger T' Blocks", "There is No Cow Layer", "Suspicious Looking Eyeballs", "Purple Grass!", "No one Dug Behind!", "The Water Fall Of Content!", "Earthbound", "Dig Dug Ain't Got Nuthin On Me", "Ore's Well That Ends Well", "Judgement Clay",
			"Terrestrial Trouble", "Obsessive-Compulsive Discovery Simulator", "Red Dev Redemption", "Rise of The Slimes", "Now with more things to kill you!", "Rumors of the Guide's death were greatly exaggerated", "I Pity the Tools...", "A spelunker says 'What'?", "So then I said 'Something about a PC update...'", "May the blocks be with you",
			"Better than life", "Now in 1D", "Coming soon to a computer near you", "Dividing by zero", "Now with SOUND", "Press alt-f4", "I Pity the Tools", "You sand bro?", "A good day to dig hard", "Can you Re-Dig-It?",
			"I don't know that-- aaaaa!", "What's that purple spiked thing?", "I wanna be the guide", "Cthulhu is mad.. and is missing an eye!", "NOT THE BEES!!!", "Legend of Maxx", "Cult of Cenx", "Terraria 2: Electric Boogaloo", "Also try Minecraft!", "Also try Edge of Space!",
			"Also try Breath of the Wild!", "I just wanna know where the gold at?", "Now with more ducks!", "9+1=11", "1+1=10", "Infinite Plantera", "Also try Stardew Valley!", "Also try Core Keeper!", "Also try Project Zomboid!", "Now with microtransactions!",
			"Built on Blockchain Teechnology", "Now with even less Ocram!", "Touch Grass Simulator", "Don't dig up!", "For the worthy!", "Now with even more Ocram!", "Shut Up and Dig Gaiden!", "Also try Don't Starve!"
		};

		public static string GetRandomSplash()
		{
			Random random = new Random();
			return Splashes[random.Next(Splashes.Length)];
		}
	}
}
namespace WeatherElectric.SplashText.Scripts.Helpers
{
	internal static class EntryHelper
	{
		public static string GetRandomEntry()
		{
			Random random = new Random();
			string[] array = File.ReadAllLines(UserData.EntriesPath);
			if (array.Length == 0)
			{
				ModConsole.Error("No entries found in UserEntries.txt. Defaulting to BonelabSplashes.");
				return BonelabSplashes.GetRandomOfflineSplash();
			}
			int num = random.Next(array.Length);
			return TemplateProcessing.Process(array[num]);
		}
	}
	public static class TemplateProcessing
	{
		private static readonly List<string> UserPicturesFilenames = new List<string>();

		private static readonly List<string> UserDocumentsFilenames = new List<string>();

		private static readonly List<string> UserDownloadsFilenames = new List<string>();

		private static readonly List<string> UserDesktopFilenames = new List<string>();

		private static readonly List<string> SteamGames = new List<string>();

		private static readonly Dictionary<string, Func<string>> Replacements = new Dictionary<string, Func<string>>
		{
			{
				"[UserName]",
				() => (!HelperMethods.IsAndroid()) ? Environment.UserName : "Quest User"
			},
			{
				"[PalletCount]",
				() => AssetWarehouse.Instance.GetPallets().Count.ToString()
			},
			{
				"[CurrentAvatar]",
				() => ((Scannable)((CrateReferenceT<AvatarCrate>)(object)Player.RigManager._avatarCrate).Crate).Title
			},
			{
				"[Height]",
				delegate
				{
					double num = (double)Main.SaveData.PlayerSettings.PlayerHeight * 0.393701;
					int value = (int)(num / 12.0);
					int value2 = (int)Math.Round(num % 12.0);
					return $"{value}'{value2}\"";
				}
			},
			{
				"[RandomFavoriteSpawnable]",
				delegate
				{
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003a: Unknown result type (might be due to invalid IL or missing references)
					//IL_004b: Expected O, but got Unknown
					//IL_0046: Unknown result type (might be due to invalid IL or missing references)
					//IL_0050: Expected O, but got Unknown
					Random random7 = new Random();
					string text2 = Main.SaveData.PlayerSettings.FavoriteSpawnables[random7.Next(Main.SaveData.PlayerSettings.FavoriteSpawnables.Count)];
					return ((Scannable)((CrateReferenceT<SpawnableCrate>)new SpawnableCrateReference(new Barcode
					{
						ID = text2.ToString()
					})).Crate).Title;
				}
			},
			{
				"[RandomFavoriteAvatar]",
				delegate
				{
					//IL_0035: Unknown result type (might be due to invalid IL or missing references)
					//IL_003a: Unknown result type (might be due to invalid IL or missing references)
					//IL_004b: Expected O, but got Unknown
					//IL_0046: Unknown result type (might be due to invalid IL or missing references)
					//IL_0050: Expected O, but got Unknown
					Random random6 = new Random();
					string text = Main.SaveData.PlayerSettings.FavoriteAvatars[random6.Next(Main.SaveData.PlayerSettings.FavoriteAvatars.Count)];
					return ((Scannable)((CrateReferenceT<AvatarCrate>)new AvatarCrateReference(new Barcode
					{
						ID = text.ToString()
					})).Crate).Title;
				}
			},
			{
				"[CPU]",
				() => SystemInfo.processorType
			},
			{
				"[GPU]",
				() => SystemInfo.graphicsDeviceName
			},
			{
				"[GPUVendor]",
				() => SystemInfo.graphicsDeviceVendor
			},
			{
				"[RAM]",
				() => Math.Round((double)SystemInfo.systemMemorySize / 1024.0) + " GB"
			},
			{
				"[OS]",
				() => SystemInfo.operatingSystem
			},
			{
				"[MachineName]",
				() => (!HelperMethods.IsAndroid()) ? Environment.MachineName : "Oculus Quest"
			},
			{
				"[TotalDiskSpace]",
				() => new DriveInfo("C").TotalSize / 1024 / 1024 / 1024 + " GB"
			},
			{
				"[FreeDiskSpace]",
				() => new DriveInfo("C").AvailableFreeSpace / 1024 / 1024 / 1024 + " GB"
			},
			{
				"[RandomUserPicture]",
				delegate
				{
					Random random5 = new Random();
					return UserPicturesFilenames[random5.Next(UserPicturesFilenames.Count)];
				}
			},
			{
				"[RandomUserDocument]",
				delegate
				{
					Random random4 = new Random();
					return UserDocumentsFilenames[random4.Next(UserDocumentsFilenames.Count)];
				}
			},
			{
				"[RandomUserDownloadsFile]",
				delegate
				{
					Random random3 = new Random();
					return UserDownloadsFilenames[random3.Next(UserDownloadsFilenames.Count)];
				}
			},
			{
				"[RandomUserDesktopFile]",
				delegate
				{
					Random random2 = new Random();
					return UserDesktopFilenames[random2.Next(UserDesktopFilenames.Count)];
				}
			},
			{
				"[RandomSteamGame]",
				delegate
				{
					Random random = new Random();
					return SteamGames[random.Next(SteamGames.Count)];
				}
			}
		};

		private static readonly Dictionary<string, Func<string>> Actions = new Dictionary<string, Func<string>>
		{
			{
				"[PlaceTxtFile]",
				delegate
				{
					File.WriteAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "gift.txt"), FileContents.GetRandomText());
					return "";
				}
			},
			{
				"[SpawnNullbody]",
				delegate
				{
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0019: 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_0028: Unknown result type (might be due to invalid IL or missing references)
					//IL_002d: 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_0034: 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)
					Vector3 val = ((Component)Player.RemapRig).transform.position + ((Component)Player.RemapRig).transform.forward * 2f;
					HelperMethods.SpawnCrate("c1534c5a-d82d-4f65-89fd-a4954e756c6c", val, Quaternion.identity, Vector3.one, false, (Action<GameObject>)null, (Action<GameObject>)null);
					return "";
				}
			},
			{
				"[PeterGriffin]",
				delegate
				{
					Application.OpenURL("https://familyguy.fandom.com/wiki/Peter_Griffin");
					return "";
				}
			}
		};

		internal static void CacheSteamGames()
		{
			if (!HelperMethods.IsAndroid())
			{
				string text = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + "\\Steam\\steamapps\\common";
				foreach (string item2 in Directory.GetDirectories(text).ToList())
				{
					string item = item2.Replace(text + "\\", "");
					SteamGames.Add(item);
				}
			}
			SteamGames.Add("(You're on a Quest, so I can't get your Steam games. Womp.)");
		}

		internal static void CacheUserFiles()
		{
			foreach (string item2 in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)).ToList())
			{
				UserPicturesFilenames.Add(Path.GetFileName(item2));
			}
			foreach (string item3 in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Personal)).ToList())
			{
				UserDocumentsFilenames.Add(Path.GetFileName(item3));
			}
			string text = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\Downloads";
			foreach (string item4 in Directory.GetFiles(text).ToList())
			{
				UserDownloadsFilenames.Add(Path.GetFileName(item4));
			}
			foreach (string item5 in Directory.GetDirectories(text).ToList())
			{
				string item = item5.Replace(text + "\\", "");
				UserDownloadsFilenames.Add(item);
			}
			foreach (string item6 in Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Desktop)).ToList())
			{
				UserDesktopFilenames.Add(Path.GetFileName(item6));
			}
		}

		public static void AddTemplate(string key, Func<string> value)
		{
			Replacements.Add(key, value);
		}

		public static string Process(string text, bool skipActions = false)
		{
			foreach (KeyValuePair<string, Func<string>> replacement in Replacements)
			{
				if (text.Contains(replacement.Key))
				{
					text = text.Replace(replacement.Key, replacement.Value());
				}
			}
			if (skipActions)
			{
				return text;
			}
			foreach (KeyValuePair<string, Func<string>> action in Actions)
			{
				if (text.Contains(action.Key))
				{
					text = text.Replace(action.Key, action.Value());
				}
			}
			return text;
		}
	}
}
namespace WeatherElectric.SplashText.Melon
{
	internal static class ModConsole
	{
		private static Instance _logger;

		public static void Setup(Instance loggerInstance)
		{
			_logger = loggerInstance;
		}

		public static void Msg(object obj, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? $"[DEBUG] {obj}" : obj.ToString());
			ConsoleColor consoleColor = ((loggingMode == 1) ? ConsoleColor.Yellow : ConsoleColor.Gray);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Msg(consoleColor, text);
			}
		}

		public static void Msg(string txt, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			ConsoleColor consoleColor = ((loggingMode == 1) ? ConsoleColor.Yellow : ConsoleColor.Gray);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Msg(consoleColor, text);
			}
		}

		public static void Msg(ConsoleColor txtcolor, object obj, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? $"[DEBUG] {obj}" : obj.ToString());
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Msg(txtcolor, text);
			}
		}

		public static void Msg(ConsoleColor txtcolor, string txt, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Msg(txtcolor, text);
			}
		}

		public static void Msg(string txt, int loggingMode = 0, params object[] args)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			ConsoleColor consoleColor = ((loggingMode == 1) ? ConsoleColor.Yellow : ConsoleColor.Gray);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Msg(consoleColor, text, args);
			}
		}

		public static void Msg(ConsoleColor txtcolor, string txt, int loggingMode = 0, params object[] args)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Msg(txtcolor, text, args);
			}
		}

		public static void Error(object obj, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? $"[DEBUG] {obj}" : obj.ToString());
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Error(text);
			}
		}

		public static void Error(string txt, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Error(text);
			}
		}

		public static void Error(string txt, int loggingMode = 0, params object[] args)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Error(text, args);
			}
		}

		public static void Warning(object obj, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? $"[DEBUG] {obj}" : obj.ToString());
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Warning(text);
			}
		}

		public static void Warning(string txt, int loggingMode = 0)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Warning(text);
			}
		}

		public static void Warning(string txt, int loggingMode = 0, params object[] args)
		{
			string text = ((loggingMode == 1) ? ("[DEBUG] " + txt) : txt);
			if (Preferences.LoggingMode.Value >= loggingMode)
			{
				_logger.Warning(text, args);
			}
		}
	}
	internal static class Preferences
	{
		public static readonly MelonPreferences_Category GlobalCategory = MelonPreferences.CreateCategory("Global");

		public static readonly MelonPreferences_Category OwnCategory = MelonPreferences.CreateCategory("SplashText");

		public static MelonPreferences_Entry<int> LoggingMode { get; set; }

		public static MelonPreferences_Entry<bool> OfflineMode { get; set; }

		public static MelonPreferences_Entry<SplashMode> SplashMode { get; set; }

		public static MelonPreferences_Entry<string> Thingy { get; set; }

		public static void Setup()
		{
			LoggingMode = GlobalCategory.GetEntry<int>("LoggingMode") ?? GlobalCategory.CreateEntry<int>("LoggingMode", 0, "Logging Mode", "The level of logging to use. 0 = Important Only, 1 = All", false, false, (ValueValidator)null, (string)null);
			GlobalCategory.SetFilePath(MelonEnvironment.UserDataDirectory + "/WeatherElectric.cfg");
			GlobalCategory.SaveToFile(false);
			OfflineMode = OwnCategory.CreateEntry<bool>("OfflineMode", false, "Offline Mode", "If true, the mod will not fetch splash text from an external webserver. However, you will also not get any updates to the splash text list.", false, false, (ValueValidator)null, (string)null);
			SplashMode = OwnCategory.CreateEntry<SplashMode>("SplashMode", WeatherElectric.SplashText.Melon.SplashMode.Bonelab, "Splash Mode", "The mode to use for splash text. UserEntries = Use user entries, Minecraft = Use Minecraft splash text, Bonelab = Use Bonelab/Bonelab community related splash text. Terraria = Use Terraria splash text.", false, false, (ValueValidator)null, (string)null);
			Thingy = OwnCategory.CreateEntry<string>("Thingy", "", "Thingy", (string)null, false, false, (ValueValidator)null, (string)null);
			OwnCategory.SetFilePath(MelonEnvironment.UserDataDirectory + "/WeatherElectric.cfg");
			OwnCategory.SaveToFile(false);
			ModConsole.Msg("Finished preferences setup for SplashText", 1);
		}
	}
	internal enum SplashMode
	{
		UserEntries,
		Minecraft,
		Bonelab,
		Terraria
	}
	internal static class UserData
	{
		private static readonly string WeatherElectricPath = Path.Combine(MelonEnvironment.UserDataDirectory, "Weather Electric");

		private static readonly string ModPath = Path.Combine(MelonEnvironment.UserDataDirectory, "Weather Electric/SplashText");

		public static readonly string EntriesPath = Path.Combine(ModPath, "UserEntries.txt");

		public static void Setup()
		{
			if (!Directory.Exists(WeatherElectricPath))
			{
				Directory.CreateDirectory(WeatherElectricPath);
			}
			if (!Directory.Exists(ModPath))
			{
				Directory.CreateDirectory(ModPath);
			}
			if (!File.Exists(EntriesPath))
			{
				File.Create(EntriesPath).Close();
				File.WriteAllLinesAsync(EntriesPath, BonelabSplashes.Splashes);
				List<string> contents = (from line in File.ReadAllLines(EntriesPath)
					select line.TrimEnd()).ToList();
				File.WriteAllLines(EntriesPath, contents);
			}
		}
	}
}
namespace WeatherElectric.SplashText.Menu
{
	internal static class BoneMenu
	{
		public static void Setup()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			Page.Root.CreatePage("<color=#6FBDFF>Weather Electric</color>", Color.cyan, 0, true).CreatePage("Splash Text", Color.yellow, 0, true).CreateEnum("Splash Mode", Color.white, (Enum)Preferences.SplashMode.Value, (Action<Enum>)delegate(Enum v)
			{
				Preferences.SplashMode.Value = (SplashMode)(object)v;
				Preferences.OwnCategory.SaveToFile(false);
				TextManager.SetText();
			});
		}
	}
}