Decompiled source of IllustriousJazz v1.0.2

IllustriousJazz.dll

Decompiled 7 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using LethalAPI.TerminalCommands.Attributes;
using LethalAPI.TerminalCommands.Models;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]
[assembly: AssemblyCompany("IllustriousJazz")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("IllustriousJazz")]
[assembly: AssemblyTitle("IllustriousJazz")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : System.Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(/*Could not decode attribute arguments.*/)]
	internal sealed class NullableAttribute : System.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(/*Could not decode attribute arguments.*/)]
	internal sealed class NullableContextAttribute : System.Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(/*Could not decode attribute arguments.*/)]
	internal sealed class RefSafetyRulesAttribute : System.Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace JuicyCopper
{
	public static class PluginInfo
	{
		public const string GUID = "juicycopper.illustriousjazz";

		public const string Name = "IllustriousJazz";

		public const string Version = "1.0.1";
	}
	[BepInPlugin("juicycopper.illustriousjazz", "IllustriousJazz", "1.0.1")]
	internal class Plugin : BaseUnityPlugin
	{
		private static readonly string[] _adjectives = new string[1099]
		{
			"aback", "abaft", "abandoned", "abashed", "aberrant", "abhorrent", "abiding", "abject", "ablaze", "able",
			"abnormal", "aboard", "aboriginal", "abortive", "abounding", "abrasive", "abrupt", "absent", "absorbed", "absorbing",
			"abstracted", "absurd", "abundant", "abusive", "acceptable", "accessible", "accidental", "accurate", "acid", "acidic",
			"acoustic", "acrid", "actually", "ad", "hoc", "adamant", "adaptable", "addicted", "adhesive", "adjoining",
			"adorable", "adventurous", "afraid", "aggressive", "agonizing", "agreeable", "ahead", "ajar", "alcoholic", "alert",
			"alike", "alive", "alleged", "alluring", "aloof", "amazing", "ambiguous", "ambitious", "amuck", "amused",
			"amusing", "ancient", "angry", "animated", "annoyed", "annoying", "anxious", "apathetic", "aquatic", "aromatic",
			"arrogant", "ashamed", "aspiring", "assorted", "astonishing", "attractive", "auspicious", "automatic", "available", "average",
			"awake", "aware", "awesome", "awful", "axiomatic", "bad", "barbarous", "bashful", "bawdy", "beautiful",
			"befitting", "belligerent", "beneficial", "bent", "berserk", "best", "better", "bewildered", "big", "billowy",
			"bite-sized", "bitter", "bizarre", "black", "black-and-white", "bloody", "blue", "blue-eyed", "blushing", "boiling",
			"boorish", "bored", "boring", "bouncy", "boundless", "brainy", "brash", "brave", "brawny", "breakable",
			"breezy", "brief", "bright", "bright", "broad", "broken", "brown", "bumpy", "burly", "bustling",
			"busy", "cagey", "calculating", "callous", "calm", "capable", "capricious", "careful", "careless", "caring",
			"cautious", "ceaseless", "certain", "changeable", "charming", "cheap", "cheerful", "chemical", "chief", "childlike",
			"chilly", "chivalrous", "chubby", "chunky", "clammy", "classy", "clean", "clear", "clever", "cloistered",
			"cloudy", "closed", "clumsy", "cluttered", "coherent", "cold", "colorful", "colossal", "combative", "comfortable",
			"common", "complete", "complex", "concerned", "condemned", "confused", "conscious", "cooing", "cool", "cooperative",
			"coordinated", "courageous", "cowardly", "crabby", "craven", "crazy", "creepy", "crooked", "crowded", "cruel",
			"cuddly", "cultured", "cumbersome", "curious", "curly", "curved", "curvy", "cut", "cute", "cute",
			"cynical", "daffy", "daily", "damaged", "damaging", "damp", "dangerous", "dapper", "dark", "dashing",
			"dazzling", "dead", "deadpan", "deafening", "dear", "debonair", "decisive", "decorous", "deep", "deeply",
			"defeated", "defective", "defiant", "delicate", "delicious", "delightful", "demonic", "delirious", "dependent", "depressed",
			"deranged", "descriptive", "deserted", "detailed", "determined", "devilish", "didactic", "different", "difficult", "diligent",
			"direful", "dirty", "disagreeable", "disastrous", "discreet", "disgusted", "disgusting", "disillusioned", "dispensable", "distinct",
			"disturbed", "divergent", "dizzy", "domineering", "doubtful", "drab", "draconian", "dramatic", "dreary", "drunk",
			"dry", "dull", "dusty", "dynamic", "dysfunctional", "eager", "early", "earsplitting", "earthy", "easy",
			"eatable", "economic", "educated", "efficacious", "efficient", "eight", "elastic", "elated", "elderly", "electric",
			"elegant", "elfin", "elite", "embarrassed", "eminent", "empty", "enchanted", "enchanting", "encouraging", "endurable",
			"energetic", "enormous", "entertaining", "enthusiastic", "envious", "equable", "equal", "erect", "erratic", "ethereal",
			"evanescent", "evasive", "even excellent excited", "exciting exclusive", "exotic", "expensive", "extra-large extra-small exuberant", "exultant", "fabulous", "faded",
			"faint fair", "faithful", "fallacious", "false familiar famous", "fanatical", "fancy", "fantastic", "far", " far-flung", " fascinated",
			"fast", "fat faulty", "fearful fearless", "feeble feigned", "female fertile", "festive", "few fierce", "filthy", "fine", "finicky",
			"first", " five", " fixed", " flagrant", "flaky", "flashy", "flat", "flawless", "flimsy", " flippant",
			"flowery", "fluffy", "fluttering", " foamy", "foolish", "foregoing", "forgetful", "fortunate", "four frail", "fragile",
			"frantic", "free", " freezing", " frequent", " fresh", " fretful", "friendly", "frightened frightening full fumbling functional", "funny", "furry furtive",
			"future futuristic", "fuzzy ", "gabby", "gainful", "gamy", "gaping", "garrulous", "gaudy", "general gentle", "giant",
			"giddy", "gifted", "gigantic", "glamorous", "gleaming", "glib", "glistening glorious", "glossy", "godly", "good",
			"goofy", "gorgeous", "graceful", "grandiose", "grateful gratis", "gray greasy great", "greedy", "green grey grieving", "groovy", "grotesque",
			"grouchy", "grubby gruesome", "grumpy", "guarded", "guiltless", "gullible gusty", "guttural H habitual", "half", "hallowed", "halting",
			"handsome", "handsomely", "handy", "hanging", "hapless", "happy", "hard", "hard-to-find", "harmonious", "harsh",
			"hateful", "heady", "healthy", "heartbreaking", "heavenly heavy hellish", "helpful", "helpless", "hesitant", "hideous high", "highfalutin",
			"high-pitched", "hilarious", "hissing", "historical", "holistic", "hollow", "homeless", "homely", "honorable", "horrible",
			"hospitable", "hot huge", "hulking", "humdrum", "humorous", "hungry", "hurried", "hurt", "hushed", "husky",
			"hypnotic", "hysterical", "icky", "icy", "idiotic", "ignorant", "ill", "illegal", "ill-fated", "ill-informed",
			"illustrious", "imaginary", "immense", "imminent", "impartial", "imperfect", "impolite", "important", "imported", "impossible",
			"incandescent", "incompetent", "inconclusive", "industrious", "incredible", "inexpensive", "infamous", "innate", "innocent", "inquisitive",
			"insidious", "instinctive", "intelligent", "interesting", "internal", "invincible", "irate", "irritating", "itchy", "jaded",
			"jagged", "jazzy", "jealous", "jittery", "jobless", "jolly", "joyous", "judicious", "juicy", "jumbled",
			"jumpy", "juvenile", "kaput", "keen", "kind", "kindhearted", "kindly", "knotty", "knowing", "knowledgeable",
			"known", "labored", "lackadaisical", "lacking", "lame", "lamentable", "languid", "large", "last", "late",
			"laughable", "lavish", "lazy", "lean", "learned", "left", "legal", "lethal", "level", "lewd",
			"light", "like", "likeable", "limping", "literate", "little", "lively", "lively", "living", "lonely",
			"long", "longing", "long-term", "loose", "lopsided", "loud", "loutish", "lovely", "loving", "low",
			"lowly", "lucky", "ludicrous", "lumpy", "lush", "luxuriant", "lying", "lyrical", "macabre", "macho",
			"maddening", "madly", "magenta", "magical", "magnificent", "majestic", "makeshift", "male", "malicious", "mammoth",
			"maniacal", "many", "marked", "massive", "married", "marvelous", "material", "materialistic", "mature", "mean",
			"measly", "meaty", "medical", "meek", "mellow", "melodic", "melted", "merciful", "mere", "messy",
			"mighty", "military", "milky", "mindless", "miniature", "minor", "miscreant", "misty", "mixed", "moaning",
			"modern", "moldy", "momentous", "motionless", "mountainous", "muddled", "mundane", "murky", "mushy", "mute",
			"mysterious", "naive", "nappy", "narrow", "nasty", "natural", "naughty", "nauseating", "near", "neat",
			"nebulous", "necessary", "needless", "needy", "neighborly", "nervous", "new", "next", "nice", "nifty",
			"nimble", "nine", "nippy", "noiseless", "noisy", "nonchalant", "nondescript", "nonstop", "normal", "nostalgic",
			"nosy", "noxious", "null", "numberless", "numerous", "nutritious", "nutty", "oafish", "obedient", "obeisant",
			"obese", "obnoxious", "obscene", "obsequious", "observant", "obsolete", "obtainable", "oceanic", "odd", "offbeat",
			"old", "old-fashioned", "omniscient", "one", "onerous", "open", "opposite", "optimal", "orange", "ordinary",
			"organic", "ossified", "outgoing", "outrageous", "outstanding", "oval", "overconfident", "overjoyed", "overrated", "overt",
			"overwrought", "painful", "painstaking", "pale", "paltry", "panicky", "panoramic", "parallel", "parched", "parsimonious",
			"past", "pastoral", "pathetic", "peaceful", "penitent", "perfect", "periodic", "permissible", "perpetual", "petite",
			"petite", "phobic", "physical", "picayune", "pink", "piquant", "placid", "plain", "plant", "plastic",
			"plausible", "pleasant", "plucky", "pointless", "poised", "polite", "political", "poor", "possessive", "possible",
			"powerful", "precious", "premium", "present", "pretty", "previous", "pricey", "prickly", "private", "probable",
			"productive", "profuse", "protective", "proud", "psychedelic", "psychotic", "public", "puffy", "pumped", "puny",
			"purple", "purring", "pushy", "puzzled", "puzzling", "quack", "quaint", "quarrelsome", "questionable", "quick",
			"quickest", "quiet", "quirky", "quixotic", "quizzical", "rabid", "racial", "ragged", "rainy", "rambunctious",
			"rampant", "rapid", "rare", "raspy", "ratty", "ready", "real", "rebel", "receptive", "recondite",
			"red", "redundant", "reflective", "regular", "relieved", "remarkable", "reminiscent", "repulsive", "resolute", "resonant",
			"responsible", "rhetorical", "rich", "right", "righteous", "rightful", "rigid", "ripe", "ritzy", "roasted",
			"robust", "romantic", "roomy", "rotten", "rough", "round", "royal", "ruddy", "rude", "rural",
			"rustic", "ruthless", "sable", "sad", "safe", "salty", "same", "sassy", "satisfying", "savory",
			"scandalous", "scarce", "scared", "scary", "scattered", "scientific", "scintillating", "scrawny", "screeching", "second",
			"second-hand", "secret", "secretive", "sedate", "seemly", "selective", "selfish", "separate", "serious", "shaggy",
			"shaky", "shallow", "sharp", "shiny", "shivering", "shocking", "short", "shrill", "shut", "shy",
			"sick", "silent", "silent", "silky", "silly", "simple", "simplistic", "sincere", "six", "skillful",
			"skinny", "sleepy", "slim", "slimy", "slippery", "sloppy", "slow", "small", "smart", "smelly",
			"smiling", "smoggy", "smooth", "sneaky", "snobbish", "snotty", "soft", "soggy", "solid", "somber",
			"sophisticated", "sordid", "sore", "sore", "sour", "sparkling", "special", "spectacular", "spicy", "spiffy",
			"spiky", "spiritual", "spiteful", "splendid", "spooky", "spotless", "spotted", "spotty", "spurious", "squalid",
			"square", "squealing", "squeamish", "staking", "stale", "standing", "statuesque", "steadfast", "steady", "steep",
			"stereotyped", "sticky", "stiff", "stimulating", "stingy", "stormy", "straight", "strange", "striped", "strong",
			"stupendous", "stupid", "sturdy", "subdued", "subsequent", "substantial", "successful", "succinct", "sudden", "sulky",
			"super", "superb", "superficial", "supreme", "swanky", "sweet", "sweltering", "swift", "symptomatic", "synonymous",
			"taboo", "tacit", "tacky", "talented", "tall", "tame", "tan", "tangible", "tangy", "tart",
			"tasteful", "tasteless", "tasty", "tawdry", "tearful", "tedious", "teeny", "teeny-tiny", "telling", "temporary",
			"ten", "tender tense", "tense", "tenuous", "terrible", "terrific", "tested", "testy", "thankful", "therapeutic",
			"thick", "thin", "thinkable", "third", "thirsty", "thoughtful", "thoughtless", "threatening", "three", "thundering",
			"tidy", "tight", "tightfisted", "tiny", "tired", "tiresome", "toothsome", "torpid", "tough", "towering",
			"tranquil", "trashy", "tremendous", "tricky", "trite", "troubled", "truculent", "true", "truthful", "two",
			"typical", "ubiquitous", "ugliest", "ugly", "ultra", "unable", "unaccountable", "unadvised", "unarmed", "unbecoming",
			"unbiased", "uncovered", "understood", "undesirable", "unequal", "unequaled", "uneven", "unhealthy", "uninterested", "unique",
			"unkempt", "unknown", "unnatural", "unruly", "unsightly", "unsuitable", "untidy", "unused", "unusual", "unwieldy",
			"unwritten", "upbeat", "uppity", "upset", "uptight", "used", "useful", "useless", "utopian", "utter",
			"uttermost", "vacuous", "vagabond", "vague", "valuable", "various", "vast", "vengeful", "venomous", "verdant",
			"versed", "victorious", "vigorous", "violent", "violet", "vivacious", "voiceless", "volatile", "voracious", "vulgar",
			"wacky", "waggish", "waiting", "", "wakeful", "wandering", "wanting", "warlike", "warm", "wary",
			"wasteful", "watery", "weak", "wealthy", "weary", "well-groomed", "well-made", "well-off", "well-to-do", "wet",
			"whimsical", "whispering", "white", "whole", "wholesale", "wicked", "wide", "wide-eyed", "wiggly", "wild",
			"willing", "windy", "wiry", "wise", "wistful", "witty", "woebegone", "womanly", "wonderful", "wooden",
			"woozy", "workable", "worried", "worthless", "wrathful", "wretched", "wrong", "wry", "xenophobic", "yellow",
			"yielding", "young", "youthful", "yummy", "zany", "zealous", "zesty", "zippy", "zonked"
		};

