using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using OpJosModREPO.Tourettes.Patches;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("Tourettes")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Tourettes")]
[assembly: AssemblyTitle("Tourettes")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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 OpJosModREPO
{
public class BeeMovie
{
[CompilerGenerated]
private sealed class <PlayBeeMovie>d__2 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public PlayerAvatar __instance;
private int <totalLength>5__2;
private int <index>5__3;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <PlayBeeMovie>d__2(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
PlayerAvatarPatch.isSpeakingBee = true;
<totalLength>5__2 = script.Length;
<index>5__3 = 0;
break;
case 1:
<>1__state = -1;
break;
}
if (<index>5__3 < <totalLength>5__2)
{
int num = Math.Min(maxLength, <totalLength>5__2 - <index>5__3);
string text = script.Substring(<index>5__3, num);
__instance.ChatMessageSend(text);
<index>5__3 += num;
<>2__current = (object)new WaitForSeconds(3600f);
<>1__state = 1;
return true;
}
PlayerAvatarPatch.isSpeakingBee = false;
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private static readonly string script = "According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don't care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little. Barry! Breakfast is ready! Coming! Hang on a second. Hello? Barry? Adam? Can you believe this is happening? I can't. I'll pick you up. Looking sharp. Use the stairs, Your father paid good money for those. Sorry. I'm excited. Here's the graduate. We're very proud of you, son. A perfect report card, all B's. Very proud. Ma! I got a thing going here. You got lint on your fuzz. Ow! That's me! Wave to us! We'll be in row 118,000. Bye! Barry, I told you, stop flying in the house!";
private static int maxLength = 32000;
[IteratorStateMachine(typeof(<PlayBeeMovie>d__2))]
public static IEnumerator PlayBeeMovie(PlayerAvatar __instance)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <PlayBeeMovie>d__2(0)
{
__instance = __instance
};
}
}
public static class ConfigVariables
{
public static int lowestDelay;
public static int highestDelay;
public static string phrase1;
public static string phrase2;
public static string phrase3;
public static string phrase4;
public static string phrase5;
public static string phrase6;
public static string phrase7;
public static string phrase8;
public static string phrase9;
public static string phrase10;
public static string phrase11;
public static string phrase12;
public static string phrase13;
public static string phrase14;
public static string phrase15;
public static string phrase16;
public static string phrase17;
public static string phrase18;
public static string phrase19;
public static string phrase20;
public static string phrase21;
public static string phrase22;
public static string phrase23;
public static string phrase24;
public static string phrase25;
public static string phrase26;
public static string phrase27;
public static string phrase28;
public static string phrase29;
public static string phrase30;
public static string phrase31;
public static string phrase32;
public static string phrase33;
public static string phrase34;
public static string phrase35;
public static string phrase36;
public static string phrase37;
public static string phrase38;
public static string phrase39;
public static string phrase40;
public static string phrase41;
public static string phrase42;
public static string phrase43;
public static string phrase44;
public static string phrase45;
public static string phrase46;
public static string phrase47;
public static string phrase48;
public static string phrase49;
public static string phrase50;
}
public class Phrases
{
private static readonly List<string> phraseList = new List<string>();
private static readonly Random rng = new Random();
private static void setupPhrases()
{
phraseList.Add(ConfigVariables.phrase1);
phraseList.Add(ConfigVariables.phrase2);
phraseList.Add(ConfigVariables.phrase3);
phraseList.Add(ConfigVariables.phrase4);
phraseList.Add(ConfigVariables.phrase5);
phraseList.Add(ConfigVariables.phrase6);
phraseList.Add(ConfigVariables.phrase7);
phraseList.Add(ConfigVariables.phrase8);
phraseList.Add(ConfigVariables.phrase9);
phraseList.Add(ConfigVariables.phrase10);
phraseList.Add(ConfigVariables.phrase11);
phraseList.Add(ConfigVariables.phrase12);
phraseList.Add(ConfigVariables.phrase13);
phraseList.Add(ConfigVariables.phrase14);
phraseList.Add(ConfigVariables.phrase15);
phraseList.Add(ConfigVariables.phrase16);
phraseList.Add(ConfigVariables.phrase17);
phraseList.Add(ConfigVariables.phrase18);
phraseList.Add(ConfigVariables.phrase19);
phraseList.Add(ConfigVariables.phrase20);
phraseList.Add(ConfigVariables.phrase21);
phraseList.Add(ConfigVariables.phrase22);
phraseList.Add(ConfigVariables.phrase23);
phraseList.Add(ConfigVariables.phrase24);
phraseList.Add(ConfigVariables.phrase25);
phraseList.Add(ConfigVariables.phrase26);
phraseList.Add(ConfigVariables.phrase27);
phraseList.Add(ConfigVariables.phrase28);
phraseList.Add(ConfigVariables.phrase29);
phraseList.Add(ConfigVariables.phrase30);
phraseList.Add(ConfigVariables.phrase31);
phraseList.Add(ConfigVariables.phrase32);
phraseList.Add(ConfigVariables.phrase33);
phraseList.Add(ConfigVariables.phrase34);
phraseList.Add(ConfigVariables.phrase35);
phraseList.Add(ConfigVariables.phrase36);
phraseList.Add(ConfigVariables.phrase37);
phraseList.Add(ConfigVariables.phrase38);
phraseList.Add(ConfigVariables.phrase39);
phraseList.Add(ConfigVariables.phrase40);
phraseList.Add(ConfigVariables.phrase41);
phraseList.Add(ConfigVariables.phrase42);
phraseList.Add(ConfigVariables.phrase43);
phraseList.Add(ConfigVariables.phrase44);
phraseList.Add(ConfigVariables.phrase45);
phraseList.Add(ConfigVariables.phrase46);
phraseList.Add(ConfigVariables.phrase47);
phraseList.Add(ConfigVariables.phrase48);
phraseList.Add(ConfigVariables.phrase49);
phraseList.Add(ConfigVariables.phrase50);
}
public static void SpeakRandomPhrase(PlayerAvatar __instance)
{
if (phraseList.Count == 0)
{
setupPhrases();
}
if (rng.Next(phraseList.Count + 1) == phraseList.Count)
{
((MonoBehaviour)__instance).StartCoroutine(BeeMovie.PlayBeeMovie(__instance));
return;
}
PlayerAvatarPatch.isSpeakingBee = false;
string text = phraseList[rng.Next(phraseList.Count)];
__instance.ChatMessageSend(text);
}
}
}
namespace OpJosModREPO.Tourettes
{
[BepInPlugin("OpJosModREPO.Tourettes", "Tourettes", "1.0.1")]
public class OpJosModBase : BaseUnityPlugin
{
private const string modGUID = "OpJosModREPO.Tourettes";
private const string modName = "Tourettes";
private const string modVersion = "1.0.1";
private readonly Harmony harmony = new Harmony("OpJosModREPO.Tourettes");
private static OpJosModBase Instance;
internal ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("OpJosModREPO.Tourettes");
mls.LogInfo((object)"Tourettes has started!");
setupConfig();
PlayerAvatarPatch.SetLogSource(mls);
harmony.PatchAll();
}
private void setupConfig()
{
ConfigEntry<int> val = ((BaseUnityPlugin)this).Config.Bind<int>("Lowest Delay", "LowestDelay", 30, "soonest you may say another phrase in seconds");
ConfigEntry<int> val2 = ((BaseUnityPlugin)this).Config.Bind<int>("Highest Delay", "HighestDelay", 300, "longest amount of time before you say another phrase");
ConfigEntry<string> val3 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 1", "Phrase1", "Gosh Darn it", "one of the phrases you may blurt out");
ConfigEntry<string> val4 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 2", "Phrase2", "you are gay", "one of the phrases you may blurt out");
ConfigEntry<string> val5 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 3", "Phrase3", "FUCK!", "one of the phrases you may blurt out");
ConfigEntry<string> val6 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 4", "Phrase4", "SHIT FUCK", "one of the phrases you may blurt out");
ConfigEntry<string> val7 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 5", "Phrase5", "Oooo Fuckk meeeee", "one of the phrases you may blurt out");
ConfigEntry<string> val8 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 6", "Phrase6", "you're cute", "one of the phrases you may blurt out");
ConfigEntry<string> val9 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 7", "Phrase7", "ah shoot!", "one of the phrases you may blurt out");
ConfigEntry<string> val10 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 8", "Phrase8", "ballocks", "one of the phrases you may blurt out");
ConfigEntry<string> val11 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 9", "Phrase9", "poop gee ha ha", "one of the phrases you may blurt out");
ConfigEntry<string> val12 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 10", "Phrase10", "what are you talking about?", "one of the phrases you may blurt out");
ConfigEntry<string> val13 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 11", "Phrase11", "your mom gay", "one of the phrases you may blurt out");
ConfigEntry<string> val14 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 12", "Phrase12", "i love to goon", "one of the phrases you may blurt out");
ConfigEntry<string> val15 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 13", "Phrase13", "i just gooned all over myself", "one of the phrases you may blurt out");
ConfigEntry<string> val16 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 14", "Phrase14", "i am gay", "one of the phrases you may blurt out");
ConfigEntry<string> val17 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 15", "Phrase15", "i love massive milkers", "one of the phrases you may blurt out");
ConfigEntry<string> val18 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 16", "Phrase16", "i fear i might be a homosexual", "one of the phrases you may blurt out");
ConfigEntry<string> val19 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 17", "Phrase17", "go away i'm looks maxing", "one of the phrases you may blurt out");
ConfigEntry<string> val20 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 18", "Phrase18", "booo", "one of the phrases you may blurt out");
ConfigEntry<string> val21 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 19", "Phrase19", "haha boobies", "one of the phrases you may blurt out");
ConfigEntry<string> val22 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 20", "Phrase20", "eueueueueeueueue", "one of the phrases you may blurt out");
ConfigEntry<string> val23 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 21", "Phrase21", "yyyyyyyyyyyyyyyy", "one of the phrases you may blurt out");
ConfigEntry<string> val24 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 22", "Phrase22", "GAYyyybeeeeee", "one of the phrases you may blurt out");
ConfigEntry<string> val25 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 23", "Phrase23", "i'm coming", "one of the phrases you may blurt out");
ConfigEntry<string> val26 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 24", "Phrase24", "this week at jeremy franklin mitsubishi", "one of the phrases you may blurt out");
ConfigEntry<string> val27 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 25", "Phrase25", "its ya boi, uhhhhh. skinny penis", "one of the phrases you may blurt out");
ConfigEntry<string> val28 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 26", "Phrase26", "i sure hope it does!", "one of the phrases you may blurt out");
ConfigEntry<string> val29 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 27", "Phrase27", "These boots have seen everything..", "one of the phrases you may blurt out");
ConfigEntry<string> val30 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 28", "Phrase28", "i was hiddddiiiiinnngggggg", "one of the phrases you may blurt out");
ConfigEntry<string> val31 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 29", "Phrase29", "sup chubby", "one of the phrases you may blurt out");
ConfigEntry<string> val32 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 30", "Phrase30", "beeepp booopp beeep", "one of the phrases you may blurt out");
ConfigEntry<string> val33 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 31", "Phrase31", "I SAIDDDDD, whoever threw that paperrrr. your moms a HOE!", "one of the phrases you may blurt out");
ConfigEntry<string> val34 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 32", "Phrase32", "I shouldn't have wished to live in more interesting times", "one of the phrases you may blurt out");
ConfigEntry<string> val35 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 33", "Phrase33", "still me, despite everything", "one of the phrases you may blurt out");
ConfigEntry<string> val36 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 34", "Phrase34", "DEEENOOOOO STOOOPPPSSS", "one of the phrases you may blurt out");
ConfigEntry<string> val37 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 35", "Phrase35", "kaboom", "one of the phrases you may blurt out");
ConfigEntry<string> val38 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 36", "Phrase36", "later nerd", "one of the phrases you may blurt out");
ConfigEntry<string> val39 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 37", "Phrase37", "nahhh imma do my own thing", "one of the phrases you may blurt out");
ConfigEntry<string> val40 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 38", "Phrase38", "stand ready for my arrival worm", "one of the phrases you may blurt out");
ConfigEntry<string> val41 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 39", "Phrase39", "Is that blood? No... nevermind", "one of the phrases you may blurt out");
ConfigEntry<string> val42 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 40", "Phrase40", "I've got a lot on my mind... and, well, in it.", "one of the phrases you may blurt out");
ConfigEntry<string> val43 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 41", "Phrase41", "I wish I had a bag of holding", "one of the phrases you may blurt out");
ConfigEntry<string> val44 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 42", "Phrase42", "Better not be cursed", "one of the phrases you may blurt out");
ConfigEntry<string> val45 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 43", "Phrase43", "Still alive... so that's progress", "one of the phrases you may blurt out");
ConfigEntry<string> val46 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 44", "Phrase44", "All's well that ends... not as bad as it could've", "one of the phrases you may blurt out");
ConfigEntry<string> val47 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 45", "Phrase45", "Cursed to put my hands on everything", "one of the phrases you may blurt out");
ConfigEntry<string> val48 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 46", "Phrase46", "No traps, please ...", "one of the phrases you may blurt out");
ConfigEntry<string> val49 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 47", "Phrase47", "Do you know what else is massive?", "one of the phrases you may blurt out");
ConfigEntry<string> val50 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 48", "Phrase48", "Blood comes easier these days....", "one of the phrases you may blurt out");
ConfigEntry<string> val51 = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 49", "Phrase49", "me needs to poopy", "one of the phrases you may blurt out");
ConfigEntry<string> obj = ((BaseUnityPlugin)this).Config.Bind<string>("Phrase 50", "Phrase50", "I smell like beef", "one of the phrases you may blurt out");
ConfigVariables.lowestDelay = val.Value;
ConfigVariables.highestDelay = val2.Value;
ConfigVariables.phrase1 = val3.Value;
ConfigVariables.phrase2 = val4.Value;
ConfigVariables.phrase3 = val5.Value;
ConfigVariables.phrase4 = val6.Value;
ConfigVariables.phrase5 = val7.Value;
ConfigVariables.phrase6 = val8.Value;
ConfigVariables.phrase7 = val9.Value;
ConfigVariables.phrase8 = val10.Value;
ConfigVariables.phrase9 = val11.Value;
ConfigVariables.phrase10 = val12.Value;
ConfigVariables.phrase11 = val13.Value;
ConfigVariables.phrase12 = val14.Value;
ConfigVariables.phrase13 = val15.Value;
ConfigVariables.phrase14 = val16.Value;
ConfigVariables.phrase15 = val17.Value;
ConfigVariables.phrase16 = val18.Value;
ConfigVariables.phrase17 = val19.Value;
ConfigVariables.phrase18 = val20.Value;
ConfigVariables.phrase19 = val21.Value;
ConfigVariables.phrase20 = val22.Value;
ConfigVariables.phrase21 = val23.Value;
ConfigVariables.phrase22 = val24.Value;
ConfigVariables.phrase23 = val25.Value;
ConfigVariables.phrase24 = val26.Value;
ConfigVariables.phrase25 = val27.Value;
ConfigVariables.phrase26 = val28.Value;
ConfigVariables.phrase27 = val29.Value;
ConfigVariables.phrase28 = val30.Value;
ConfigVariables.phrase29 = val31.Value;
ConfigVariables.phrase30 = val32.Value;
ConfigVariables.phrase31 = val33.Value;
ConfigVariables.phrase32 = val34.Value;
ConfigVariables.phrase33 = val35.Value;
ConfigVariables.phrase34 = val36.Value;
ConfigVariables.phrase35 = val37.Value;
ConfigVariables.phrase36 = val38.Value;
ConfigVariables.phrase37 = val39.Value;
ConfigVariables.phrase38 = val40.Value;
ConfigVariables.phrase39 = val41.Value;
ConfigVariables.phrase40 = val42.Value;
ConfigVariables.phrase41 = val43.Value;
ConfigVariables.phrase42 = val44.Value;
ConfigVariables.phrase43 = val45.Value;
ConfigVariables.phrase44 = val46.Value;
ConfigVariables.phrase45 = val47.Value;
ConfigVariables.phrase46 = val48.Value;
ConfigVariables.phrase47 = val49.Value;
ConfigVariables.phrase48 = val50.Value;
ConfigVariables.phrase49 = val51.Value;
ConfigVariables.phrase50 = obj.Value;
}
}
}
namespace OpJosModREPO.Tourettes.Patches
{
[HarmonyPatch(typeof(PlayerAvatar))]
internal class PlayerAvatarPatch
{
private static ManualLogSource mls;
private static float nextExecutionTime = 0f;
private static Random rng = new Random();
public static bool isSpeakingBee = false;
public static void SetLogSource(ManualLogSource logSource)
{
mls = logSource;
}
[HarmonyPatch("Update")]
[HarmonyPostfix]
private static void UpdatePatch(PlayerAvatar __instance)
{
if (((Object)__instance).GetInstanceID() == ((Object)PlayerAvatar.instance).GetInstanceID() && Time.time > nextExecutionTime && ((Behaviour)__instance).isActiveAndEnabled && !isSpeakingBee)
{
mls.LogInfo((object)"said random phrase!");
Phrases.SpeakRandomPhrase(__instance);
nextExecutionTime = Time.time + (float)rng.Next(ConfigVariables.lowestDelay, ConfigVariables.highestDelay);
}
}
}
}