using System;
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.Logging;
using EnemyTTS.Patches;
using EnemyTTS.TTS;
using EnemyTTS.UI;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Strobotnik.Klattersynth;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("MonsterTTS")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+c6942476bf83deb89fa61c0b99165ed3ca85a12e")]
[assembly: AssemblyProduct("My first plugin")]
[assembly: AssemblyTitle("MonsterTTS")]
[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;
}
}
}
public class StateMessageHandler<TState>
{
private Dictionary<TState, List<string>> stateMessages = new Dictionary<TState, List<string>>();
private Dictionary<TState, List<string>> usedMessages = new Dictionary<TState, List<string>>();
public void AddMessages(TState state, List<string> messages)
{
stateMessages[state] = messages;
usedMessages[state] = new List<string>();
}
public string GetRandomMessage(TState state)
{
if (stateMessages.TryGetValue(state, out var value) && value.Count > 0)
{
List<string> list = new List<string>(value);
if (usedMessages.TryGetValue(state, out var value2))
{
foreach (string item in value2)
{
list.Remove(item);
}
}
if (list.Count == 0)
{
list = value;
usedMessages[state] = new List<string>();
}
string text = list[Random.Range(0, list.Count)];
usedMessages[state].Add(text);
return text;
}
return null;
}
}
namespace MonsterTTS
{
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "MonsterTTS";
public const string PLUGIN_NAME = "My first plugin";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace EnemyTTS
{
[BepInPlugin("com.surfknasen.EnemyTTS", "Enemy TTS", "0.1.0")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Logger;
private readonly Harmony __harmony = new Harmony("com.surfknasen.EnemyTTS");
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"Plugin Enemy TTS is loaded!");
__harmony.PatchAll(typeof(EnemyPatch));
}
}
}
namespace EnemyTTS.UI
{
public class WorldSpaceUITTSEnemy : WorldSpaceUIChild
{
public TextMeshProUGUI text;
public float wordTime;
public TTSVoice ttsVoice;
public Transform followTransform;
public float flashTimer = 0.1f;
public Color textColor = Color.yellow;
public Color textColorTarget = Color.white;
public bool flashDone;
public AnimationCurve curveIntro;
public float curveLerp;
public Vector3 followPosition;
public float alphaCheckTimer;
public float textAlphaTarget;
public float textAlpha;
public Camera cameraMain;
public void Awake()
{
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
text = ((Component)this).GetComponent<TextMeshProUGUI>();
if ((Object)(object)text != (Object)null)
{
((Graphic)text).color = new Color(textColor.r, textColor.g, textColor.b, 0f);
}
else
{
Debug.LogError((object)"TextMeshProUGUI component not found on this GameObject!", (Object)(object)this);
((Behaviour)this).enabled = false;
}
cameraMain = Camera.main;
}
public override void Update()
{
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0232: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
//IL_027a: Unknown result type (might be due to invalid IL or missing references)
//IL_0290: Unknown result type (might be due to invalid IL or missing references)
//IL_0295: Unknown result type (might be due to invalid IL or missing references)
//IL_029f: Unknown result type (might be due to invalid IL or missing references)
//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
//IL_0252: Unknown result type (might be due to invalid IL or missing references)
//IL_025d: Unknown result type (might be due to invalid IL or missing references)
//IL_026d: Unknown result type (might be due to invalid IL or missing references)
//IL_0272: Unknown result type (might be due to invalid IL or missing references)
//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01da: Unknown result type (might be due to invalid IL or missing references)
//IL_01df: Unknown result type (might be due to invalid IL or missing references)
((WorldSpaceUIChild)this).Update();
if (alphaCheckTimer <= 0f)
{
textAlphaTarget = 1f;
alphaCheckTimer = 0.1f;
if (!Object.op_Implicit((Object)(object)SpectateCamera.instance) || SpectateCamera.instance.CheckState((State)1))
{
float num = 5f;
float num2 = 20f;
float num3 = Vector3.Distance(((Component)cameraMain).transform.position, base.worldPosition);
if (num3 > num)
{
num3 = Mathf.Clamp(num3, num, num2);
textAlphaTarget = 1f - (num3 - num) / (num2 - num);
}
if (Object.op_Implicit((Object)(object)ttsVoice))
{
textAlphaTarget *= 0.5f;
}
}
}
else
{
alphaCheckTimer -= Time.deltaTime;
}
if (!Object.op_Implicit((Object)(object)followTransform) || !Object.op_Implicit((Object)(object)ttsVoice) || !ttsVoice.audioSource.isPlaying)
{
textAlphaTarget = 0f;
if (textAlpha < 0.01f)
{
Object.Destroy((Object)(object)((Component)this).gameObject);
return;
}
}
textAlpha = Mathf.Lerp(textAlpha, textAlphaTarget, 30f * Time.deltaTime);
if (!flashDone)
{
flashTimer -= Time.deltaTime;
if (flashTimer <= 0f)
{
if (textColor != textColorTarget)
{
textColor = Color.Lerp(textColor, textColorTarget, 20f * Time.deltaTime);
}
else
{
flashDone = true;
}
}
}
if ((Object)(object)text != (Object)null)
{
((Graphic)text).color = new Color(textColor.r, textColor.g, textColor.b, textAlpha);
}
if (Object.op_Implicit((Object)(object)followTransform))
{
followPosition = Vector3.Lerp(followPosition, followTransform.position, 10f * Time.deltaTime);
}
base.worldPosition = followPosition + curveIntro.Evaluate(curveLerp) * Vector3.up * 0.025f;
curveLerp += Time.deltaTime * 4f;
curveLerp = Mathf.Clamp01(curveLerp);
if (Object.op_Implicit((Object)(object)ttsVoice) && ttsVoice.currentWordTime != wordTime)
{
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
}
}
namespace EnemyTTS.Patches
{
[HarmonyPatch]
internal class EnemyPatch
{
[HarmonyPatch(typeof(Enemy), "Awake")]
[HarmonyPostfix]
public static void Postfix(Enemy __instance)
{
((Component)__instance).gameObject.AddComponent<EnemyTTSController>();
}
[HarmonyPatch(typeof(TTSVoice), "Update")]
[HarmonyPrefix]
public static bool TTSVoiceUpdatePrefix(TTSVoice __instance)
{
if ((Object)(object)__instance.playerAvatar == (Object)null)
{
return false;
}
return true;
}
[HarmonyPatch(typeof(TTSVoice), "VoiceText")]
[HarmonyPrefix]
public static bool TTSVoiceVoiceTextPrefix(TTSVoice __instance, string text, float wordTime)
{
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)__instance.playerAvatar != (Object)null)
{
return true;
}
if ((Object)(object)WorldSpaceUIParent.instance == (Object)null)
{
return true;
}
GameObject val = Object.Instantiate<GameObject>(WorldSpaceUIParent.instance.TTSPrefab, ((Component)WorldSpaceUIParent.instance).transform.position, ((Component)WorldSpaceUIParent.instance).transform.rotation, ((Component)WorldSpaceUIParent.instance).transform);
WorldSpaceUITTS component = val.GetComponent<WorldSpaceUITTS>();
AnimationCurve curveIntro = component.curveIntro;
Object.DestroyImmediate((Object)(object)component);
WorldSpaceUITTSEnemy worldSpaceUITTSEnemy = val.AddComponent<WorldSpaceUITTSEnemy>();
Transform parent = ((Component)__instance).transform.parent;
worldSpaceUITTSEnemy.curveIntro = curveIntro;
((TMP_Text)worldSpaceUITTSEnemy.text).text = text;
worldSpaceUITTSEnemy.followTransform = parent;
((WorldSpaceUIChild)worldSpaceUITTSEnemy).worldPosition = parent.position;
worldSpaceUITTSEnemy.followPosition = ((WorldSpaceUIChild)worldSpaceUITTSEnemy).worldPosition;
worldSpaceUITTSEnemy.wordTime = wordTime;
worldSpaceUITTSEnemy.ttsVoice = __instance;
__instance.voiceText = text;
__instance.currentWordTime = wordTime;
return false;
}
}
}
namespace EnemyTTS.TTS
{
public class EnemyTTS : MonoBehaviour
{
public EnemyTTSController enemyTTSController;
public bool CanSpeak(EnemyTTSController.SpeakWeight weight)
{
return enemyTTSController.CanSpeak(weight);
}
public void TrySpeak(string text)
{
enemyTTSController.Speak(text);
}
}
public class EnemyTTSBeamer : EnemyTTS
{
private EnemyBeamer enemyBeamer;
private State lastState;
private StateMessageHandler<State> stateMessageHandler = new StateMessageHandler<State>();
private Dictionary<State, EnemyTTSController.SpeakWeight> weights = new Dictionary<State, EnemyTTSController.SpeakWeight>
{
{
(State)7,
EnemyTTSController.SpeakWeight.High
},
{
(State)3,
EnemyTTSController.SpeakWeight.Medium
},
{
(State)4,
EnemyTTSController.SpeakWeight.High
}
};
private void Start()
{
enemyBeamer = ((Component)this).GetComponent<EnemyBeamer>();
stateMessageHandler.AddMessages((State)7, new List<string> { "Take this foot in your face", "Smell my foot dumbass", "I kick you now bitch", "HIYYAAAAA", "OOOOAAAAAA" });
stateMessageHandler.AddMessages((State)3, new List<string> { "My feet heard something", "Ugh my feet are so big", "I fucking hate skibidi toilet", "Come out come out wherever you are", "Show yourself and I will let you suck my feet" });
stateMessageHandler.AddMessages((State)4, new List<string> { "I am about to bust", "I am coming all over the place", "Oh shit here it comes", "My balls cannot contain it anymore", "That's it I am busting all over", "I fire laser NOW!", "Laser go yahurrrrrrrr" });
}
private void Update()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
if (enemyBeamer.currentState == lastState)
{
return;
}
lastState = enemyBeamer.currentState;
if (weights.TryGetValue(enemyBeamer.currentState, out var value) && CanSpeak(value))
{
string randomMessage = stateMessageHandler.GetRandomMessage(enemyBeamer.currentState);
if (!string.IsNullOrEmpty(randomMessage))
{
TrySpeak(randomMessage);
}
}
}
}
public class EnemyTTSController : MonoBehaviour
{
public enum SpeakWeight
{
Low = 30,
Medium = 15,
High = 5
}
private TTSVoice ttsVoice;
private float timeSinceLastSpeak = 0f;
private EnemyTTS enemyTTS;
private void Start()
{
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
Object obj = Resources.Load("TTS");
GameObject val = (GameObject)(object)((obj is GameObject) ? obj : null);
GameObject val2 = Object.Instantiate<GameObject>(val);
val2.transform.SetParent(((Component)this).transform, false);
val2.transform.localPosition = new Vector3(0f, 0f, 0f);
ttsVoice = val2.GetComponent<TTSVoice>();
ttsVoice.voices = ((Component)ttsVoice).gameObject.GetComponentsInChildren<Speech>();
ttsVoice.voices[0].msPerSpeechFrame = 8;
ttsVoice.voices[0].Awake();
InitializeEnemyType();
}
private void InitializeEnemyType()
{
if (Object.op_Implicit((Object)(object)((Component)this).GetComponent<EnemyHunter>()))
{
enemyTTS = ((Component)this).gameObject.AddComponent<EnemyTTSHunter>();
}
else if (Object.op_Implicit((Object)(object)((Component)this).GetComponent<EnemyDuck>()))
{
enemyTTS = ((Component)this).gameObject.AddComponent<EnemyTTSDuck>();
}
else if (Object.op_Implicit((Object)(object)((Component)this).GetComponent<EnemyFloater>()))
{
enemyTTS = ((Component)this).gameObject.AddComponent<EnemyTTSMentalist>();
}
else if (Object.op_Implicit((Object)(object)((Component)this).GetComponent<EnemyRobe>()))
{
enemyTTS = ((Component)this).gameObject.AddComponent<EnemyTTSRobe>();
}
else if (Object.op_Implicit((Object)(object)((Component)this).GetComponent<EnemyBeamer>()))
{
enemyTTS = ((Component)this).gameObject.AddComponent<EnemyTTSBeamer>();
}
if (Object.op_Implicit((Object)(object)enemyTTS))
{
enemyTTS.enemyTTSController = this;
}
}
private void Update()
{
timeSinceLastSpeak += Time.deltaTime;
}
public bool CanSpeak(SpeakWeight weight)
{
if (timeSinceLastSpeak < 5f)
{
return false;
}
float num = Mathf.Clamp01(timeSinceLastSpeak / (float)weight);
if (Random.Range(0f, 1f) > num)
{
return false;
}
return true;
}
public void Speak(string text)
{
timeSinceLastSpeak = 0f;
if (Object.op_Implicit((Object)(object)ttsVoice))
{
ttsVoice.StartSpeakingWithHighlight(text, false);
}
}
}
public class EnemyTTSDuck : EnemyTTS
{
private EnemyDuck enemyDuck;
private State lastState;
private StateMessageHandler<State> stateMessageHandler = new StateMessageHandler<State>();
private Dictionary<State, EnemyTTSController.SpeakWeight> weights = new Dictionary<State, EnemyTTSController.SpeakWeight>
{
{
(State)4,
EnemyTTSController.SpeakWeight.Medium
},
{
(State)6,
EnemyTTSController.SpeakWeight.Medium
},
{
(State)11,
EnemyTTSController.SpeakWeight.High
},
{
(State)17,
EnemyTTSController.SpeakWeight.High
}
};
private void Start()
{
enemyDuck = ((Component)this).GetComponent<EnemyDuck>();
stateMessageHandler.AddMessages((State)4, new List<string>
{
"I see you sexy boy", "I love you bitch", "Howdy partner", "I am gonna follow you", "Are you my mom?", "Are you my dad?", "Who gave you permission to be that fine", "Hey bestie I see you", "Is that a vibe check or are you just happy to see me", "You remind me of bread and I love bread",
"You looking like my next emotional support human", "Quack if you are sexy", "Are you my soulmate or my delusion"
});
stateMessageHandler.AddMessages((State)17, new List<string>
{
"Fuck you I am leaving", "You are boring", "You kiss your mother with that face?", "I never liked you", "You are giving me ick vibes", "This relationship is over", "You just lost duck privileges", "I am emotionally unavailable now", "You flopped harder than my last date", "You are not duck enough for me",
"No more quack for you", "I hope your pillow is warm on both sides", "You are mid at best", "I am gonna go cry in a pond now"
});
stateMessageHandler.AddMessages((State)6, new List<string> { "Touch me please", "Fondle me please", "Hey hey", "Look at me", "Skibidi toilet", "Hey sigma", "Lol", "Got any grapes?" });
stateMessageHandler.AddMessages((State)11, new List<string> { "How fucking dare you touch me", "You touched the wrong duck", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Quack quack motherfucker", "I bite now", "I am no longer baby I want blood", "You made me angry and moist", "Say goodbye to your kneecaps" });
}
private void Update()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
if (enemyDuck.currentState == lastState)
{
return;
}
lastState = enemyDuck.currentState;
if (weights.TryGetValue(enemyDuck.currentState, out var value) && CanSpeak(value))
{
string randomMessage = stateMessageHandler.GetRandomMessage(enemyDuck.currentState);
if (!string.IsNullOrEmpty(randomMessage))
{
TrySpeak(randomMessage);
}
}
}
}
public class EnemyTTSHunter : EnemyTTS
{
private EnemyHunter enemyHunter;
private State lastState;
private StateMessageHandler<State> stateMessageHandler = new StateMessageHandler<State>();
private Dictionary<State, EnemyTTSController.SpeakWeight> weights = new Dictionary<State, EnemyTTSController.SpeakWeight>
{
{
(State)2,
EnemyTTSController.SpeakWeight.Low
},
{
(State)4,
EnemyTTSController.SpeakWeight.Medium
},
{
(State)5,
EnemyTTSController.SpeakWeight.High
},
{
(State)9,
EnemyTTSController.SpeakWeight.Medium
},
{
(State)11,
EnemyTTSController.SpeakWeight.High
}
};
private void Start()
{
enemyHunter = ((Component)this).GetComponent<EnemyHunter>();
stateMessageHandler.AddMessages((State)2, new List<string>
{
"I am definitely blind", "All I see is darkness", "My knees hurt", "Why is life so miserable", "I wanna shoot something", "I have not slept in fourteen years", "I hate trees", "I stubbed my toe and now I want revenge", "My therapist says I need a new hobby", "These boots are filled with regrets",
"Happiness is a lie made by the government", "Every step I take is fueled by spite", "Listen to this [][][[]]"
});
stateMessageHandler.AddMessages((State)4, new List<string>
{
"Was that the wind?", "What was that?", "Marko?", "Wanna play marko polo?", "I smell you bitch", "I heard something and I hated it", "Was that you or my demons", "I swear to god if that is another raccoon", "I smell blood or maybe hotdogs", "You are breathing too loud stop it",
"I am getting war flashbacks again", "If this is a prank I will cry", "Come out please"
});
stateMessageHandler.AddMessages((State)5, new List<string> { "Fuck you!", "Die!", "Cunt!", "Bitch!", "Asshole!" });
stateMessageHandler.AddMessages((State)9, new List<string> { "Must have been the wind", "Never mind I guess", "It was nothing", "Great nothing again just like my childhood", "I am mad and confused", "I guess I hallucinated again", "Back to wandering and self-loathing", "Nothing here just like my love life", "Everything is pain and also kind of boring" });
stateMessageHandler.AddMessages((State)11, new List<string> { "AAAAAAAAAAAAAAAAAAAAAAAAAA", "WHAT THE FUCK", "OUCH" });
}
private void Update()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
if (enemyHunter.currentState == lastState)
{
return;
}
lastState = enemyHunter.currentState;
if (CanSpeak(weights[enemyHunter.currentState]))
{
string randomMessage = stateMessageHandler.GetRandomMessage(enemyHunter.currentState);
if (!string.IsNullOrEmpty(randomMessage))
{
TrySpeak(randomMessage);
}
}
}
}
public class EnemyTTSMentalist : EnemyTTS
{
private EnemyFloater enemyMentalist;
private State lastState;
private StateMessageHandler<State> stateMessageHandler = new StateMessageHandler<State>();
private Dictionary<State, EnemyTTSController.SpeakWeight> weights = new Dictionary<State, EnemyTTSController.SpeakWeight>
{
{
(State)2,
EnemyTTSController.SpeakWeight.Low
},
{
(State)4,
EnemyTTSController.SpeakWeight.Medium
},
{
(State)7,
EnemyTTSController.SpeakWeight.High
},
{
(State)11,
EnemyTTSController.SpeakWeight.Medium
}
};
private void Start()
{
enemyMentalist = ((Component)this).GetComponent<EnemyFloater>();
stateMessageHandler.AddMessages((State)2, new List<string>
{
"Sometimes I think and then I forget", "Is meditating really worth it?", "What would Buddha say?", "I am floating lol", "I forgot what I was doing... again", "Did you know I can hear colors?", "I am not lost, I am exploring my aura", "Is this real life... or just fantasy?", "My chakras are buffering.", "I float, therefore I am.",
"I once meditated for 3 minutes and now I am enlightened", "I think I achieved inner peace... or sleep paralysis", "Floating is just walking without commitment"
});
stateMessageHandler.AddMessages((State)4, new List<string> { "Wanna medidate with me?", "Let me give you uppies", "Let me show you my magic", "Your energy is... crunchy", "You fucked my vibe", "I sense resistance in your aura", "You have no aura. Let me help", "Do you even transcend, bro?", "Please stop thinking so loud", "I noticed you noticing me. That's hot" });
stateMessageHandler.AddMessages((State)7, new List<string>
{
"It is time to fly", "I am giving you uppies", "Do you like this?", "We are meditating", "AAAAAAAAAAAAAAAAAAAAA", "Initiating enlightenment beam", "Prepare to be gently obliterated", "Your karma is due, buddy", "Screaming is part of the ritual!", "This is how I manifest violence",
"We float together. We scream together", "Behold, the power of three missed yoga classes!", "This is not very zen of me!"
});
stateMessageHandler.AddMessages((State)11, new List<string>
{
"I am floating away", "I am going to go meditate", "Wewo I fly away now", "I am ascending... again", "Peace out, earthly bean", "I must return to the astral group chat", "Goodbye, or as we say, ommmm", "My people need me. I think", "I leave you with confusing wisdom", "Back to the void I go",
"I have no legs, yet I must leave", "Tell my crystals I love them"
});
}
private void Update()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
if (enemyMentalist.currentState == lastState)
{
return;
}
lastState = enemyMentalist.currentState;
if (weights.TryGetValue(enemyMentalist.currentState, out var value) && CanSpeak(value))
{
string randomMessage = stateMessageHandler.GetRandomMessage(enemyMentalist.currentState);
if (!string.IsNullOrEmpty(randomMessage))
{
TrySpeak(randomMessage);
}
}
}
}
public class EnemyTTSRobe : EnemyTTS
{
private EnemyRobe enemyRobe;
private State lastState;
private StateMessageHandler<State> stateMessageHandler = new StateMessageHandler<State>();
private Dictionary<State, EnemyTTSController.SpeakWeight> weights = new Dictionary<State, EnemyTTSController.SpeakWeight>
{
{
(State)8,
EnemyTTSController.SpeakWeight.High
},
{
(State)5,
EnemyTTSController.SpeakWeight.High
},
{
(State)10,
EnemyTTSController.SpeakWeight.High
}
};
private void Start()
{
enemyRobe = ((Component)this).GetComponent<EnemyRobe>();
stateMessageHandler.AddMessages((State)5, new List<string> { "I see you cunt", "You can not hide from me", "Come out you coward", "I can smell you", "You forgot to cover your sins", "I found your little hiding spot", "You thought you were slick huh", "Peekaboo motherfucker" });
stateMessageHandler.AddMessages((State)8, new List<string> { "Okay whatever dude...", "I guess you are not under there", "I am not looking under there again", "Fine keep your secrets", "Lame hiding spot anyway", "You are lucky I have ADHD", "I lost interest immediately", "Bored now", "Next time I bring a flashlight" });
stateMessageHandler.AddMessages((State)10, new List<string> { "Come here you fucking bitch", "You can not escape me", "I am gonna eat you", "Bombardino crocodilo can not save you now", "Stop running you fucker", "Your last mistake was existing near me", "AAAAAAAAAAAAAA FUCKER", "BITCH ASS COME" });
}
private void Update()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
if (enemyRobe.currentState == lastState)
{
return;
}
lastState = enemyRobe.currentState;
if (weights.TryGetValue(enemyRobe.currentState, out var value) && CanSpeak(value))
{
string randomMessage = stateMessageHandler.GetRandomMessage(enemyRobe.currentState);
if (!string.IsNullOrEmpty(randomMessage))
{
TrySpeak(randomMessage);
}
}
}
}
}