		private static readonly string[] _nouns = new string[2333]
		{
			"accelerator", "accordion", "account", "accountant", "acknowledgment", "acoustic", "acrylic", "act", "action", "active",
			"activity", "actor", "actress", "adapter", "addition", "address", "adjustment", "adult", "advantage", "advertisement",
			"advice", "afghanistan", "africa", "aftermath", "afternoon", "aftershave", "afterthought", "age", "agenda", "agreement",
			"air", "airbus", "airmail", "airplane", "airport", "airship", "alarm", "albatross", "alcohol", "algebra",
			"algeria", "alibi", "alley", "alligator", "alloy", "almanac", "alphabet", "alto", "aluminium", "aluminum",
			"ambulance", "america", "amount", "amusement", "anatomy", "anethesiologist", "anger", "angle", "angora", "animal",
			"anime", "ankle", "answer", "ant", "antarctica", "anteater", "antelope", "anthony", "anthropology", "apartment",
			"apology", "apparatus", "apparel", "appeal", "appendix", "apple", "appliance", "approval", "april", "aquarius",
			"arch", "archaeology", "archeology", "archer", "architecture", "area", "argentina", "argument", "aries", "arithmetic",
			"arm", "armadillo", "armchair", "armenian", "army", "arrow", "art", "ash", "ashtray", "asia",
			"asparagus", "asphalt", "asterisk", "astronomy", "athlete", "atm", "atom", "attack", "attempt", "attention",
			"attic", "attraction", "august", "aunt", "australia", "australian", "author", "authorisation", "authority", "authorization",
			"avenue", "babies", "baboon", "baby", "back", "backbone", "bacon", "badge", "badger", "bag",
			"bagel", "bagpipe", "bail", "bait", "baker", "bakery", "balance", "balinese", "ball", "balloon",
			"bamboo", "banana", "band", "bandana", "bangladesh", "bangle", "banjo", "bank", "bankbook", "banker",
			"bar", "barbara", "barber", "barge", "baritone", "barometer", "base", "baseball", "basement", "basin",
			"basket", "basketball", "bass", "bassoon", "bat", "bath", "bathroom", "bathtub", "battery", "battle",
			"bay", "beach", "bead", "beam", "bean", "bear", "beard", "beast", "beat", "beautician",
			"beauty", "beaver", "bed", "bedroom", "bee", "beech", "beef", "beer", "beet", "beetle",
			"beggar", "beginner", "begonia", "behavior", "belgian", "belief", "believe", "bell", "belt", "bench",
			"bengal", "beret", "berry", "bestseller", "betty", "bibliography", "bicycle", "bike", "bill", "billboard",
			"biology", "biplane", "birch", "bird", "birth", "birthday", "bit", "bite", "black", "bladder",
			"blade", "blanket", "blinker", "blizzard", "block", "blood", "blouse", "blow", "blowgun", "blue",
			"board", "boat", "bobcat", "body", "bolt", "bomb", "bomber", "bone", "bongo", "bonsai",
			"book", "bookcase", "booklet", "boot", "border", "botany", "bottle", "bottom", "boundary", "bow",
			"bowl", "bowling", "box", "boy", "bra", "brace", "bracket", "brain", "brake", "branch",
			"brand", "brandy", "brass", "brazil", "bread", "break", "breakfast", "breath", "brian", "brick",
			"bridge", "british", "broccoli", "brochure", "broker", "bronze", "brother", "brother-in-law", "brow", "brown",
			"brush", "bubble", "bucket", "budget", "buffer", "buffet", "bugle", "building", "bulb", "bull",
			"bulldozer", "bumper", "bun", "burglar", "burma", "burn", "burst", "bus", "bush", "business",
			"butane", "butcher", "butter", "button", "buzzard", "c-clamp", "cabbage", "cabinet", "cable", "cactus",
			"cafe", "cake", "calculator", "calculus", "calendar", "calf", "call", "camel", "camera", "camp",
			"can", "canada", "canadian", "cancer", "candle", "cannon", "canoe", "canvas", "cap", "capital",
			"cappelletti", "capricorn", "captain", "caption", "car", "caravan", "carbon", "card", "cardboard", "cardigan",
			"care", "carnation", "carol", "carp", "carpenter", "carriage", "carrot", "cart", "cartoon", "case",
			"cast", "castanet", "cat", "catamaran", "caterpillar", "cathedral", "catsup", "cattle", "cauliflower", "cause",
			"caution", "cave", "cd", "ceiling", "celery", "celeste", "cell", "cellar", "cello", "celsius",
			"cement", "cemetery", "cent", "centimeter", "century", "ceramic", "cereal", "certification", "chain", "chair",
			"chalk", "chance", "change", "channel", "character", "chard", "charles", "chauffeur", "check", "cheek",
			"cheese", "cheetah", "chef", "chemistry", "cheque", "cherries", "cherry", "chess", "chest", "chick",
			"chicken", "chicory", "chief", "child", "children", "chill", "chime", "chimpanzee", "chin", "china",
			"chinese", "chive", "chocolate", "chord", "christmas", "christopher", "chronometer", "church", "cicada", "cinema",
			"circle", "circulation", "cirrus", "citizenship", "city", "clam", "clarinet", "class", "claus", "clave",
			"clef", "clerk", "click", "client", "climb", "clipper", "cloakroom", "clock", "close", "closet",
			"cloth", "cloud", "cloudy", "clover", "club", "clutch", "coach", "coal", "coast", "coat",
			"cobweb", "cockroach", "cocktail", "cocoa", "cod", "coffee", "coil", "coin", "coke", "cold",
			"collar", "college", "collision", "colombia", "colon", "colony", "color", "colt", "column", "columnist",
			"comb", "comfort", "comic", "comma", "command", "commission", "committee", "community", "company", "comparison",
			"competition", "competitor", "composer", "composition", "computer", "condition", "condor", "cone", "confirmation", "conga",
			"congo", "conifer", "connection", "consonant", "continent", "control", "cook", "cooking", "copper", "copy",
			"copyright", "cord", "cork", "cormorant", "corn", "cornet", "correspondent", "cost", "cotton", "couch",
			"cougar", "cough", "country", "course", "court", "cousin", "cover", "cow", "cowbell", "crab",
			"crack", "cracker", "craftsman", "crate", "crawdad", "crayfish", "crayon", "cream", "creator", "creature",
			"credit", "creditor", "creek", "crib", "cricket", "crime", "criminal", "crocodile", "crocus", "croissant",
			"crook", "crop", "cross", "crow", "crowd", "crown", "crush", "cry", "cub", "cuban",
			"cucumber", "cultivator", "cup", "cupboard", "cupcake", "curler", "currency", "current", "curtain", "curve",
			"cushion", "custard", "customer", "cut", "cuticle", "cycle", "cyclone", "cylinder", "cymbal", "dad",
			"daffodil", "dahlia", "daisy", "damage", "dance", "dancer", "danger", "daniel", "dash", "dashboard",
			"database", "date", "daughter", "david", "day", "dead", "deadline", "deal", "death", "deborah",
			"debt", "debtor", "decade", "december", "decimal", "decision", "decrease", "dedication", "deer", "defense",
			"deficit", "degree", "delete", "delivery", "den", "denim", "dentist", "deodorant", "department", "deposit",
			"description", "desert", "design", "desire", "desk", "dessert", "destruction", "detail", "detective", "development",
			"dew", "diamond", "diaphragm", "dibble", "dictionary", "dietician", "difference", "digestion", "digger", "digital",
			"dill", "dime", "dimple", "dinghy", "dinner", "dinosaur", "diploma", "dipstick", "direction", "dirt",
			"disadvantage", "discovery", "discussion", "disease", "disgust", "dish", "distance", "distribution", "distributor", "diving",
			"division", "divorced", "dock", "doctor", "dog", "dogsled", "doll", "dollar", "dolphin", "domain",
			"donald", "donkey", "donna", "door", "dorothy", "double", "doubt", "downtown", "dragon", "dragonfly",
			"drain", "drake", "drama", "draw", "drawbridge", "drawer", "dream", "dredger", "dress", "dresser",
			"dressing", "drill", "drink", "drive", "driver", "driving", "drizzle", "drop", "drug", "drum",
			"dry", "dryer", "duck", "duckling", "dugout", "dungeon", "dust", "eagle", "ear", "earth",
			"earthquake", "ease", "east", "edge", "edger", "editor", "editorial", "education", "edward", "eel",
			"effect", "egg", "eggnog", "eggplant", "egypt", "eight", "elbow", "element", "elephant", "elizabeth",
			"ellipse", "emery", "employee", "employer", "encyclopedia", "end", "enemy", "energy", "engine", "engineer",
			"engineering", "english", "enquiry", "entrance", "environment", "epoch", "epoxy", "equinox", "equipment", "era",
			"error", "estimate", "ethernet", "ethiopia", "euphonium", "europe", "evening", "event", "ex-husband", "ex-wife",
			"examination", "example", "exchange", "exclamation", "exhaust", "existence", "expansion", "experience", "expert", "explanation",
			"eye", "eyebrow", "eyelash", "eyeliner", "face", "facilities", "fact", "factory", "fahrenheit", "fairies",
			"fall", "family", "fan", "fang", "farm", "farmer", "fat", "father", "father-in-law", "faucet",
			"fear", "feast", "feather", "feature", "february", "fedelini", "feedback", "feeling", "feet", "felony",
			"female", "fender", "ferry", "ferryboat", "fertilizer", "fiber", "fiberglass", "fibre", "fiction", "field",
			"fifth", "fight", "fighter", "file", "find", "fine", "finger", "fir", "fire", "fired",
			"fireman", "fireplace", "firewall", "fish", "fisherman", "flag", "flame", "flare", "flat", "flavor",
			"flax", "flesh", "flight", "flock", "flood", "floor", "flower", "flugelhorn", "flute", "fly",
			"foam", "fog", "fold", "font", "food", "foot", "football", "footnote", "force", "forecast",
			"forehead", "forest", "forgery", "fork", "form", "format", "fortnight", "foundation", "fountain", "fowl",
			"fox", "foxglove", "fragrance", "frame", "france", "freckle", "freeze", "freezer", "freighter", "french",
			"freon", "friction", "friday", "fridge", "friend", "frog", "front", "frost", "frown", "fruit",
			"fuel", "fur", "furniture", "galley", "gallon", "game", "gander", "garage", "garden", "garlic",
			"gas", "gasoline", "gate", "gateway", "gauge", "gazelle", "gear", "gearshift", "geese", "gemini",
			"gender", "geography", "geology", "geometry", "george", "geranium", "german", "germany", "ghana", "ghost",
			"giant", "giraffe", "girdle", "girl", "gladiolus", "glass", "glider", "gliding", "glockenspiel", "glove",
			"glue", "goal", "goat", "gold", "goldfish", "golf", "gondola", "gong", "good-bye", "goose",
			"gore-tex", "gorilla", "gosling", "government", "governor", "grade", "grain", "gram", "granddaughter", "grandfather",
			"grandmother", "grandson", "grape", "graphic", "grass", "grasshopper", "gray", "grease", "great-grandfather", "great-grandmother",
			"greece", "greek", "green", "grenade", "grey", "grill", "grip", "ground", "group", "grouse",
			"growth", "guarantee", "guatemalan", "guide", "guilty", "guitar", "gum", "gun", "gym", "gymnast",
			"hacksaw", "hail", "hair", "haircut", "half-brother", "half-sister", "halibut", "hall", "hallway", "hamburger",
			"hammer", "hamster", "hand", "handball", "handicap", "handle", "handsaw", "harbor", "hardboard", "hardcover",
			"hardhat", "hardware", "harmonica", "harmony", "harp", "hat", "hate", "hawk", "head", "headlight",
			"headline", "health", "hearing", "heart", "heat", "heaven", "hedge", "height", "helen", "helicopter",
			"helium", "hell", "helmet", "help", "hemp", "hen", "heron", "herring", "hexagon", "hill",
			"himalayan", "hip", "hippopotamus", "history", "hobbies", "hockey", "hoe", "hole", "holiday", "home",
			"honey", "hood", "hook", "hope", "horn", "horse", "hose", "hospital", "hot", "hour",
			"hourglass", "house", "hovercraft", "hub", "hubcap", "humidity", "humor", "hurricane", "hyacinth", "hydrant",
			"hydrofoil", "hydrogen", "hyena", "hygienic", "ice", "icebreaker", "icicle", "icon", "idea", "ikebana",
			"illegal", "imprisonment", "improvement", "impulse", "inch", "income", "increase", "index", "india", "indonesia",
			"industry", "ink", "innocent", "input", "insect", "instruction", "instrument", "insulation", "insurance", "interactive",
			"interest", "internet", "interviewer", "intestine", "invention", "inventory", "invoice", "iran", "iraq", "iris",
			"iron", "island", "israel", "italian", "italy", "jacket", "jaguar", "jail", "jam", "james",
			"january", "japan", "japanese", "jar", "jasmine", "jason", "jaw", "jeans", "jeep", "jeff",
			"jelly", "jellyfish", "jennifer", "jet", "jewel", "jogging", "john", "join", "joke", "joseph",
			"journey", "judge", "judo", "juice", "july", "jumbo", "jump", "jumper", "june", "jury",
			"justice", "jute", "kale", "kamikaze", "kangaroo", "karate", "karen", "kayak", "kendo", "kenneth",
			"kenya", "ketchup", "kettle", "kettledrum", "kevin", "key", "keyboard", "keyboarding", "kick", "kidney",
			"kilogram", "kilometer", "kimberly", "kiss", "kitchen", "kite", "kitten", "kitty", "knee", "knickers",
			"knife", "knight", "knot", "knowledge", "kohlrabi", "korean", "laborer", "lace", "ladybug", "lake",
			"lamb", "lamp", "lan", "land", "landmine", "language", "larch", "lasagna", "latency", "latex",
			"lathe", "laugh", "laundry", "laura", "law", "lawyer", "layer", "lead", "leaf", "learning",
			"leather", "leek", "leg", "legal", "lemonade", "lentil", "leo", "leopard", "letter", "lettuce",
			"level", "libra", "library", "license", "lier", "lift", "light", "lightning", "lilac", "lily",
			"limit", "linda", "line", "linen", "link", "lion", "lip", "lipstick", "liquid", "liquor",
			"lisa", "list", "literature", "litter", "liver", "lizard", "llama", "loaf", "loan", "lobster",
			"lock", "locket", "locust", "look", "loss", "lotion", "love", "low", "lumber", "lunch",
			"lunchroom", "lung", "lunge", "lute", "luttuce", "lycra", "lynx", "lyocell", "lyre", "lyric",
			"macaroni", "machine", "macrame", "magazine", "magic", "magician", "maid", "mail", "mailbox", "mailman",
			"makeup", "malaysia", "male", "mall", "mallet", "man", "manager", "mandolin", "manicure", "manx",
			"map", "maple", "maraca", "marble", "march", "margaret", "margin", "maria", "marimba", "mark",
			"market", "married", "mary", "mascara", "mask", "mass", "match", "math", "mattock", "may",
			"mayonnaise", "meal", "measure", "meat", "mechanic", "medicine", "meeting", "melody", "memory", "men",
			"menu", "mercury", "message", "metal", "meteorology", "meter", "methane", "mexican", "mexico", "mice",
			"michael", "michelle", "microwave", "middle", "mile", "milk", "milkshake", "millennium", "millimeter", "millisecond",
			"mimosa", "mind", "mine", "mini-skirt", "minibus", "minister", "mint", "minute", "mirror", "missile",
			"mist", "mistake", "mitten", "moat", "modem", "mole", "mom", "monday", "money", "monkey",
			"month", "moon", "morning", "morocco", "mosque", "mosquito", "mother", "mother-in-law", "motion", "motorboat",
			"motorcycle", "mountain", "mouse", "moustache", "mouth", "move", "multi-hop", "multimedia", "muscle", "museum",
			"music", "musician", "mustard", "myanmar", "nail", "name", "nancy", "napkin", "narcissus", "nation",
			"neck", "need", "needle", "neon", "nepal", "nephew", "nerve", "nest", "net", "network",
			"news", "newsprint", "newsstand", "nic", "nickel", "niece", "nigeria", "night", "nitrogen", "node",
			"noise", "noodle", "north", "north america", "north korea", "norwegian", "nose", "note", "notebook", "notify",
			"novel", "november", "number", "numeric", "nurse", "nut", "nylon", "oak", "oatmeal", "objective",
			"oboe", "observation", "occupation", "ocean", "ocelot", "octagon", "octave", "october", "octopus", "odometer",
			"offence", "offer", "office", "oil", "okra", "olive", "onion", "open", "opera", "operation",
			"ophthalmologist", "opinion", "option", "orange", "orchestra", "orchid", "order", "organ", "organisation", "organization",
			"ornament", "ostrich", "otter", "ounce", "output", "outrigger", "oval", "oven", "overcoat", "owl",
			"owner", "ox", "oxygen", "oyster", "package", "packet", "page", "pail", "pain", "paint",
			"pair", "pajama", "pakistan", "palm", "pamphlet", "pan", "pancake", "pancreas", "panda", "pansy",
			"panther", "panties", "pantry", "pants", "panty", "pantyhose", "paper", "paperback", "parade", "parallelogram",
			"parcel", "parent", "parentheses", "park", "parrot", "parsnip", "part", "particle", "partner", "partridge",
			"party", "passbook", "passenger", "passive", "pasta", "paste", "pastor", "pastry", "patch", "path",
			"patient", "patio", "patricia", "paul", "payment", "pea", "peace", "peak", "peanut", "pear",
			"pedestrian", "pediatrician", "peen", "peer-to-peer", "pelican", "pen", "penalty", "pencil", "pendulum", "pentagon",
			"peony", "pepper", "perch", "perfume", "period", "periodical", "peripheral", "permission", "persian", "person",
			"peru", "pest", "pet", "pharmacist", "pheasant", "philippines", "philosophy", "phone", "physician", "piano",
			"piccolo", "pickle", "picture", "pie", "pig", "pigeon", "pike", "pillow", "pilot", "pimple",
			"pin", "pine", "ping", "pink", "pint", "pipe", "pisces", "pizza", "place", "plain",
			"plane", "planet", "plant", "plantation", "plaster", "plasterboard", "plastic", "plate", "platinum", "play",
			"playground", "playroom", "pleasure", "plier", "plot", "plough", "plow", "plywood", "pocket", "poet",
			"point", "poison", "poland", "police", "policeman", "polish", "politician", "pollution", "polo", "polyester",
			"pond", "popcorn", "poppy", "population", "porch", "porcupine", "port", "porter", "position", "possibility",
			"postage", "postbox", "pot", "potato", "poultry", "pound", "powder", "power", "precipitation", "preface",
			"prepared", "pressure", "price", "priest", "print", "printer", "prison", "probation", "process", "processing",
			"produce", "product", "production", "professor", "profit", "promotion", "propane", "property", "prose", "prosecution",
			"protest", "protocol", "pruner", "psychiatrist", "psychology", "ptarmigan", "puffin", "pull", "puma", "pump",
			"pumpkin", "punch", "punishment", "puppy", "purchase", "purple", "purpose", "push", "pvc", "pyjama",
			"pyramid", "quail", "quality", "quart", "quarter", "quartz", "queen", "question", "quicksand", "quiet",
			"quill", "quilt", "quince", "quit", "quiver", "quotation", "rabbi", "rabbit", "racing", "radar",
			"radiator", "radio", "radish", "raft", "rail", "railway", "rain", "rainbow", "raincoat", "rainstorm",
			"rake", "ramie", "random", "range", "rat", "rate", "raven", "ravioli", "ray", "rayon",
			"reaction", "reading", "reason", "receipt", "recess", "record", "recorder", "rectangle", "red", "reduction",
			"refrigerator", "refund", "regret", "reindeer", "relation", "relative", "religion", "relish", "reminder", "repair",
			"replace", "report", "representative", "request", "resolution", "respect", "responsibility", "rest", "restaurant", "result",
			"retailer", "revolve", "revolver", "reward", "rhinoceros", "rhythm", "rice", "richard", "riddle", "rifle",
			"ring", "rise", "risk", "river", "riverbed", "road", "roadway", "roast", "robert", "robin",
			"rock", "rocket", "rod", "roll", "romania", "romanian", "ronald", "roof", "room", "rooster",
			"root", "rose", "rotate", "route", "router", "rowboat", "rub", "rubber", "rugby", "rule",
			"run", "russia", "russian", "rutabaga", "ruth", "sack", "sagittarius", "sail", "sailboat", "sailor",
			"salad", "salary", "sale", "salesman", "salmon", "salt", "sampan", "samurai", "sand", "sandra",
			"sandwich", "santa", "sarah", "sardine", "satin", "saturday", "sauce", "saudi arabia", "sausage", "save",
			"saw", "saxophone", "scale", "scallion", "scanner", "scarecrow", "scarf", "scene", "scent", "schedule",
			"school", "science", "scissors", "scooter", "scorpio", "scorpion", "scraper", "screen", "screw", "screwdriver",
			"sea", "seagull", "seal", "seaplane", "search", "seashore", "season", "seat", "second", "secretary",
			"secure", "security", "seed", "seeder", "segment", "select", "selection", "self", "semicircle", "semicolon",
			"sense", "sentence", "separated", "september", "servant", "server", "session", "sex", "shade", "shadow",
			"shake", "shallot", "shame", "shampoo", "shape", "share", "shark", "sharon", "shears", "sheep",
			"sheet", "shelf", "shell", "shield", "shingle", "ship", "shirt", "shock", "shoe", "shoemaker",
			"shop", "shorts", "shoulder", "shovel", "show", "shrimp", "shrine", "siamese", "siberian", "side",
			"sideboard", "sidecar", "sidewalk", "sign", "signature", "silica", "silk", "silver", "sing", "singer",
			"single", "sink", "sister", "sister-in-law", "size", "skate", "skiing", "skill", "skin", "skirt",
			"sky", "slash", "slave", "sled", "sleep", "sleet", "slice", "slime", "slip", "slipper",
			"slope", "smash", "smell", "smile", "smoke", "snail", "snake", "sneeze", "snow", "snowboarding",
			"snowflake", "snowman", "snowplow", "snowstorm", "soap", "soccer", "society", "sociology", "sock", "soda",
			"sofa", "softball", "softdrink", "software", "soil", "soldier", "son", "song", "soprano", "sort",
			"sound", "soup", "sousaphone", "south africa", "south america", "south korea", "soy", "soybean", "space", "spade",
			"spaghetti", "spain", "spandex", "spark", "sparrow", "spear", "specialist", "speedboat", "sphere", "sphynx",
			"spider", "spike", "spinach", "spleen", "sponge", "spoon", "spot", "spring", "sprout", "spruce",
			"spy", "square", "squash", "squid", "squirrel", "stage", "staircase", "stamp", "star", "start",
			"starter", "state", "statement", "station", "statistic", "steam", "steel", "stem", "step", "step-aunt",
			"step-brother", "step-daughter", "step-father", "step-grandfather", "step-grandmother", "step-mother", "step-sister", "step-son", "step-uncle", "stepdaughter",
			"stepmother", "stepson", "steven", "stew", "stick", "stinger", "stitch", "stock", "stocking", "stomach",
			"stone", "stool", "stop", "stopsign", "stopwatch", "store", "storm", "story", "stove", "stranger",
			"straw", "stream", "street", "streetcar", "stretch", "string", "structure", "study", "sturgeon", "submarine",
			"substance", "subway", "success", "sudan", "suede", "sugar", "suggestion", "suit", "summer", "sun",
			"sunday", "sundial", "sunflower", "sunshine", "supermarket", "supply", "support", "surfboard", "surgeon", "surname",
			"surprise", "susan", "sushi", "swallow", "swamp", "swan", "sweater", "sweatshirt", "sweatshop", "swedish",
			"sweets", "swim", "swimming", "swing", "swiss", "switch", "sword", "swordfish", "sycamore", "syria",
			"syrup", "system", "t-shirt", "table", "tablecloth", "tabletop", "tachometer", "tadpole", "tail", "tailor",
			"taiwan", "talk", "tank", "tanker", "tanzania", "target", "taste", "taurus", "tax", "taxi",
			"taxicab", "tea", "teacher", "teaching", "team", "technician", "teeth", "television", "teller", "temper",
			"temperature", "temple", "tempo", "tendency", "tennis", "tenor", "tent", "territory", "test", "text",
			"textbook", "texture", "thailand", "theater", "theory", "thermometer", "thing", "thistle", "thomas", "thought",
			"thread", "thrill", "throat", "throne", "thumb", "thunder", "thunderstorm", "thursday", "ticket", "tie",
			"tiger", "tights", "tile", "timbale", "time", "timer", "timpani", "tin", "tip", "tire",
			"titanium", "title", "toad", "toast", "toe", "toenail", "toilet", "tom-tom", "tomato", "ton",
			"tongue", "tooth", "toothbrush", "toothpaste", "top", "tornado", "tortellini", "tortoise", "touch", "tower",
			"town", "toy", "tractor", "trade", "traffic", "trail", "train", "tramp", "transaction", "transmission",
			"transport", "trapezoid", "tray", "treatment", "tree", "trial", "triangle", "trick", "trigonometry", "trip",
			"trombone", "trouble", "trousers", "trout", "trowel", "truck", "trumpet", "trunk", "tsunami", "tub",
			"tuba", "tuesday", "tugboat", "tulip", "tuna", "tune", "turkey", "turkish", "turn", "turnip",
			"turnover", "turret", "turtle", "tv", "twig", "twilight", "twine", "twist", "typhoon", "tyvek",
			"uganda", "ukraine", "ukrainian", "umbrella", "uncle", "underclothes", "underpants", "undershirt", "underwear", "unit",
			"united kingdom", "unshielded", "use", "utensil", "uzbekistan", "vacation", "vacuum", "valley", "value", "van",
			"var verbs = [aardvark", "vase", "vault", "vegetable", "vegetarian", "veil", "vein", "velvet", "venezuela", "venezuelan",
			"verdict", "vermicelli", "verse", "vessel", "vest", "veterinarian", "vibraphone", "vietnam", "view", "vinyl",
			"viola", "violet", "violin", "virgo", "viscose", "vise", "vision", "visitor", "voice", "volcano",
			"volleyball", "voyage", "vulture", "waiter", "waitress", "walk", "wall", "wallaby", "wallet", "walrus",
			"war", "warm", "wash", "washer", "wasp", "waste", "watch", "watchmaker", "water", "waterfall",
			"wave", "wax", "way", "wealth", "weapon", "weasel", "weather", "wedge", "wednesday", "weed",
			"weeder", "week", "weight", "whale", "wheel", "whip", "whiskey", "whistle", "white", "wholesaler",
			"whorl", "wilderness", "william", "willow", "wind", "windchime", "window", "windscreen", "windshield", "wine",
			"wing", "winter", "wire", "wish", "witch", "withdrawal", "witness", "wolf", "woman", "women",
			"wood", "wool", "woolen", "word", "work", "workshop", "worm", "wound", "wrecker", "wren",
			"wrench", "wrinkle", "wrist", "writer", "xylophone", "yacht", "yak", "yam", "yard", "yarn",
			"year", "yellow", "yew", "yogurt", "yoke", "yugoslavian", "zebra", "zephyr", "zinc", "zipper",
			"zone", "zoo", "zoology"
		};

		private TerminalModRegistry? commands;

		public void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading [email protected]...");
			commands = TerminalRegistry.RegisterFrom<Plugin>(this);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Registered commands from [email protected].");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Done loading [email protected].");
		}

		[TerminalCommand("Jazz", false)]
		[CommandInfo("Invokes the Illustrious Jazz.", "")]
		public string JazzCommand()
		{
			string text = _adjectives[Random.Range(0, _adjectives.Length)];
			text = text[0].ToString().ToUpper() + text.Substring(1);
			string text2 = _nouns[Random.Range(0, _nouns.Length)];
			text2 = text2[0].ToString().ToUpper() + text2.Substring(1);
			return string.Concat(new string[5] { "/---------;;--------\\\n| /                  /\n'.                  .\n   ", text, " ", text2, "\n|\\                   \\\n|  |------------------|\n\\ |        ))         |\n   |------------------|\n" });
		}
	}
}

LethalAPI.TerminalCommands.dll

Decompiled 7 months ago
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalAPI.TerminalCommands.Attributes;
using LethalAPI.TerminalCommands.Commands;
using LethalAPI.TerminalCommands.Configs;
using LethalAPI.TerminalCommands.Models;
using LethalAPI.TerminalCommands.Patches;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;

[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("ShimmyMySherbet, LethalAPI Modding Team")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("A library that allows the creation of custom terminal commands for Lethal Company mods")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyInformationalVersion("1.1.0+5290c6d02b20cc3e4c96dd09d0f7234c78366019")]
[assembly: AssemblyProduct("LethalAPI.TerminalCommands")]
[assembly: AssemblyTitle("LethalAPI.TerminalCommands")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/LethalCompany/LethalAPI.TerminalCommands")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LethalAPI.TerminalCommands
{
	[HarmonyPatch(typeof(Terminal), "ParsePlayerSentence")]
	public static class ParseSentencePatch
	{
		[HarmonyPrefix]
		public static bool ParsePrefix(Terminal __instance, ref TerminalNode __state)
		{
			__state = null;
			string command = __instance.screenText.text.Substring(__instance.screenText.text.Length - __instance.textAdded);
			__state = CommandHandler.TryExecute(command, __instance);
			return (Object)(object)__state == (Object)null;
		}

		[HarmonyPostfix]
		public static TerminalNode ParsePostfix(TerminalNode __result, TerminalNode __state, Terminal __instance)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Invalid comparison between Unknown and I4
			if ((Object)(object)__state != (Object)null)
			{
				TerminalSubmitPatch.LastNode = __state;
				return __state;
			}
			if ((int)__instance.videoPlayer.source == 1)
			{
				__instance.videoPlayer.source = (VideoSource)0;
			}
			TerminalSubmitPatch.LastNode = __result;
			return __result;
		}
	}
	[BepInPlugin("LethalAPI.TerminalCommands", "LethalAPI.TerminalCommands", "1.1.0")]
	public class TerminalCommandsPlugin : BaseUnityPlugin
	{
		private Harmony HarmonyInstance = new Harmony("LethalAPI.TerminalCommands");

		private TerminalModRegistry Terminal;

		private TerminalConfig TerminalConfig;

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"LethalAPI.TerminalCommands is loading...");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Installing patches");
			HarmonyInstance.PatchAll(typeof(TerminalCommandsPlugin).Assembly);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Registering built-in Commands");
			Terminal = TerminalRegistry.CreateTerminalRegistry();
			Terminal.RegisterFrom<CommandInfoCommands>();
			TerminalConfig = Terminal.RegisterFrom<TerminalConfig>();
			Object.DontDestroyOnLoad((Object)(object)this);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin LethalAPI.TerminalCommands is loaded!");
		}
	}
	public static class TerminalExtensions
	{
		public static void PlayVideoFile(this Terminal terminal, string filePath)
		{
			string url = "file:///" + filePath.Replace('\\', '/');
			terminal.PlayVideoLink(url);
		}

		public static void PlayVideoLink(this Terminal terminal, Uri url)
		{
			((MonoBehaviour)terminal).StartCoroutine(PlayVideoLink(url.AbsoluteUri, terminal));
		}

		public static void PlayVideoLink(this Terminal terminal, string url)
		{
			((MonoBehaviour)terminal).StartCoroutine(PlayVideoLink(url, terminal));
		}

		private static IEnumerator PlayVideoLink(string url, Terminal terminal)
		{
			yield return (object)new WaitForFixedUpdate();
			((Behaviour)terminal.terminalImage).enabled = true;
			terminal.terminalImage.texture = (Texture)(object)terminal.videoTexture;
			terminal.displayingPersistentImage = null;
			terminal.videoPlayer.clip = null;
			terminal.videoPlayer.source = (VideoSource)1;
			terminal.videoPlayer.url = url;
			((Behaviour)terminal.videoPlayer).enabled = true;
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "LethalAPI.TerminalCommands";

		public const string PLUGIN_NAME = "LethalAPI.TerminalCommands";

		public const string PLUGIN_VERSION = "1.1.0";
	}
}
namespace LethalAPI.TerminalCommands.Patches
{
	[HarmonyPatch(typeof(Terminal), "selectTextFieldDelayed")]
	public static class SelectTextFieldPatch
	{
		[HarmonyPrefix]
		public static bool Prefix()
		{
			return false;
		}

		[HarmonyPostfix]
		public static void Postfix(Terminal __instance, ref IEnumerator __result)
		{
			__result = Patch(__instance);
		}

		private static IEnumerator Patch(Terminal terminal)
		{
			yield return (object)new WaitForSeconds(0.2f);
			terminal.screenText.ActivateInputField();
			((Selectable)terminal.screenText).Select();
		}
	}
	[HarmonyPatch(typeof(Terminal), "OnSubmit")]
	public static class TerminalSubmitPatch
	{
		private static ManualLogSource m_LogSource = new ManualLogSource("LethalAPI.TerminalCommands");

		public static TerminalNode LastNode { get; set; }

		[HarmonyPrefix]
		public static void Prefix()
		{
			LastNode = null;
		}

		[HarmonyTranspiler]
		public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Expected O, but got Unknown
			CodeInstruction[] array = instructions.ToArray();
			for (int num = array.Length - 1; num >= 0; num--)
			{
				if (!(array[num].opcode != OpCodes.Callvirt))
				{
					if (array[num + 1].opcode != OpCodes.Ldarg_0)
					{
						ReportTranspileError("Ldarg_0 expected after final callVirt, not found");
						return array;
					}
					array[num + 1] = new CodeInstruction(OpCodes.Ret, (object)null);
					return array;
				}
			}
			ReportTranspileError("Failed to find Callvirt in backward scan");
			return array;
		}

		private static void ReportTranspileError(string message)
		{
			m_LogSource.LogError((object)("Failed to transpile OnSubmit to remove Scroll To Bottom. Did the method get modified in an update? (" + message + ")"));
			m_LogSource.LogWarning((object)"This won't break the mod, but it will cause some odd terminal scrolling behavior");
		}

		[HarmonyPostfix]
		public static void Postfix(Terminal __instance, ref Coroutine ___forceScrollbarCoroutine)
		{
			if ((Object)(object)LastNode == (Object)null || LastNode.clearPreviousText)
			{
				ExecuteScrollCoroutine(__instance, ref ___forceScrollbarCoroutine);
			}
			else
			{
				((MonoBehaviour)__instance).StartCoroutine("forceScrollbarDown");
			}
		}

		private static void ExecuteScrollCoroutine(Terminal terminal, ref Coroutine forceScrollbarCoroutine)
		{
			if (forceScrollbarCoroutine != null)
			{
				((MonoBehaviour)terminal).StopCoroutine(forceScrollbarCoroutine);
			}
			forceScrollbarCoroutine = ((MonoBehaviour)terminal).StartCoroutine("forceScrollbarUp");
		}
	}
	[HarmonyPatch(typeof(Terminal), "TextPostProcess")]
	public static class TextPostProcessPatch
	{
		[HarmonyPrefix]
		public static void Prefix(ref string modifiedDisplayText)
		{
			modifiedDisplayText = modifiedDisplayText.TrimStart('\n', ' ');
			if (!modifiedDisplayText.EndsWith('\n'))
			{
				modifiedDisplayText += "\n";
			}
		}
	}
}
namespace LethalAPI.TerminalCommands.Models
{
	public enum AllowedCaller
	{
		None = -1,
		Player,
		Host
	}
	public class ArgumentStream
	{
		public string[] Arguments { get; }

		public int Index { get; set; }

		public bool EndOfStream => Index >= Arguments.Length;

		public ArgumentStream(string[] arguments)
		{
			Arguments = arguments;
		}

		public void Reset()
		{
			Index = 0;
		}

		public bool TryReadNext(Type type, out object value)
		{
			if (EndOfStream)
			{
				value = null;
				return false;
			}
			return StringConverter.TryConvert(Arguments[Index++], type, out value);
		}

		public bool TryReadRemaining(out string result)
		{
			if (EndOfStream)
			{
				result = null;
				return false;
			}
			result = string.Join(" ", Arguments.Skip(Index));
			return true;
		}

		public bool TryReadNext(out string value)
		{
			value = string.Empty;
			if (EndOfStream)
			{
				return false;
			}
			value = Arguments[Index++];
			return true;
		}

		public bool TryReadNext(out sbyte value)
		{
			value = 0;
			if (EndOfStream)
			{
				return false;
			}
			return sbyte.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out byte value)
		{
			value = 0;
			if (EndOfStream)
			{
				return false;
			}
			return byte.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out short value)
		{
			value = 0;
			if (EndOfStream)
			{
				return false;
			}
			return short.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out ushort value)
		{
			value = 0;
			if (EndOfStream)
			{
				return false;
			}
			return ushort.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out int value)
		{
			value = 0;
			if (EndOfStream)
			{
				return false;
			}
			return int.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out uint value)
		{
			value = 0u;
			if (EndOfStream)
			{
				return false;
			}
			return uint.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out long value)
		{
			value = 0L;
			if (EndOfStream)
			{
				return false;
			}
			return long.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out ulong value)
		{
			value = 0uL;
			if (EndOfStream)
			{
				return false;
			}
			return ulong.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out float value)
		{
			value = 0f;
			if (EndOfStream)
			{
				return false;
			}
			return float.TryParse(Arguments[Index++], out value);
		}

		public bool TryReadNext(out double value)
		{
			value = 0.0;
			if (EndOfStream)
			{
				return false;
			}
			return double.TryParse(Arguments[Index++], out value);
		}
	}
	public class CommandComparer : IComparer<TerminalCommand>
	{
		public int Compare(TerminalCommand x, TerminalCommand y)
		{
			if (x.Priority > y.Priority)
			{
				return 1;
			}
			if (x.Priority < y.Priority)
			{
				return -1;
			}
			return x.ArgumentCount.CompareTo(y.ArgumentCount);
		}
	}
	public static class CommandHandler
	{
		private static readonly Regex m_SplitRegex = new Regex("[\\\"](.+?)[\\\"]|([^ ]+)", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled);

		private static readonly CommandComparer m_Comparer = new CommandComparer();

		public static TerminalNode TryExecute(string command, Terminal terminal)
		{
			IEnumerable<string> source = from Match x in m_SplitRegex.Matches(command.Trim())
				select x.Value.Trim('"', ' ');
			string commandName = source.First();
			string[] arguments = source.Skip(1).ToArray();
			List<(TerminalCommand, Func<TerminalNode>)> list = new List<(TerminalCommand, Func<TerminalNode>)>();
			TerminalCommand[] array = TerminalRegistry.GetCommands(commandName).ToArray();
			foreach (TerminalCommand terminalCommand in array)
			{
				if (terminalCommand.CheckAllowed() && terminalCommand.TryCreateInvoker(arguments, terminal, out var invoker))
				{
					list.Add((terminalCommand, invoker));
				}
			}
			foreach (var item in list.OrderByDescending<(TerminalCommand, Func<TerminalNode>), TerminalCommand>(((TerminalCommand command, Func<TerminalNode> invoker) x) => x.command, m_Comparer))
			{
				TerminalNode val = item.Item2();
				if ((Object)(object)val != (Object)null)
				{
					return val;
				}
			}
			return null;
		}
	}
	public static class DefaultStringConverters
	{
		[StringConverter]
		public static string ParseString(string input)
		{
			return input;
		}

		[StringConverter]
		public static sbyte ParseSByte(string input)
		{
			if (sbyte.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static byte ParseByte(string input)
		{
			if (byte.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static short ParseShort(string input)
		{
			if (short.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static ushort ParseUShort(string input)
		{
			if (ushort.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static int ParseInt(string input)
		{
			if (int.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static uint ParseUInt(string input)
		{
			if (uint.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static long ParseLong(string input)
		{
			if (long.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static ulong ParseULong(string input)
		{
			if (ulong.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static float ParseFloat(string input)
		{
			if (float.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static double ParseDouble(string input)
		{
			if (double.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		[StringConverter]
		public static decimal ParseDecimal(string input)
		{
			if (decimal.TryParse(input, out var result))
			{
				return result;
			}
			throw new ArgumentException();
		}

		public static PlayerControllerB ParsePlayerControllerB(string value)
		{
			if ((Object)(object)StartOfRound.Instance == (Object)null)
			{
				throw new ArgumentException("Game has not started");
			}
			PlayerControllerB val = null;
			if (ulong.TryParse(value, out var steamID))
			{
				val = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB x) => x.playerSteamId == steamID));
			}
			if ((Object)(object)val == (Object)null)
			{
				val = ((IEnumerable<PlayerControllerB>)StartOfRound.Instance.allPlayerScripts).FirstOrDefault((Func<PlayerControllerB, bool>)((PlayerControllerB x) => x.playerUsername.IndexOf(value, StringComparison.InvariantCultureIgnoreCase) != -1));
			}
			if ((Object)(object)val == (Object)null)
			{
				throw new ArgumentException("Failed to find player");
			}
			return val;
		}
	}
	public enum PersistType
	{
		LocalPlayer,
		Host,
		Save
	}
	public delegate object StringConversionHandler(string value);
	public static class StringConverter
	{
		private static bool m_Initialized = false;

		public static ConcurrentDictionary<Type, StringConversionHandler> StringConverters { get; } = new ConcurrentDictionary<Type, StringConversionHandler>();


		public static bool TryConvert(string value, Type type, out object result)
		{
			if (!m_Initialized)
			{
				m_Initialized = true;
				RegisterFromType(typeof(DefaultStringConverters), null, replaceExisting: false);
			}
			if (!StringConverters.TryGetValue(type, out var value2))
			{
				result = null;
				return false;
			}
			try
			{
				result = value2(value);
				return true;
			}
			catch (ArgumentException)
			{
			}
			result = null;
			return false;
		}

		public static void RegisterFrom<T>(T instance, bool replaceExisting = true) where T : class
		{
			RegisterFromType(typeof(T), instance, replaceExisting);
		}

		public static void RegisterFromType(Type type, object instance = null, bool replaceExisting = true)
		{
			MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
			foreach (MethodInfo method in methods)
			{
				if (method.GetCustomAttribute<StringConverterAttribute>() == null)
				{
					continue;
				}
				ParameterInfo[] parameters = method.GetParameters();
				if (parameters.Length == 1 && !(parameters[0].ParameterType != typeof(string)))
				{
					Type returnType = method.ReturnType;
					StringConversionHandler value2 = (string value) => method.Invoke(instance, new object[1] { value });
					if (replaceExisting || !StringConverters.ContainsKey(returnType))
					{
						StringConverters[returnType] = value2;
					}
				}
			}
		}
	}
	public class TerminalCommand
	{
		private ManualLogSource m_LogSource = new ManualLogSource("LethalAPI.TerminalCommands");

		public string Name { get; }

		public MethodInfo Method { get; }

		public object Instance { get; }

		public bool ClearConsole { get; }

		public int ArgumentCount { get; }

		public string Syntax { get; }

		public string Description { get; }

		public int Priority { get; }

		public TerminalCommand(string name, MethodInfo method, object instance, bool clearConsole, string syntax = null, string description = null, int priority = 0)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			Name = name;
			Method = method;
			Instance = instance;
			ClearConsole = clearConsole;
			ArgumentCount = method.GetParameters().Length;
			Syntax = syntax;
			Description = description;
			Priority = priority;
		}

		public bool CheckAllowed()
		{
			foreach (AccessControlAttribute customAttribute in Method.GetCustomAttributes<AccessControlAttribute>())
			{
				if (!customAttribute.CheckAllowed())
				{
					return false;
				}
			}
			return true;
		}

		public static TerminalCommand FromMethod(MethodInfo info, object instance, string overrideName = null)
		{
			bool clearConsole = false;
			string syntax = null;
			string description = null;
			string text = overrideName;
			int priority = 0;
			TerminalCommandAttribute customAttribute = info.GetCustomAttribute<TerminalCommandAttribute>();
			if (customAttribute != null)
			{
				text = text ?? customAttribute.CommandName;
				clearConsole = customAttribute.ClearText;
			}
			CommandInfoAttribute customAttribute2 = info.GetCustomAttribute<CommandInfoAttribute>();
			if (customAttribute2 != null)
			{
				syntax = customAttribute2.Syntax;
				description = customAttribute2.Description;
			}
			CommandPriority customAttribute3 = info.GetCustomAttribute<CommandPriority>();
			if (customAttribute3 != null)
			{
				priority = customAttribute3.Priority;
			}
			return new TerminalCommand(text, info, instance, clearConsole, syntax, description, priority);
		}

		public bool TryCreateInvoker(string[] arguments, Terminal terminal, out Func<TerminalNode> invoker)
		{
			ParameterInfo[] parameters = Method.GetParameters();
			object[] values = new object[parameters.Length];
			ArgumentStream argumentStream = new ArgumentStream(arguments);
			invoker = null;
			for (int i = 0; i < parameters.Length; i++)
			{
				ParameterInfo parameterInfo = parameters[i];
				Type parameterType = parameterInfo.ParameterType;
				if (parameterType == typeof(Terminal))
				{
					values[i] = terminal;
				}
				else if (parameterType == typeof(ArgumentStream))
				{
					values[i] = argumentStream;
				}
				else if (parameterType == typeof(string[]))
				{
					values[i] = arguments;
				}
				else if (parameterType == typeof(string) && parameterInfo.GetCustomAttribute<RemainingTextAttribute>() != null)
				{
					if (!argumentStream.TryReadRemaining(out var result))
					{
						return false;
					}
					values[i] = result;
				}
				else
				{
					if (!argumentStream.TryReadNext(parameterType, out var value))
					{
						return false;
					}
					values[i] = value;
				}
			}
			argumentStream.Reset();
			invoker = () => ExecuteCommand(values);
			return true;
		}

		private TerminalNode ExecuteCommand(object[] arguments)
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Expected O, but got Unknown
			object obj;
			try
			{
				obj = Method.Invoke(Instance, arguments);
			}
			catch (Exception ex)
			{
				m_LogSource.LogError((object)("Error caught while invoking command hander: " + ex.Message));
				m_LogSource.LogError((object)ex.StackTrace);
				return null;
			}
			if (obj == null)
			{
				return null;
			}
			Type type = obj.GetType();
			if (!typeof(TerminalNode).IsAssignableFrom(type))
			{
				TerminalNode obj2 = ScriptableObject.CreateInstance<TerminalNode>();
				obj2.displayText = obj.ToString() + "\n";
				obj2.clearPreviousText = ClearConsole;
				return obj2;
			}
			return (TerminalNode)obj;
		}
	}
	public class TerminalModRegistry
	{
		public List<TerminalCommand> Commands { get; } = new List<TerminalCommand>();


		public T RegisterFrom<T>() where T : class, new()
		{
			return RegisterFrom(new T());
		}

		public T RegisterFrom<T>(T instance) where T : class
		{
			foreach (MethodInfo commandMethod in TerminalRegistry.GetCommandMethods<T>())
			{
				TerminalCommand terminalCommand = TerminalCommand.FromMethod(commandMethod, instance);
				TerminalRegistry.RegisterCommand(terminalCommand);
				lock (Commands)
				{
					Commands.Add(terminalCommand);
				}
			}
			StringConverter.RegisterFrom(instance);
			return instance;
		}

		public void Deregister()
		{
			if (Commands != null)
			{
				for (int i = 0; i < Commands.Count; i++)
				{
					TerminalRegistry.Deregister(Commands[i]);
				}
			}
		}
	}
	public class TerminalRegistry
	{
		private static readonly ConcurrentDictionary<string, List<TerminalCommand>> m_RegisteredCommands = new ConcurrentDictionary<string, List<TerminalCommand>>(StringComparer.InvariantCultureIgnoreCase);

		public static TerminalModRegistry RegisterFrom<T>(T instance) where T : class
		{
			TerminalModRegistry terminalModRegistry = new TerminalModRegistry();
			foreach (MethodInfo commandMethod in GetCommandMethods<T>())
			{
				TerminalCommand terminalCommand = TerminalCommand.FromMethod(commandMethod, instance);
				RegisterCommand(terminalCommand);
				terminalModRegistry.Commands.Add(terminalCommand);
			}
			StringConverter.RegisterFrom(instance);
			return terminalModRegistry;
		}

		public static TerminalModRegistry CreateTerminalRegistry()
		{
			return new TerminalModRegistry();
		}

		public static void RegisterCommand(TerminalCommand command)
		{
			if (!m_RegisteredCommands.TryGetValue(command.Name, out var value))
			{
				value = new List<TerminalCommand>();
				m_RegisteredCommands[command.Name] = value;
			}
			lock (value)
			{
				value.Add(command);
			}
		}

		public static void Deregister(TerminalCommand command)
		{
			if (!m_RegisteredCommands.TryGetValue(command.Name, out var value))
			{
				return;
			}
			lock (value)
			{
				value.Remove(command);
			}
		}

		public static IReadOnlyList<TerminalCommand> GetCommands(string commandName)
		{
			if (m_RegisteredCommands.TryGetValue(commandName, out var value))
			{
				return value;
			}
			return new List<TerminalCommand>();
		}

		public static IEnumerable<TerminalCommand> EnumerateCommands(string name)
		{
			if (!m_RegisteredCommands.TryGetValue(name, out var value))
			{
				return Enumerable.Empty<TerminalCommand>();
			}
			return value;
		}

		public static IEnumerable<TerminalCommand> EnumerateCommands()
		{
			string[] keys = m_RegisteredCommands.Keys.ToArray();
			for (int i = 0; i < keys.Length; i++)
			{
				List<TerminalCommand> overloads = m_RegisteredCommands[keys[i]];
				for (int c = 0; c < overloads.Count; c++)
				{
					yield return overloads[c];
				}
			}
		}

		public static IEnumerable<MethodInfo> GetCommandMethods<T>()
		{
			MethodInfo[] methods = typeof(T).GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			foreach (MethodInfo methodInfo in methods)
			{
				if (methodInfo.GetCustomAttribute<TerminalCommandAttribute>() != null)
				{
					yield return methodInfo;
				}
			}
		}
	}
}
namespace LethalAPI.TerminalCommands.Configs
{
	[ConfigGroup("Terminal", "Configure the behavior of the terminal")]
	public class TerminalConfig
	{
		[TerminalConfig("Enables/Disables terminal verb commands", null)]
		[ConfigPersist(PersistType.LocalPlayer, null)]
		public bool VerbsEnabled { get; set; }

		[TerminalConfig("Specifies if the Confirm/Deny pop-up should be shown", null)]
		[ConfigPersist(PersistType.LocalPlayer, null)]
		public bool AutoConfirm { get; set; }
	}
}
namespace LethalAPI.TerminalCommands.Commands
{
	public class CommandInfoCommands
	{
		[TerminalCommand("Other", true)]
		public string CommandList()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("Other commands:");
			stringBuilder.AppendLine();
			stringBuilder.AppendLine(">VIEW MONITOR");
			stringBuilder.AppendLine("To toggle on/off the main monitor's map cam");
			stringBuilder.AppendLine();
			stringBuilder.AppendLine(">SWITCH {RADAR}");
			stringBuilder.AppendLine("To switch the player view on the main monitor");
			stringBuilder.AppendLine();
			stringBuilder.AppendLine(">PING [Radar booster name]");
			stringBuilder.AppendLine("To switch the player view on the main monitor");
			stringBuilder.AppendLine();
			stringBuilder.AppendLine(">SCAN");
			stringBuilder.AppendLine("To scan for the number of items left on the current planet");
			stringBuilder.AppendLine();
			foreach (TerminalCommand item in TerminalRegistry.EnumerateCommands())
			{
				if (item.Description != null && item.CheckAllowed())
				{
					stringBuilder.AppendLine(">" + item.Name.ToUpper() + " " + item.Syntax?.ToUpper());
					stringBuilder.AppendLine(item.Description);
					stringBuilder.AppendLine();
				}
			}
			return stringBuilder.ToString();
		}

		[TerminalCommand("Help", false)]
		[CommandInfo("Shows further information about a command", "[Command]")]
		public string HelpCommand(string name)
		{
			StringBuilder stringBuilder = new StringBuilder();
			TerminalCommand[] array = TerminalRegistry.EnumerateCommands(name).ToArray();
			if (array.Length == 0)
			{
				return "Unknown command: '" + name + "'";
			}
			TerminalCommand[] array2 = array;
			foreach (TerminalCommand terminalCommand in array2)
			{
				stringBuilder.AppendLine(">" + terminalCommand.Name.ToUpper() + " " + terminalCommand.Syntax?.ToUpper());
				stringBuilder.AppendLine(terminalCommand.Description);
				if (!terminalCommand.CheckAllowed())
				{
					stringBuilder.AppendLine("[Host Only]");
				}
				stringBuilder.AppendLine();
			}
			return stringBuilder.ToString();
		}
	}
}
namespace LethalAPI.TerminalCommands.Attributes
{
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
	public abstract class AccessControlAttribute : Attribute
	{
		public abstract bool CheckAllowed();
	}
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
	public class AllowedCallerAttribute : AccessControlAttribute
	{
		public AllowedCaller Caller { get; }

		public AllowedCallerAttribute(AllowedCaller caller)
		{
			Caller = caller;
		}

		public override bool CheckAllowed()
		{
			switch (Caller)
			{
			case AllowedCaller.None:
				return false;
			case AllowedCaller.Player:
				return true;
			case AllowedCaller.Host:
				if ((Object)(object)StartOfRound.Instance == (Object)null)
				{
					return false;
				}
				return ((NetworkBehaviour)StartOfRound.Instance).IsHost;
			default:
				return true;
			}
		}
	}
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
	public class CommandInfoAttribute : Attribute
	{
		public string Syntax { get; }

		public string Description { get; }

		public CommandInfoAttribute(string description, string syntax = "")
		{
			Syntax = syntax;
			Description = description;
		}
	}
	public sealed class CommandPriority : Attribute
	{
		public int Priority { get; }

		public CommandPriority(int priority)
		{
			Priority = priority;
		}
	}
	[AttributeUsage(AttributeTargets.Class)]
	public sealed class ConfigGroupAttribute : Attribute
	{
		public string Name { get; }

		public string Description { get; }

		public ConfigGroupAttribute(string name, string description)
		{
			Name = name;
			Description = description;
		}
	}
	public class ConfigPersistAttribute : Attribute
	{
		public PersistType PersistType { get; }

		public string ConfigPath { get; }

		public ConfigPersistAttribute(PersistType persistType, string configPath = null)
		{
			PersistType = persistType;
			ConfigPath = configPath;
		}
	}
	[AttributeUsage(AttributeTargets.Parameter)]
	public sealed class RemainingTextAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method)]
	public sealed class StringConverterAttribute : Attribute
	{
	}
	[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
	public class TerminalCommandAttribute : Attribute
	{
		public string CommandName { get; }

		public bool ClearText { get; }

		public TerminalCommandAttribute(string name, bool clearText = false)
		{
			CommandName = name;
			ClearText = clearText;
		}
	}
	[AttributeUsage(AttributeTargets.Property)]
	public class TerminalConfigAttribute : Attribute
	{
		public string Name { get; }

		public string Description { get; }

		public TerminalConfigAttribute(string description, string name = null)
		{
			Name = name;
			Description = description;
		}
	}
}