Decompiled source of CrowdControl REPO v1.0.14
BepInEx/plugins/CrowdControl.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using BepinControl.Effects; using HarmonyLib; using Microsoft.CodeAnalysis; using MyBox; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Photon.Pun; using Photon.Realtime; using REPOLib.Modules; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("LethalCompanyCrowdControlMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LethalCompanyCrowdControlMod")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("d4f6b961-e8ae-4e4b-950c-37644e42d4ca")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } } namespace BepinControl { public class EffectUpdateModern { public enum Status { STATUS_VISIBLE = 128, STATUS_NOTVISIBLE, STATUS_SELECTABLE, STATUS_NOTSELECTABLE } public readonly string idType = "effect"; public string[]? ids; public int status; public readonly int type = 1; public EffectUpdateModern(Status status, params string[] ids) { this.status = (int)status; this.ids = ids; } public void Send(Socket socket) { byte[] bytes = Encoding.ASCII.GetBytes(JsonConvert.SerializeObject((object)this)); byte[] array = new byte[bytes.Length + 1]; Buffer.BlockCopy(bytes, 0, array, 0, bytes.Length); array[bytes.Length] = 0; socket.Send(array); } } public class HelperUtils { public static async Task<PlayerHealth> FindPlayerHealthByAvatarNumber(int targetActor) { TaskCompletionSource<PlayerHealth> tcs = new TaskCompletionSource<PlayerHealth>(TaskCreationOptions.RunContinuationsAsynchronously); await Task.Yield(); CrowdControlMod.ActionQueue.Enqueue(delegate { try { PlayerHealth[] array = Object.FindObjectsOfType<PlayerHealth>(); List<PlayerHealth> list = new List<PlayerHealth>(); if (array == null) { tcs.TrySetResult(null); } else { PlayerHealth[] array2 = array; foreach (PlayerHealth val in array2) { PhotonView component = ((Component)val).GetComponent<PhotonView>(); if ((Object)(object)component != (Object)null && component.Owner.ActorNumber == targetActor) { list.Add(val); } } tcs.TrySetResult(list.FirstOrDefault()); } } catch (Exception ex) { CrowdControlMod.mls.LogError((object)("Error in FindPlayerHealthByAvatarNumber: " + ex.Message)); tcs.TrySetResult(null); } }); return await tcs.Task; } public static async Task<PlayerDeathHead> FindPlayerDeathHeadByAvatarNumber(int targetActor) { TaskCompletionSource<PlayerDeathHead> tcs = new TaskCompletionSource<PlayerDeathHead>(TaskCreationOptions.RunContinuationsAsynchronously); await Task.Yield(); CrowdControlMod.ActionQueue.Enqueue(delegate { try { PlayerDeathHead[] array = Object.FindObjectsOfType<PlayerDeathHead>(); List<PlayerDeathHead> list = new List<PlayerDeathHead>(); if (array == null) { tcs.TrySetResult(null); } else { PlayerDeathHead[] array2 = array; foreach (PlayerDeathHead val in array2) { PhotonView component = ((Component)val).GetComponent<PhotonView>(); if ((Object)(object)component != (Object)null && component.Owner.ActorNumber == targetActor) { list.Add(val); } } tcs.TrySetResult(list.FirstOrDefault()); } } catch (Exception ex) { CrowdControlMod.mls.LogError((object)("Error in FindPlayerDeathHeadByAvatarNumber: " + ex.Message)); tcs.TrySetResult(null); } }); return await tcs.Task; } public static async Task<PlayerAvatar> FindPlayerAvatarByNumber(int actorNumber, bool alive = true, bool random = false) { TaskCompletionSource<PlayerAvatar> tcs = new TaskCompletionSource<PlayerAvatar>(TaskCreationOptions.RunContinuationsAsynchronously); await Task.Yield(); CrowdControlMod.ActionQueue.Enqueue(delegate { try { List<PlayerAvatar> list = new List<PlayerAvatar>(); foreach (PlayerAvatar player in GameDirector.instance.PlayerList) { PhotonView component = ((Component)player).GetComponent<PhotonView>(); if (!((Object)(object)component == (Object)null)) { FieldInfo field = typeof(PlayerAvatar).GetField("isDisabled", BindingFlags.Instance | BindingFlags.NonPublic); if (!(field != null && (bool)field.GetValue(player) && alive)) { if (random) { if (component.Owner.ActorNumber != actorNumber) { list.Add(player); } } else if (component.Owner.ActorNumber == actorNumber) { tcs.TrySetResult(player); return; } } } } if (random && list.Count > 0) { int index = Random.Range(0, list.Count); PlayerAvatar result = list[index]; tcs.TrySetResult(result); } else { tcs.TrySetResult(null); } } catch (Exception ex) { CrowdControlMod.mls.LogError((object)("Error in FindPlayerAvatarByNumber: " + ex.Message)); tcs.TrySetResult(null); } }); return await tcs.Task; } public static async Task<PlayerAvatar> FindRandomAvatar(int actorNumber) { TaskCompletionSource<PlayerAvatar> tcs = new TaskCompletionSource<PlayerAvatar>(TaskCreationOptions.RunContinuationsAsynchronously); await Task.Yield(); CrowdControlMod.ActionQueue.Enqueue(delegate { try { List<PlayerAvatar> list = new List<PlayerAvatar>(); foreach (PlayerAvatar player in GameDirector.instance.PlayerList) { PhotonView component = ((Component)player).GetComponent<PhotonView>(); if (!((Object)(object)component == (Object)null) && component.Owner.ActorNumber != actorNumber) { list.Add(player); } } if (list.Count > 0) { int index = Random.Range(0, list.Count); PlayerAvatar result = list[index]; tcs.TrySetResult(result); } else { tcs.TrySetResult(null); } } catch (Exception ex) { CrowdControlMod.mls.LogError((object)("Error in FindRandomAvatar: " + ex.Message)); tcs.TrySetResult(null); } }); return await tcs.Task; } public static async Task<ExtractionPoint> FindRandomExtractionPoint() { TaskCompletionSource<ExtractionPoint> tcs = new TaskCompletionSource<ExtractionPoint>(TaskCreationOptions.RunContinuationsAsynchronously); await Task.Yield(); CrowdControlMod.ActionQueue.Enqueue(delegate { try { ExtractionPoint[] source = Object.FindObjectsOfType<ExtractionPoint>(); FieldInfo stateField = typeof(ExtractionPoint).GetField("currentState", BindingFlags.Instance | BindingFlags.NonPublic); if (stateField == null) { CrowdControlMod.mls.LogError((object)"FindRandomExtractionPoint: Could not find 'currentState' field."); tcs.TrySetResult(null); } else { ExtractionPoint[] array = source.Where(delegate(ExtractionPoint point) { object value = stateField.GetValue(point); return value != null && (value.Equals((object)(State)2) || value.Equals((object)(State)7)); }).ToArray(); if (array.Length != 0) { int num = Random.Range(0, array.Length); ExtractionPoint result = array[num]; tcs.TrySetResult(result); } else { tcs.TrySetResult(null); } } } catch (Exception ex) { CrowdControlMod.mls.LogError((object)("Error in FindRandomExtractionPoint: " + ex.Message)); tcs.TrySetResult(null); } }); return await tcs.Task; } } public class StatusEffect { public string Name { get; private set; } public float Duration { get; private set; } public float RemainingTime { get; set; } public GameObject UIElement { get; set; } public StatusEffect(string name, float duration) { Name = name; Duration = duration; RemainingTime = duration; } } public class StatusEffectUI { private GameObject uiObject; private TextMeshProUGUI nameText; private TextMeshProUGUI durationText; private Image timerCircle; private float duration; private float startTime; private bool isActive = true; public StatusEffectUI(GameObject uiObject, string effectName, float duration) { this.uiObject = uiObject; this.duration = duration; startTime = Time.time; Transform obj = uiObject.transform.Find("EffectName"); nameText = ((obj != null) ? ((Component)obj).GetComponent<TextMeshProUGUI>() : null); Transform obj2 = uiObject.transform.Find("DurationText"); durationText = ((obj2 != null) ? ((Component)obj2).GetComponent<TextMeshProUGUI>() : null); Transform obj3 = uiObject.transform.Find("TimerCircle"); timerCircle = ((obj3 != null) ? ((Component)obj3).GetComponent<Image>() : null); if (!((Object)(object)nameText == (Object)null) && !((Object)(object)timerCircle == (Object)null) && !((Object)(object)durationText == (Object)null)) { Initialize(effectName); } } public void Initialize(string effectName) { ((TMP_Text)nameText).text = effectName; UpdateDurationText(duration); if ((Object)(object)timerCircle != (Object)null) { timerCircle.type = (Type)3; timerCircle.fillMethod = (FillMethod)4; timerCircle.fillOrigin = 2; timerCircle.fillClockwise = false; timerCircle.fillAmount = 1f; Canvas.ForceUpdateCanvases(); } } private void UpdateDurationText(float remainingTime) { if ((Object)(object)durationText != (Object)null) { ((TMP_Text)durationText).text = remainingTime.ToString("F1") + "s"; } } public void UpdateTimer() { if (isActive && !((Object)(object)timerCircle == (Object)null)) { float num = Time.time - startTime; float num2 = duration - num; if (num2 <= 0f) { isActive = false; Object.Destroy((Object)(object)uiObject); return; } float fillAmount = Mathf.Clamp01(num2 / duration); UpdateDurationText(num2); timerCircle.fillAmount = fillAmount; ((Graphic)timerCircle).SetAllDirty(); LayoutRebuilder.ForceRebuildLayoutImmediate(((Graphic)timerCircle).rectTransform); Canvas.ForceUpdateCanvases(); } } public bool IsActive() { return isActive; } public void Destroy() { if ((Object)(object)uiObject != (Object)null) { Object.Destroy((Object)(object)uiObject); } isActive = false; } } public class StatusEffectUIComponent : MonoBehaviour { private StatusEffectUI ui; public void Initialize(string effectName, float duration) { ui = new StatusEffectUI(((Component)this).gameObject, effectName, duration); } private void Update() { if (ui != null) { ui.UpdateTimer(); } } private void OnDestroy() { ui?.Destroy(); } } public class StatusEffectSystem : MonoBehaviour { private static StatusEffectSystem _instance; private List<StatusEffect> activeEffects = new List<StatusEffect>(); private GameObject effectPrefab; private RectTransform container; private bool isAnchored; private const string ENERGY_OBJECT_NAME = "Energy"; public static StatusEffectSystem Instance { get { if ((Object)(object)_instance == (Object)null) { GameObject val = GameObject.Find("StatusEffectSystem"); if ((Object)(object)val != (Object)null) { _instance = val.GetComponent<StatusEffectSystem>(); } else { CreateInstance(); } } return _instance; } } private static void CreateInstance() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) _instance = new GameObject("StatusEffectSystem").AddComponent<StatusEffectSystem>(); _instance.Initialize(); } private void Initialize() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown GameObject val = new GameObject("StatusEffectCanvas"); val.transform.SetParent(((Component)this).transform); Canvas obj = val.AddComponent<Canvas>(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 100; val.AddComponent<CanvasScaler>(); val.AddComponent<GraphicRaycaster>(); GameObject val2 = new GameObject("EffectsContainer"); val2.transform.SetParent(val.transform, false); container = val2.AddComponent<RectTransform>(); container.anchorMin = new Vector2(0f, 1f); container.anchorMax = new Vector2(0f, 1f); container.pivot = new Vector2(0.5f, 1f); container.anchoredPosition = new Vector2(-5000f, -5000f); container.sizeDelta = new Vector2(250f, 500f); VerticalLayoutGroup obj2 = val2.AddComponent<VerticalLayoutGroup>(); ((HorizontalOrVerticalLayoutGroup)obj2).spacing = 0f; ((LayoutGroup)obj2).childAlignment = (TextAnchor)0; ((HorizontalOrVerticalLayoutGroup)obj2).childControlHeight = true; ((HorizontalOrVerticalLayoutGroup)obj2).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)obj2).childForceExpandHeight = false; ((HorizontalOrVerticalLayoutGroup)obj2).childForceExpandWidth = false; ((LayoutGroup)obj2).padding = new RectOffset(5, 5, 0, 0); CreateEffectPrefab(); } private void CreateEffectPrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) effectPrefab = new GameObject("StatusEffectUI"); effectPrefab.AddComponent<RectTransform>().sizeDelta = new Vector2(240f, 30f); LayoutElement obj = effectPrefab.AddComponent<LayoutElement>(); obj.minHeight = 30f; obj.minWidth = 240f; obj.preferredHeight = 30f; obj.preferredWidth = 240f; obj.flexibleWidth = 0f; obj.flexibleHeight = 0f; GameObject val = new GameObject("TimerCircle"); val.transform.SetParent(effectPrefab.transform, false); RectTransform obj2 = val.AddComponent<RectTransform>(); obj2.sizeDelta = new Vector2(16f, 16f); obj2.anchoredPosition = new Vector2(45f, 0f); Image val2 = val.AddComponent<Image>(); Texture2D val3 = new Texture2D(32, 32); Vector2 val4 = default(Vector2); ((Vector2)(ref val4))..ctor(16f, 16f); float num = 15.5f; for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { float num2 = ((Vector2.Distance(new Vector2((float)j, (float)i), val4) <= num) ? 1f : 0f); val3.SetPixel(j, i, new Color(1f, 1f, 1f, num2)); } } val3.Apply(); Sprite sprite = Sprite.Create(val3, new Rect(0f, 0f, 32f, 32f), new Vector2(0.5f, 0.5f)); val2.sprite = sprite; val2.type = (Type)3; val2.fillMethod = (FillMethod)4; val2.fillOrigin = 2; val2.fillClockwise = false; val2.fillAmount = 1f; ((Graphic)val2).color = new Color(0.2f, 1f, 0.2f, 0.9f); ((Graphic)val2).raycastTarget = false; Outline val5 = val.AddComponent<Outline>(); ((Shadow)val5).effectColor = new Color(0f, 1f, 0.2f, 0.6f); ((Shadow)val5).effectDistance = new Vector2(1f, 1f); ((Shadow)val5).useGraphicAlpha = true; Outline val6 = val.AddComponent<Outline>(); ((Shadow)val6).effectColor = new Color(0.2f, 1f, 0.2f, 0.3f); ((Shadow)val6).effectDistance = new Vector2(2f, 2f); ((Shadow)val6).useGraphicAlpha = true; GameObject val7 = new GameObject("EffectName"); val7.transform.SetParent(effectPrefab.transform, false); RectTransform val8 = val7.AddComponent<RectTransform>(); val8.sizeDelta = new Vector2(180f, 30f); val8.anchoredPosition = new Vector2(80f, 0f); GameObject val9 = new GameObject("Text"); val9.transform.SetParent((Transform)(object)val8, false); RectTransform obj3 = val9.AddComponent<RectTransform>(); obj3.sizeDelta = new Vector2(180f, 30f); obj3.anchoredPosition = Vector2.zero; TextMeshProUGUI val10 = val9.AddComponent<TextMeshProUGUI>(); ((TMP_Text)val10).alignment = (TextAlignmentOptions)513; ((TMP_Text)val10).margin = new Vector4(70f, 0f, 0f, 0f); ((TMP_Text)val10).fontSize = 16f; GameObject val11 = GameObject.Find("Health"); if ((Object)(object)val11 != (Object)null) { Transform obj4 = val11.transform.Find("HealthMax"); TextMeshProUGUI val12 = ((obj4 != null) ? ((Component)obj4).GetComponent<TextMeshProUGUI>() : null); if ((Object)(object)val12 != (Object)null) { ((TMP_Text)val10).font = ((TMP_Text)val12).font; ((Graphic)val10).color = ((Graphic)val12).color; ((Graphic)val2).color = ((Graphic)val12).color; if ((Object)(object)val5 != (Object)null) { Color color = ((Graphic)val12).color; color.a = 0.6f; ((Shadow)val5).effectColor = color; } if ((Object)(object)val6 != (Object)null) { Color color2 = ((Graphic)val12).color; color2.a = 0.3f; ((Shadow)val6).effectColor = color2; } } } ((TMP_Text)val10).enableVertexGradient = false; Outline obj5 = val9.AddComponent<Outline>(); ((Shadow)obj5).effectColor = new Color(((Graphic)val10).color.r, ((Graphic)val10).color.g, ((Graphic)val10).color.b, 0.4f); ((Shadow)obj5).effectDistance = new Vector2(1f, 1f); ((Shadow)obj5).useGraphicAlpha = true; effectPrefab.AddComponent<StatusEffectUIComponent>(); effectPrefab.SetActive(false); Object.DontDestroyOnLoad((Object)(object)effectPrefab); } public void AddEffect(string name, float duration) { isAnchored = false; StatusEffect statusEffect = new StatusEffect(name, duration); GameObject val = Object.Instantiate<GameObject>(effectPrefab, (Transform)(object)container); val.SetActive(true); statusEffect.UIElement = val; val.GetComponent<StatusEffectUIComponent>().Initialize(name, duration); TextMeshProUGUI componentInChildren = val.GetComponentInChildren<TextMeshProUGUI>(); if ((Object)(object)componentInChildren != (Object)null) { ((TMP_Text)componentInChildren).text = name; } activeEffects.Add(statusEffect); } public void RemoveEffect(StatusEffect effect) { if (activeEffects.Contains(effect)) { activeEffects.Remove(effect); if ((Object)(object)effect.UIElement != (Object)null) { Object.Destroy((Object)(object)effect.UIElement); } } } public void ClearAllEffects() { foreach (StatusEffect item in new List<StatusEffect>(activeEffects)) { RemoveEffect(item); } activeEffects.Clear(); } private void Update() { if (!isAnchored) { TryAnchorToEnergyUI(); } } private GameObject FindActiveEnergyObject() { Transform[] array = Object.FindObjectsOfType<Transform>(true); List<GameObject> list = new List<GameObject>(); Transform[] array2 = array; foreach (Transform val in array2) { if (((Object)((Component)val).gameObject).name == "Energy") { list.Add(((Component)val).gameObject); } } foreach (GameObject item in list) { if (item.activeInHierarchy) { return item; } } return null; } private void TryAnchorToEnergyUI() { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) GameObject val = FindActiveEnergyObject(); if ((Object)(object)val == (Object)null || !((Object)(object)val != (Object)null)) { return; } RectTransform component = val.GetComponent<RectTransform>(); if (!((Object)(object)component != (Object)null)) { return; } Transform obj = val.transform.Find("HealthMax"); TextMeshProUGUI val2 = ((obj != null) ? ((Component)obj).GetComponent<TextMeshProUGUI>() : null); if ((Object)(object)val2 != (Object)null) { TextMeshProUGUI[] componentsInChildren = ((Component)container).GetComponentsInChildren<TextMeshProUGUI>(true); foreach (TextMeshProUGUI obj2 in componentsInChildren) { ((TMP_Text)obj2).font = ((TMP_Text)val2).font; ((Graphic)obj2).color = ((Graphic)val2).color; ((TMP_Text)obj2).enableVertexGradient = false; } Image[] componentsInChildren2 = ((Component)container).GetComponentsInChildren<Image>(true); foreach (Image val3 in componentsInChildren2) { if (((Object)val3).name == "TimerCircle") { ((Graphic)val3).color = ((Graphic)val2).color; } } } ((Component)container).transform.SetParent(((Transform)component).parent, false); Vector2 anchoredPosition = component.anchoredPosition; ref float x = ref anchoredPosition.x; float num = x; Rect rect = component.rect; float num2 = ((Rect)(ref rect)).width * 0.5f; rect = container.rect; x = num + (num2 - ((Rect)(ref rect)).width * 0.5f + 10f); ref float y = ref anchoredPosition.y; float num3 = y; rect = component.rect; y = num3 - (((Rect)(ref rect)).height - 10f); container.anchoredPosition = anchoredPosition; isAnchored = true; } } public enum TimedType { INVINCIBLE, INFINITE_STAMINA, ANTI_GRAVITY, DISABLE_CROUCH, DISABLE_INPUT, FEATHER, SPEED, SLOW, PRAISE, KILL, PITCH } public class Timed { public TimedType type; private float old; public int duration; private static Dictionary<string, object> customVariables = new Dictionary<string, object>(); private static int frames = 0; public static T GetCustomVariable<T>(string key) { if (customVariables.TryGetValue(key, out var value)) { return (T)value; } throw new KeyNotFoundException("Custom variable with key '" + key + "' not found."); } public void SetCustomVariables(Dictionary<string, object> variables) { customVariables = variables; } public Timed(TimedType t, int duration) { type = t; this.duration = duration; } public void addEffect() { float durationInSeconds = (float)duration / 1000f; switch (type) { case TimedType.INVINCIBLE: CrowdControlMod.infiniteHealth = true; CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Infinite Health", durationInSeconds); MissionUI instance = Singleton<MissionUI>.Instance; if (instance != null) { instance.MissionText("CC Infinite Health activated", Color.green, Color.green, 1f); } }); break; case TimedType.INFINITE_STAMINA: CrowdControlMod.infiniteStamina = true; CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Infinite Stamina", durationInSeconds); MissionUI instance2 = Singleton<MissionUI>.Instance; if (instance2 != null) { instance2.MissionText("CC Infinite Energy activated", Color.green, Color.green, 1f); } }); break; case TimedType.SPEED: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Fast Player", durationInSeconds); MissionUI instance3 = Singleton<MissionUI>.Instance; if (instance3 != null) { instance3.MissionText("CC Increased Speed activated", Color.green, Color.green, 1f); } }); break; case TimedType.SLOW: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Slow Player", durationInSeconds); MissionUI instance4 = Singleton<MissionUI>.Instance; if (instance4 != null) { instance4.MissionText("CC Decreased Speed activated", Color.green, Color.green, 1f); } }); break; case TimedType.ANTI_GRAVITY: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Anti-Gravity", durationInSeconds); MissionUI instance5 = Singleton<MissionUI>.Instance; if (instance5 != null) { instance5.MissionText("CC Anti-Gravity activated", Color.green, Color.green, 1f); } }); break; case TimedType.DISABLE_CROUCH: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Crouch Disabled", durationInSeconds); MissionUI instance6 = Singleton<MissionUI>.Instance; if (instance6 != null) { instance6.MissionText("CC Crouch is disabled", Color.red, Color.red, 1f); } }); break; case TimedType.DISABLE_INPUT: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Inputs Disabled", durationInSeconds); MissionUI instance7 = Singleton<MissionUI>.Instance; if (instance7 != null) { instance7.MissionText("CC All inputs disabled", Color.red, Color.red, 1f); } }); break; case TimedType.FEATHER: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Low Gravity", durationInSeconds); MissionUI instance8 = Singleton<MissionUI>.Instance; if (instance8 != null) { instance8.MissionText("CC Feather activated", Color.green, Color.green, 1f); } }); break; case TimedType.PITCH: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) StatusEffectSystem.Instance.AddEffect("Funny Voice", durationInSeconds); MissionUI instance9 = Singleton<MissionUI>.Instance; if (instance9 != null) { instance9.MissionText("CC Your voice feels funny.", Color.green, Color.green, 1f); } }); break; case TimedType.PRAISE: case TimedType.KILL: break; } } public static bool removeEffect(TimedType etype) { try { switch (etype) { case TimedType.INVINCIBLE: CrowdControlMod.infiniteHealth = false; CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance2 = Singleton<MissionUI>.Instance; if (instance2 != null) { instance2.MissionText("CC Infinite Health deactivated", Color.red, Color.red, 1f); } }); break; case TimedType.INFINITE_STAMINA: CrowdControlMod.infiniteStamina = false; CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance8 = Singleton<MissionUI>.Instance; if (instance8 != null) { instance8.MissionText("CC Infinite Energy deactivated", Color.red, Color.red, 1f); } }); break; case TimedType.SPEED: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance = Singleton<MissionUI>.Instance; if (instance != null) { instance.MissionText("CC Increased Speed deactivated", Color.red, Color.red, 1f); } }); break; case TimedType.SLOW: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance4 = Singleton<MissionUI>.Instance; if (instance4 != null) { instance4.MissionText("CC Decrease Speed deactivated", Color.red, Color.red, 1f); } }); break; case TimedType.ANTI_GRAVITY: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance5 = Singleton<MissionUI>.Instance; if (instance5 != null) { instance5.MissionText("CC Anti-Gravity deactivated", Color.red, Color.red, 1f); } }); break; case TimedType.DISABLE_CROUCH: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance7 = Singleton<MissionUI>.Instance; if (instance7 != null) { instance7.MissionText("CC Crouch is re-enabled", Color.green, Color.green, 1f); } }); break; case TimedType.DISABLE_INPUT: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance3 = Singleton<MissionUI>.Instance; if (instance3 != null) { instance3.MissionText("CC All inputs recovered", Color.green, Color.green, 1f); } }); break; case TimedType.FEATHER: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance6 = Singleton<MissionUI>.Instance; if (instance6 != null) { instance6.MissionText("CC Feather deactivated", Color.red, Color.red, 1f); } }); break; case TimedType.PITCH: CrowdControlMod.ActionQueue.Enqueue(delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MissionUI instance9 = Singleton<MissionUI>.Instance; if (instance9 != null) { instance9.MissionText("CC Your voice pitch has returned to normal.", Color.green, Color.green, 1f); } }); break; case TimedType.PRAISE: case TimedType.KILL: break; } } catch (Exception ex) { CrowdControlMod.mls.LogInfo((object)ex.ToString()); return false; } return true; } public void tick() { frames++; _ = type; _ = 1; } } public class TimedThread { public static List<TimedThread> threads = new List<TimedThread>(); public readonly Timed effect; public int duration; public int remain; public int id; public bool paused; public static bool isRunning(TimedType t) { foreach (TimedThread thread in threads) { if (thread.effect.type == t) { return true; } } return false; } public static void tick() { foreach (TimedThread thread in threads) { if (!thread.paused) { thread.effect.tick(); } } } public static void addTime(int duration) { try { lock (threads) { foreach (TimedThread thread in threads) { Interlocked.Add(ref thread.duration, duration + 5); if (!thread.paused) { int dur = Volatile.Read(ref thread.remain); new TimedResponse(thread.id, dur, CrowdResponse.Status.STATUS_PAUSE).Send(ControlClient.Socket); thread.paused = true; } } } } catch (Exception ex) { CrowdControlMod.mls.LogInfo((object)ex.ToString()); } } public static void tickTime(int duration) { try { lock (threads) { foreach (TimedThread thread in threads) { int num = Volatile.Read(ref thread.remain); num -= duration; if (num < 0) { num = 0; } Volatile.Write(ref thread.remain, num); } } } catch (Exception ex) { CrowdControlMod.mls.LogInfo((object)ex.ToString()); } } public static void unPause() { try { lock (threads) { foreach (TimedThread thread in threads) { if (thread.paused) { int dur = Volatile.Read(ref thread.remain); new TimedResponse(thread.id, dur, CrowdResponse.Status.STATUS_RESUME).Send(ControlClient.Socket); thread.paused = false; } } } } catch (Exception ex) { CrowdControlMod.mls.LogInfo((object)ex.ToString()); } } public TimedThread(int id, TimedType type, int duration, Dictionary<string, object> customVariables = null) { effect = new Timed(type, duration); this.duration = duration; remain = duration; this.id = id; paused = false; if (customVariables == null) { customVariables = new Dictionary<string, object>(); } effect.SetCustomVariables(customVariables); try { lock (threads) { threads.Add(this); } } catch (Exception ex) { CrowdControlMod.mls.LogInfo((object)ex.ToString()); } } public void Run() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; effect.addEffect(); bool flag = false; try { do { flag = false; for (int num = Volatile.Read(ref duration); num > 0; num = Volatile.Read(ref duration)) { Interlocked.Add(ref duration, -num); Thread.Sleep(num); } if (Timed.removeEffect(effect.type)) { lock (threads) { threads.Remove(this); } new TimedResponse(id, 0, CrowdResponse.Status.STATUS_STOP).Send(ControlClient.Socket); } else { flag = true; } } while (flag); } catch (Exception ex) { CrowdControlMod.mls.LogInfo((object)ex.ToString()); } } } [BepInPlugin("WarpWorld.CrowdControl", "Crowd Control", "1.0.14.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class CrowdControlMod : BaseUnityPlugin { internal class CrowdControlConfig { public static ConfigEntry<bool> ccEnabled; public static ConfigEntry<bool> customPrefabs; public static ConfigEntry<bool> spawnEnemyMsg; public static ConfigEntry<bool> spawnedItemsRemainPurchased; public static ConfigEntry<bool> ssStoreSpawn; public CrowdControlConfig(ConfigFile cfg) { cfg.SaveOnConfigSet = false; ccEnabled = cfg.Bind<bool>("General", "Enabled", true, ""); customPrefabs = cfg.Bind<bool>("General", "Mod Required By All", true, ""); spawnEnemyMsg = cfg.Bind<bool>("General", "Spawn Enemy Messages", true, ""); spawnedItemsRemainPurchased = cfg.Bind<bool>("General", "Given items persist btwn levels", true, ""); cfg.SaveOnConfigSet = true; ccEnabled.SettingChanged += delegate { mls.LogInfo((object)(ccEnabled.Value ? "Crowd Control is now enabled!" : "Crowd Control has been disabled!")); }; customPrefabs.SettingChanged += delegate { if (customPrefabsInitialized && !customPrefabs.Value) { ShowExitModal(); } if (!customPrefabsInitialized && customPrefabs.Value) { ShowExitModal(); } }; } } public class ExitHandler : MonoBehaviour { [CompilerGenerated] private sealed class <Start>d__0 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Start>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; break; case 2: <>1__state = -1; break; } if (MenuManager.instance.PageCheck((MenuPageIndex)9)) { <>2__current = null; <>1__state = 2; return true; } Application.Quit(); 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(); } } [IteratorStateMachine(typeof(<Start>d__0))] private IEnumerator Start() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Start>d__0(0); } } [HarmonyPatch(typeof(GameDirector), "gameStateEnd")] private class Patch_GameDirector_End { private static void Prefix() { ControlClient.updatedEffects = false; } } [HarmonyPatch(typeof(RunManager))] [HarmonyPatch("OnApplicationQuit")] public class OnApplicationQuitPatch { private static bool Prefix() { try { if (ControlClient.Socket != null && ControlClient.Socket.Connected) { ControlClient.Socket.Shutdown(SocketShutdown.Both); ControlClient.Socket.Close(); ControlClient.Socket.Dispose(); } ControlClient.connected = false; new ControlClient().Stop(); mls.LogInfo((object)"ControlClient stopped successfully."); } catch (Exception arg) { mls.LogError((object)$"Error during application quit: {arg}"); } return true; } } [HarmonyPatch(typeof(PlayerHealth))] internal class PlayerHealthPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void UpdatePatch(PlayerHealth __instance) { if (CrowdControlConfig.ccEnabled.Value) { Traverse.Create((object)__instance).Field("godMode").SetValue((object)infiniteHealth); } } } [HarmonyPatch(typeof(HealthUI), "Update")] public class Patch_HealthUI_Update { private static bool Prefix(HealthUI __instance) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown if (!CrowdControlConfig.ccEnabled.Value) { return true; } if (!infiniteHealth) { return true; } FieldInfo fieldInfo = AccessTools.Field(typeof(HealthUI), "Text"); FieldInfo fieldInfo2 = AccessTools.Field(typeof(HealthUI), "textMaxHealth"); if (fieldInfo != null) { TextMeshProUGUI val = (TextMeshProUGUI)fieldInfo.GetValue(__instance); if ((Object)(object)val != (Object)null) { ((TMP_Text)val).text = "INFINITE"; } } if (fieldInfo2 != null) { TextMeshProUGUI val2 = (TextMeshProUGUI)fieldInfo2.GetValue(__instance); if ((Object)(object)val2 != (Object)null) { ((TMP_Text)val2).text = ""; } } return false; } } [HarmonyPatch(typeof(MissionUI), "MissionText")] public class MissionUITextPatch { private static void Postfix(MissionUI __instance) { if (!CrowdControlConfig.ccEnabled.Value) { return; } FieldInfo field = typeof(MissionUI).GetField("Text", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object? value = field.GetValue(__instance); TMP_Text val = (TMP_Text)((value is TMP_Text) ? value : null); if ((Object)(object)val != (Object)null && val.text.StartsWith("<b>FOCUS > </b>CC ")) { val.text = val.text.Replace("FOCUS >", "CrowdControl:").Replace("CC ", " "); } } } } [HarmonyPatch(typeof(EnergyUI), "Update")] public class Patch_EnergyUI_Update { private static bool Prefix(EnergyUI __instance) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown if (!CrowdControlConfig.ccEnabled.Value) { return true; } if (!infiniteStamina) { return true; } FieldInfo fieldInfo = AccessTools.Field(typeof(EnergyUI), "Text"); FieldInfo fieldInfo2 = AccessTools.Field(typeof(EnergyUI), "textEnergyMax"); if (fieldInfo != null) { TextMeshProUGUI val = (TextMeshProUGUI)fieldInfo.GetValue(__instance); if ((Object)(object)val != (Object)null) { ((TMP_Text)val).text = "INFINITE"; } } if (fieldInfo2 != null) { TextMeshProUGUI val2 = (TextMeshProUGUI)fieldInfo2.GetValue(__instance); if ((Object)(object)val2 != (Object)null) { ((TMP_Text)val2).text = ""; } } return false; } } [HarmonyPatch(typeof(MenuPageLobby), "PlayerAdd")] public static class PlayerAddPatch { private static void Postfix(PlayerAvatar player) { FieldInfo field = typeof(PlayerAvatar).GetField("steamID", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { _ = field.GetValue(player) is string; } PhotonNetwork.CurrentRoom.GetPlayer(PhotonNetwork.LocalPlayer.ActorNumber, false); RPCCommands.MessageHandler.SendMessageToHost("CC_CONNECT", 0, PhotonNetwork.LocalPlayer.ActorNumber, PhotonNetwork.LocalPlayer.ActorNumber, new Dictionary<string, object> { { "version", "1.0.14.0" } }); } } [HarmonyPatch(typeof(MenuPageLobby), "Update")] public static class MenuPageLobbyPatch { private static void Postfix(MenuPageLobby __instance) { if (!CrowdControlConfig.ccEnabled.Value) { return; } FieldInfo field = typeof(MenuPageLobby).GetField("listObjects", BindingFlags.Instance | BindingFlags.NonPublic); if (field == null || !(field.GetValue(__instance) is List<GameObject> list)) { return; } foreach (GameObject item in list) { MenuPlayerListed component = item.GetComponent<MenuPlayerListed>(); if ((Object)(object)component == (Object)null) { continue; } FieldInfo field2 = typeof(MenuPlayerListed).GetField("playerAvatar", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 == null) { continue; } object? value = field2.GetValue(component); PlayerAvatar val = (PlayerAvatar)((value is PlayerAvatar) ? value : null); if (!((Object)(object)val == (Object)null) && !((Object)(object)val.photonView == (Object)null)) { string key = (typeof(PlayerAvatar).GetField("steamID", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(val) as string) ?? "0"; string value2; bool flag = PlayerVersions.TryGetValue(key, out value2); string text = (flag ? ("Crowd Control v" + value2) : ((CrowdControlConfig.customPrefabs.Value || customPrefabsInitialized) ? "Crowd Control Not Found and is Required" : "Crowd Control Not Found")); string text2 = ((flag && value2 == "1.0.14.0") ? "00FF00" : "FF0000"); string text3 = "<color=#" + text2 + ">" + text + "</color>"; string text4 = (typeof(PlayerAvatar).GetField("playerName", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(val) as string) ?? "Unknown Player"; if (val.photonView.Owner == PhotonNetwork.MasterClient) { ((TMP_Text)component.playerName).text = (flag ? ("<color=#00FF00><size=60%>CrowdControl v" + value2 + "</size></color>\n" + text4 + " <color=#331100>[HOST]</color>") : ("<color=#FF0000><size=70%>HOST REQUIRES CROWD CONTROL</size></color>\n" + text4 + " <color=#331100>[HOST]</color>")); } else { ((TMP_Text)component.playerName).text = "<size=60%>" + text3 + "</size>\n" + text4; } } } } } [HarmonyPatch(typeof(MenuPageMain))] internal class MenuPageNamePatch { [HarmonyPatch("ButtonEventSinglePlayer")] [HarmonyPostfix] private static void ButtonEventSinglePlayerPatch() { if (!hasSeenWarning && CrowdControlConfig.ccEnabled.Value && ControlClient.connected) { ShowCrowdControlEnabledModal(); hasSeenWarning = true; } } } [HarmonyPatch(typeof(SemiFunc))] internal class SemiFuncPatch { [HarmonyPatch("EnemySpawn")] [HarmonyPrefix] private static bool SemiFunc_Prefix(ref bool __result) { if (allowSpawning) { __result = true; allowSpawning = false; return false; } return true; } } [HarmonyPatch(typeof(PlayerController))] internal class PlayerStaminaPatch { [HarmonyPatch("Update")] [HarmonyPatch("FixedUpdate")] [HarmonyPostfix] private static void InfiniteStaminaPatch(PlayerController __instance) { if (CrowdControlConfig.ccEnabled.Value) { if (__instance.sprinting && infiniteStamina) { __instance.EnergyCurrent = __instance.EnergyStart; } else if (__instance.Sliding && infiniteStamina) { __instance.EnergyCurrent = __instance.EnergyStart; } } } } private const string modGUID = "WarpWorld.CrowdControl"; private const string modName = "Crowd Control"; public const string modVersion = "1.0.14.0"; private readonly Harmony harmony = new Harmony("WarpWorld.CrowdControl"); public static ManualLogSource mls; internal static CrowdControlMod Instance = null; private ControlClient client; public static bool customPrefabsInitialized = false; public static bool clientMissingCrowdControl = false; public static bool isFocused = true; public static bool modActivated = false; public static bool infiniteHealth = false; public static bool infiniteStamina = false; public static bool allowSpawning = false; public static GameObject breadPrefab = null; public static GameObject milkPrefab = null; public static GameObject eggsPrefab = null; public static Dictionary<string, string> PlayerVersions = new Dictionary<string, string>(); public static GameObject hypeTrainPrefab = null; public static Queue<Action> ActionQueue = new Queue<Action>(); private static bool hasSeenWarning = false; internal CrowdControlConfig BoundConfig { get; private set; } public static void ShowPopUpMessage(string header, string message) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MenuManager.instance == (Object)null) { Debug.LogError((object)"MenuManager is not available!"); return; } Color red = Color.red; string text = "Okay"; MenuManager.instance.PagePopUp(header, red, message, text); } public static void ShowExitModal() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) if (!((Object)(object)MenuManager.instance == (Object)null)) { string text = "Game Restart Required"; Color red = Color.red; string text2 = "Please close and reopen the game for changes to take effect."; string text3 = "Okay"; MenuManager.instance.PagePopUp(text, red, text2, text3); new GameObject("ExitHandler").AddComponent<ExitHandler>(); } } public static void ShowCrowdControlEnabledModal() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)MenuManager.instance == (Object)null)) { string text = "Crowd Control Enabled"; Color yellow = Color.yellow; string text2 = "Crowd Control only works in multiplayer. Please go back and select Multiplayer if you are looking to use it."; string text3 = "Okay"; MenuManager.instance.PagePopUp(text, yellow, text2, text3); } } private void Awake() { Instance = this; BoundConfig = new CrowdControlConfig(((BaseUnityPlugin)this).Config); mls = Logger.CreateLogSource("Crowd Control"); mls.LogInfo((object)"Loaded WarpWorld.CrowdControl. Patching."); harmony.PatchAll(typeof(CrowdControlMod)); harmony.PatchAll(); if (CrowdControlConfig.customPrefabs.Value) { customPrefabsInitialized = true; mls.LogInfo((object)"Custom Prefabs Enabled"); } if (CrowdControlConfig.ccEnabled.Value) { mls.LogInfo((object)"Initializing Crowd Control"); } if (!CrowdControlConfig.ccEnabled.Value) { mls.LogWarning((object)"Crowd Control Mod Not Enabled"); } string? directoryName = Path.GetDirectoryName(typeof(CrowdControlMod).Assembly.Location); string text = Path.Combine(directoryName, "food"); Path.Combine(directoryName, "warpworld.hypetrain"); AssetBundle val = AssetBundle.LoadFromFile(text); if ((Object)(object)val == (Object)null) { mls.LogError((object)("Failed to load AssetBundle from " + text)); } if ((Object)(object)val != (Object)null && CrowdControlConfig.customPrefabs.Value) { string text2 = "assets/repo/mods/collectables/milk.prefab"; string text3 = "assets/repo/mods/collectables/bread.prefab"; string text4 = "assets/repo/mods/collectables/eggs.prefab"; breadPrefab = val.LoadAsset<GameObject>(text3); if ((Object)(object)breadPrefab == (Object)null) { mls.LogError((object)$"Failed to load '{text3}' from asset bundle {val}"); } milkPrefab = val.LoadAsset<GameObject>(text2); if ((Object)(object)milkPrefab == (Object)null) { mls.LogError((object)$"Failed to load '{text2}' from asset bundle {val}"); } eggsPrefab = val.LoadAsset<GameObject>(text4); if ((Object)(object)eggsPrefab == (Object)null) { mls.LogError((object)$"Failed to load '{text4}' from asset bundle {val}"); } if ((Object)(object)breadPrefab != (Object)null) { Valuables.RegisterValuable(breadPrefab); } if ((Object)(object)milkPrefab != (Object)null) { Valuables.RegisterValuable(milkPrefab); } if ((Object)(object)eggsPrefab != (Object)null) { Valuables.RegisterValuable(eggsPrefab); } } try { client = new ControlClient(); new Thread(client.NetworkLoop).Start(); new Thread(client.RequestLoop).Start(); } catch (Exception ex) { mls.LogInfo((object)("CC Init Error: " + ex.ToString())); } mls = ((BaseUnityPlugin)this).Logger; } [HarmonyPatch(typeof(PunManager), "Update")] [HarmonyPrefix] private static void RunEffects() { while (ActionQueue.Count > 0) { ActionQueue.Dequeue()(); } lock (TimedThread.threads) { foreach (TimedThread thread in TimedThread.threads) { if (!thread.paused) { thread.effect.tick(); } } } } } public class ControlClient { public static readonly string CV_HOST = "127.0.0.1"; public static readonly int CV_PORT = 51337; private bool paused; public static bool connected = false; public static bool setName = false; public static bool resetName = false; public static bool disableLogging = true; public bool inGame = true; public bool questMessage; public static string currentLevel = ""; public static int playerCount = 0; public static bool updatedEffects = false; public static bool customPrefabsEffectsUpdate = false; private Dictionary<string, CrowdDelegate> Delegate { get; set; } private IPEndPoint Endpoint { get; set; } private Queue<CrowdRequest> Requests { get; set; } private bool Running { get; set; } public static Socket Socket { get; set; } public ControlClient() { Endpoint = new IPEndPoint(IPAddress.Parse(CV_HOST), CV_PORT); Requests = new Queue<CrowdRequest>(); Running = true; Socket = null; Delegate = new Dictionary<string, CrowdDelegate> { { "player_invincible", (ControlClient client, CrowdRequest req) => new PlayerInvincibleEffect(client, req).Execute() }, { "player_infinitestam", (ControlClient client, CrowdRequest req) => new PlayerInfiniteStaminaEffect(client, req).Execute() }, { "player_antigravity", (ControlClient client, CrowdRequest req) => new PlayerAntiGravityEffect(client, req).Execute() }, { "player_disablecrouch", (ControlClient client, CrowdRequest req) => new PlayerDisableCrouchEffect(client, req).Execute() }, { "player_disableinput", (ControlClient client, CrowdRequest req) => new PlayerDisableInputEffect(client, req).Execute() }, { "player_feather", (ControlClient client, CrowdRequest req) => new PlayerFeatherEffect(client, req).Execute() }, { "player_fast", (ControlClient client, CrowdRequest req) => new PlayerSpeedEffect(client, req).Execute() }, { "player_slow", (ControlClient client, CrowdRequest req) => new PlayerSpeedSlowEffect(client, req).Execute() }, { "player_drain_energy", (ControlClient client, CrowdRequest req) => new PlayerDrainEnergyEffect(client, req).Execute() }, { "player_refill_energy", (ControlClient client, CrowdRequest req) => new PlayerRefillEnergyEffect(client, req).Execute() }, { "randomPlayer_heal", (ControlClient client, CrowdRequest req) => new PlayerHealEffect(client, req).Execute() }, { "randomPlayer_hurt", (ControlClient client, CrowdRequest req) => new PlayerHurtEffect(client, req).Execute() }, { "randomPlayer_revive", (ControlClient client, CrowdRequest req) => new PlayerReviveEffect(client, req).Execute() }, { "randomSpawnActivatedItem_ItemRubberDuck", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "randomSpawnActivatedItem_ValuableWizardDumgolfsStaff", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "randomSpawnActivatedItem_ValuableBottle", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "randomSpawncustom_Bread", (ControlClient client, CrowdRequest req) => new SpawnCustomItemEffect(client, req).Execute() }, { "randomSpawncustom_Milk", (ControlClient client, CrowdRequest req) => new SpawnCustomItemEffect(client, req).Execute() }, { "randomSpawncustom_Eggs", (ControlClient client, CrowdRequest req) => new SpawnCustomItemEffect(client, req).Execute() }, { "randomPlayerupgrade_energy", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_health", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_map", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_jump", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_grabrange", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_grabstrength", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_sprint", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_throw", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayerupgrade_tumble", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "randomPlayer_teleport", (ControlClient client, CrowdRequest req) => new PlayerTeleportEffect(client, req).Execute() }, { "randomPlayer_teleport_extraction", (ControlClient client, CrowdRequest req) => new PlayerTeleportToExtractionEffect(client, req).Execute() }, { "player_heal", (ControlClient client, CrowdRequest req) => new PlayerHealEffect(client, req).Execute() }, { "player_hurt", (ControlClient client, CrowdRequest req) => new PlayerHurtEffect(client, req).Execute() }, { "player_revive", (ControlClient client, CrowdRequest req) => new PlayerReviveEffect(client, req).Execute() }, { "praise_crowd_control", (ControlClient client, CrowdRequest req) => new PraiseCrowdControlEffect(client, req).Execute() }, { "player_teleport", (ControlClient client, CrowdRequest req) => new PlayerTeleportEffect(client, req).Execute() }, { "player_teleport_extraction", (ControlClient client, CrowdRequest req) => new PlayerTeleportToExtractionEffect(client, req).Execute() }, { "destroy_random_item", (ControlClient client, CrowdRequest req) => new DamageRandomValuableEffect(client, req).Execute() }, { "playerPitch_high", (ControlClient client, CrowdRequest req) => new PlayerVoiceOverrideEffect(client, req).Execute() }, { "playerPitch_low", (ControlClient client, CrowdRequest req) => new PlayerVoiceOverrideEffect(client, req).Execute() }, { "closeAllDoors", (ControlClient client, CrowdRequest req) => new CloseAllDoors(client, req).Execute() }, { "increase_loot_goal", (ControlClient client, CrowdRequest req) => new UpdateHaulGoalEffect(client, req).Execute() }, { "decrease_loot_goal", (ControlClient client, CrowdRequest req) => new UpdateHaulGoalEffect(client, req).Execute() }, { "playerupgrade_energy", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_health", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_map", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_jump", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_grabrange", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_grabstrength", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_sprint", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_throw", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "playerupgrade_tumble", (ControlClient client, CrowdRequest req) => new UpgradePlayerEffect(client, req).Execute() }, { "killplayer", (ControlClient client, CrowdRequest req) => new PlayerKillEffect(client, req).Execute() }, { "spawnenemy", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawncustom_Bread", (ControlClient client, CrowdRequest req) => new SpawnCustomItemEffect(client, req).Execute() }, { "spawncustom_Milk", (ControlClient client, CrowdRequest req) => new SpawnCustomItemEffect(client, req).Execute() }, { "spawncustom_Eggs", (ControlClient client, CrowdRequest req) => new SpawnCustomItemEffect(client, req).Execute() }, { "spawncollectable_ItemCartMedium", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemCartSmall", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemDroneBattery", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemDroneFeather", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemDroneIndestructible", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemDroneTorque", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemDroneZeroGravity", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemExtractionTracker", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGrenadeDuctTaped", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGrenadeExplosive", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGrenadeHuman", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGrenadeShockwave", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGrenadeStun", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGunHandgun", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGunShotgun", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemGunTranq", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemHealthPackLarge", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemHealthPackMedium", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemHealthPackSmall", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMeleeBaseballBat", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMeleeFryingPan", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMeleeInflatableHammer", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMeleeSledgeHammer", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMeleeSword", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMineExplosive", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMineShockwave", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemMineStun", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemOrbZeroGravity", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemPowerCrystal", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemRubberDuck", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradeMapPlayerCount", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerEnergy", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerExtraJump", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerGrabRange", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerGrabStrength", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerGrabThrow", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerHealth", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerSprintSpeed", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemUpgradePlayerTumbleLaunch", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ItemValuableTracker", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableDiamond", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableEmeraldBracelet", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableGoblet", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableOcarina", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuablePocketWatch", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableUraniumMug", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticBonsai", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticHDD", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableChompBook", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableCrown", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableDoll", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableFrog", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableGemBox", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableGlobe", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableLovePotion", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableMoney", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableMusicBox", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableToyMonkey", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableUraniumPlate", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableVaseSmall", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArctic3DPrinter", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticLaptop", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticPropaneTank", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticSampleSixPack", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticSample", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableBottle", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableClown", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableComputer", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableFan", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableGramophone", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableMarbleTable", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableRadio", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableShipInBottle", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableTrophy", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableVase", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardGoblinHead", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardPowerCrystal", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardTimeGlass", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticBarrel", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticBigSample", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticCreatureLeg", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticFlamethrower", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticGuitar", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticSampleCooler", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableDiamondDisplay", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableIceSaw", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableScreamDoll", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableTelevision", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableVaseBig", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardCubeOfKnowledge", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardMasterPotion", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableAnimalCrate", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticIceBlock", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableDinosaur", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuablePiano", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardGriffinStatue", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticScienceStation", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableHarp", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuablePainting", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardDumgolfsStaff", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardSword", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableArcticServerRack", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableGoldenStatue", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableGrandfatherClock", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawncollectable_ValuableWizardBroom", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawnActivatedItem_ItemRubberDuck", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawnActivatedItem_ValuableWizardDumgolfsStaff", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawnActivatedItem_ValuableBottle", (ControlClient client, CrowdRequest req) => new SpawnCollectableEffect(client, req).Execute() }, { "spawnEnemy_Robe", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Duck", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Head", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Runner", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Animal", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Floater", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Tumbler", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Bowtie", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Hunter", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Beamer", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_Upscream", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_SlowMouth", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_ValuableThrower", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_ThinMan", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemy_SlowWalker", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Robe", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Duck", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Head", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Runner", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Animal", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Floater", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Tumbler", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Bowtie", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Hunter", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Beamer", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_Upscream", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_SlowMouth", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_ValuableThrower", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_ThinMan", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() }, { "spawnEnemyRandom_SlowWalker", (ControlClient client, CrowdRequest req) => new SpawnEnemyEffect(client, req).Execute() } }; } public static bool IsExcludedLevel(Level currentLevel) { return new HashSet<Level> { RunManager.instance.levelShop, RunManager.instance.levelLobby, RunManager.instance.levelArena, RunManager.instance.levelTutorial, RunManager.instance.levelLobbyMenu, RunManager.instance.levelMainMenu, RunManager.instance.levelRecording }.Contains(currentLevel); } public static void updateEffects() { updatedEffects = true; string[] collection = new string[21] { "randomPlayer_heal", "randomPlayer_hurt", "randomPlayer_revive", "randomPlayerupgrade_energy", "randomPlayerupgrade_health", "randomPlayerupgrade_map", "randomPlayerupgrade_jump", "randomPlayerupgrade_grabrange", "randomPlayerupgrade_grabstrength", "randomPlayerupgrade_sprint", "randomPlayerupgrade_throw", "randomPlayerupgrade_tumble", "randomSpawnActivatedItem_ItemRubberDuck", "randomSpawnActivatedItem_ValuableBottle", "randomSpawnActivatedItem_ValuableWizardDumgolfsStaff", "randomSpawncustom_Bread", "randomSpawncustom_Milk", "randomSpawncustom_Eggs", "player_teleport", "randomPlayer_teleport", "randomPlayer_teleport_extraction" }; string[] collection2 = new string[2] { "playerPitch_high", "playerPitch_low" }; string[] codes = new string[3] { "spawncustom_Bread", "spawncustom_Milk", "spawncustom_Eggs" }; if (!customPrefabsEffectsUpdate) { if (CrowdControlMod.customPrefabsInitialized) { ShowEffect(codes); } else { HideEffect(codes); } customPrefabsEffectsUpdate = true; } if (playerCount == GameDirector.instance.PlayerList.Count) { return; } playerCount = GameDirector.instance.PlayerList.Count; if (GameDirector.instance.PlayerList.Count == 1) { List<string> list = new List<string>(collection); list.AddRange(collection2); HideEffect(list.ToArray()); return; } List<string> list2 = new List<string>(collection); if (CrowdControlMod.customPrefabsInitialized) { list2.AddRange(collection2); } ShowEffect(list2.ToArray()); } public static (bool status, string? message) IsReady() { if (!CrowdControlMod.CrowdControlConfig.ccEnabled.Value) { return (false, "Crowd Control not enabled in Mods menu."); } if (!Object.op_Implicit((Object)(object)RunManager.instance)) { return (false, "Game is not ready."); } if (currentLevel != ((object)RunManager.instance.levelCurrent).ToString() && !CrowdControlMod.modActivated) { RPCCommands.MessageHandler.SendMessageToHost("CC_CONNECT", 0, PhotonNetwork.LocalPlayer.ActorNumber, 0, new Dictionary<string, object> { { "version", "1.0.14.0" } }); } currentLevel = ((object)RunManager.instance.levelCurrent).ToString(); if (IsExcludedLevel(RunManager.instance.levelCurrent)) { return (false, "Not in supported level."); } if (!GameManager.Multiplayer()) { return (false, "Only available in Multiplayer."); } if (!CrowdControlMod.modActivated) { return (false, "Version does not match host."); } TruckScreenText instance = TruckScreenText.instance; FieldInfo field = typeof(TruckScreenText).GetField("started", BindingFlags.Instance | BindingFlags.NonPublic); if (field == null) { return (false, null); } if (!(bool)field.GetValue(instance)) { return (false, ""); } if (!disableLogging) { CrowdControlMod.mls.LogInfo((object)"Success: All checks passed"); } if (!updatedEffects) { updateEffects(); } return (true, ""); } public static void HideEffect(params string[] codes) { new EffectUpdateModern(EffectUpdateModern.Status.STATUS_NOTVISIBLE, codes).Send(Socket); } public static void ShowEffect(params string[] codes) { new EffectUpdateModern(EffectUpdateModern.Status.STATUS_VISIBLE, codes).Send(Socket); } public static void DisableEffect(params string[] codes) { new EffectUpdateModern(EffectUpdateModern.Status.STATUS_NOTSELECTABLE, codes).Send(Socket); } public static void EnableEffect(params string[] codes) { new EffectUpdateModern(EffectUpdateModern.Status.STATUS_SELECTABLE, codes).Send(Socket); } private void ClientLoop() { if (CrowdControlMod.CrowdControlConfig.ccEnabled.Value) { CrowdControlMod.mls.LogInfo((object)"Connected to Crowd Control"); } Timer timer = new Timer(timeUpdate, null, 0, 200); try { while (Running && CrowdControlMod.CrowdControlConfig.ccEnabled.Value) { try { if (Socket == null || !Socket.Connected) { break; } connected = true; CrowdControlMod.CrowdControlConfig.ccEnabled.Value = true; CrowdRequest crowdRequest = CrowdRequest.Recieve(this, Socket); if (crowdRequest != null && !crowdRequest.IsKeepAlive()) { lock (Requests) { Requests.Enqueue(crowdRequest); } } continue; } catch (ObjectDisposedException) { break; } catch (SocketException) { break; } catch (ThreadAbortException) { Thread.ResetAbort(); break; } catch (Exception) { } } } catch (Exception arg) { CrowdControlMod.mls.LogInfo((object)$"Critical Error: {arg}"); } finally { if (CrowdControlMod.CrowdControlConfig.ccEnabled.Value) { CrowdControlMod.mls.LogInfo((object)"Disconnected from Crowd Control."); } connected = false; try { if (Socket != null) { Socket.Dispose(); } timer.Dispose(); } catch (Exception) { } } } public void timeUpdate(object state) { inGame = true; if (!IsReady().status) { inGame = false; } if (!inGame) { TimedThread.addTime(200); paused = true; } else if (paused) { paused = false; TimedThread.unPause(); TimedThread.tickTime(200); } else { TimedThread.tickTime(200); } } public bool IsRunning() { return Running; } public void NetworkLoop() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; while (Running) { if (CrowdControlMod.CrowdControlConfig.ccEnabled.Value) { CrowdControlMod.mls.LogInfo((object)"Attempting to connect to Crowd Control"); } connected = false; try { Socket = new Socket(Endpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, optionValue: true); if (Socket.BeginConnect(Endpoint, null, null).AsyncWaitHandle.WaitOne(10000, exitContext: true) && Socket.Connected) { ClientLoop(); } else { CrowdControlMod.mls.LogInfo((object)"Failed to connect to Crowd Control"); connected = false; } Socket.Close(); } catch (Exception ex) { CrowdControlMod.mls.LogInfo((object)ex.GetType().Name); CrowdControlMod.mls.LogInfo((object)"Failed to connect to Crowd Control"); connected = false; } Thread.Sleep(10000); } } public void RequestLoop() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; while (Running) { try { CrowdRequest crowdRequest = null; lock (Requests) { if (Requests.Count == 0) { continue; } crowdRequest = Requests.Dequeue(); goto IL_0052; } IL_0052: string reqCode = crowdRequest.GetReqCode(); try { (bool status, string? message) tuple = IsReady(); bool item = tuple.status; string item2 = tuple.message; CrowdResponse crowdResponse = (item ? Delegate[reqCode](this, crowdRequest) : new CrowdResponse(crowdRequest.GetReqID(), (!(item2 == "")) ? CrowdResponse.Status.STATUS_FAILURE : CrowdResponse.Status.STATUS_RETRY, item2)); if (crowdResponse == null) { new CrowdResponse(crowdRequest.GetReqID(), CrowdResponse.Status.STATUS_FAILURE, "Request error for '" + reqCode + "'").Send(Socket); } crowdResponse.Send(Socket); } catch (KeyNotFoundException) { new CrowdResponse(crowdRequest.GetReqID(), CrowdResponse.Status.STATUS_FAILURE, "Request error for '" + reqCode + "'").Send(Socket); } } catch (Exception) { if (CrowdControlMod.CrowdControlConfig.ccEnabled.Value) { CrowdControlMod.mls.LogInfo((object)"Disconnected from Crowd Control."); } connected = false; Socket.Close(); } } } public void Stop() { Running = false; } } public delegate CrowdResponse CrowdDelegate(ControlClient client, CrowdRequest req); public class CrowdDelegates { public static Random rnd = new Random(); public static readonly TimeSpan SERVER_TIMEOUT = TimeSpan.FromSeconds(5.0); public static void setProperty(object a, string prop, object val) { PropertyInfo property = a.GetType().GetProperty(prop, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.CanWrite) { property.SetValue(a, val); } } public static object getProperty(object a, string prop) { return a.GetType().GetField(prop, BindingFlags.Instance | BindingFlags.NonPublic).GetValue(a); } public static void setSubProperty(object a, string prop, string prop2, object val) { FieldInfo field = a.GetType().GetField(prop, BindingFlags.Instance | BindingFlags.NonPublic); field.GetType().GetField(prop, BindingFlags.Instance | BindingFlags.NonPublic).SetValue(field, val); } public static void callSubFunc(object a, string prop, string func, object val) { callSubFunc(a, prop, func, new object[1] { val }); } public static void callSubFunc(object a, string prop, string func, object[] vals) { FieldInfo field = a.GetType().GetField(prop, BindingFlags.Instance | BindingFlags.NonPublic); field.GetType().GetMethod(func, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy).Invoke(field, vals); } public static void callFunc(object a, string func, object val) { callFunc(a, func, new object[1] { val }); } public static void callFunc(object a, string func, object[] vals) { a.GetType().GetMethod(func, BindingFlags.Instance | BindingFlags.NonPublic).Invoke(a, vals); } public static object callAndReturnFunc(object a, string func, object val) { return callAndReturnFunc(a, func, new object[1] { val }); } public static object callAndReturnFunc(object a, string func, object[] vals) { return a.GetType().GetMethod(func, BindingFlags.Instance | BindingFlags.NonPublic).Invoke(a, vals); } } public class CrowdRequest { public enum Type { REQUEST_TEST = 0, REQUEST_START = 1, REQUEST_STOP = 2, REQUEST_KEEPALIVE = 255 } public class Target { public string service; public string id; public string name; public string avatar; } public class SourceDetails { public class Contribution { public string user_id; public string user_login; public string user_name; public string type; public int total; } public int total; public int progress; public int goal; public Contribution[] top_contributions; public Contribution last_contribution; public int level; } public static readonly int RECV_BUF = 4096; public static readonly int RECV_TIME = 5000000; public string code; public int id; public int duration; public string type; public string viewer; public Target[] targets; public SourceDetails sourceDetails; public static CrowdRequest Recieve(ControlClient client, Socket socket) { byte[] array = new byte[RECV_BUF]; string text = ""; int num = 0; do { if (!client.IsRunning()) { return null; } if (socket.Poll(RECV_TIME, SelectMode.SelectRead)) { num = socket.Receive(array); if (num < 0) { return null; } text += Encoding.ASCII.GetString(array); } else { CrowdResponse.KeepAlive(socket); } } while (num == 0 || (num == RECV_BUF && array[RECV_BUF - 1] != 0)); return JsonConvert.DeserializeObject<CrowdRequest>(text); } public string GetReqCode() { return code; } public int GetReqID() { return id; } public int GetReqDuration() { return duration; } public Type GetReqType() { string text = type; if (text == "1") { return Type.REQUEST_START; } if (text == "2") { return Type.REQUEST_STOP; } return Type.REQUEST_TEST; } public string GetReqViewer() { return viewer; } public bool IsKeepAlive() { if (id == 0) { return type == "255"; } return false; } } public class CrowdResponse { public enum Status { STATUS_SUCCESS = 0, STATUS_FAILURE = 1, STATUS_UNAVAIL = 2, STATUS_RETRY = 3, STATUS_START = 5, STATUS_PAUSE = 6, STATUS_RESUME = 7, STATUS_STOP = 8, STATUS_KEEPALIVE = 255 } public int id; public string message; public string code; public int status;
BepInEx/plugins/HypeTrain.dll
Decompiled 3 weeks agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyVersion("0.0.0.0")] public class HypeTrainTester : MonoBehaviour { [SerializeField] private string[] m_names = new string[0]; [SerializeField] private HypeTrain m_hypeTrainPrototype; [SerializeField] private Transform m_startTransform; [SerializeField] private Transform m_endTransform; [SerializeField] private Transform m_playerTransform; private HypeTrain m_createdHypeTrain; private void Start() { ((MonoBehaviour)this).StartCoroutine(StartTest()); } private IEnumerator StartTest() { yield return (object)new WaitForSeconds(0.5f); m_createdHypeTrain = Object.Instantiate<HypeTrain>(m_hypeTrainPrototype); m_createdHypeTrain.OnFinishedEvent.AddListener(new UnityAction(ResetTest)); HypeTrainBoxData[] array = new HypeTrainBoxData[m_names.Length]; for (int i = 0; i < m_names.Length; i++) { array[i] = new HypeTrainBoxData { name = m_names[i], box_color = Color.HSVToRGB(Random.value, 1f, 1f), box_color_rate = ((((uint)i & (true ? 1u : 0u)) != 0) ? ((Random.Range(0, 1) == 0) ? (-0.2f) : 1f) : 0f), bit_amount = ((i % 4 == 0) ? Random.Range(1, 1000000) : 0), name_color = Color.HSVToRGB(Random.value, 1f, 1f) }; } m_createdHypeTrain.StartHypeTrain(m_startTransform.position, m_endTransform.position, array, m_playerTransform); } private void ResetTest() { if ((Object)null != (Object)(object)m_createdHypeTrain) { Object.Destroy((Object)(object)((Component)m_createdHypeTrain).gameObject); m_createdHypeTrain = null; } ((MonoBehaviour)this).StartCoroutine(StartTest()); } } public class HypeTrainBit : MonoBehaviour { [SerializeField] private Animator m_animator; [SerializeField] private int m_bitValue; [SerializeField] private Rigidbody m_rigidbody; [SerializeField] private Collider m_collider; [SerializeField] private float m_lifeTime = 20f; private IEnumerator m_deathCoroutine; private static readonly int s_deathTrigger = Animator.StringToHash("Death"); public int BitValue => m_bitValue; public Rigidbody Rigidbody => m_rigidbody; public Collider Collider => m_collider; public float LifeTime { get { return m_lifeTime; } set { m_lifeTime = value; } } private void Awake() { m_animator.StopPlayback(); } public void StartDeathCountdown() { if (m_deathCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(m_deathCoroutine); m_deathCoroutine = null; } m_deathCoroutine = Death(); ((MonoBehaviour)this).StartCoroutine(m_deathCoroutine); } private IEnumerator Death() { yield return (object)new WaitForSeconds(m_lifeTime); m_animator.Play(s_deathTrigger, 0, 0f); } private void Kill() { Object.Destroy((Object)(object)((Component)this).gameObject); } } public class HypeTrain : MonoBehaviour { [SerializeField] private Rigidbody m_rigidBody; [SerializeField] private HypeTrainCarAudio m_carWheelsAudio; [SerializeField] private HypeTrainLocomotive m_locomotive; [SerializeField] private HypeTrainBox m_boxPrototype; [SerializeField] private HypeTrainBitBox m_bitboxPrototype; [SerializeField] private float m_distancePerSecond = 4f; [SerializeField] private HypeTrainBit[] m_bitPrototypes = new HypeTrainBit[0]; [SerializeField] private bool m_keepAliveOnFinish; private UnityEvent m_onFinishedEvent = new UnityEvent(); private List<HypeTrainBox> m_activeBoxes = new List<HypeTrainBox>(); private Queue<HypeTrainBox> m_availableBoxes = new Queue<HypeTrainBox>(); private Queue<HypeTrainBitBox> m_availableBitBoxes = new Queue<HypeTrainBitBox>(); private Vector3 m_startPosition = Vector3.zero; private Vector3 m_stopPosition = Vector3.zero; private Vector3 m_direction = Vector3.zero; private float m_trackDistance; private Transform m_playerRoot; private int m_nextBoxIndexToSpawn; private float m_nextBoxOffset; private HypeTrainBoxData[] m_boxData; public UnityEvent OnFinishedEvent => m_onFinishedEvent; private void Awake() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) m_bitPrototypes = m_bitPrototypes.OrderByDescending((HypeTrainBit bit) => bit.BitValue).ToArray(); ((Component)m_locomotive).transform.localPosition = -m_locomotive.FrontLoc.localPosition; ((UnityEvent<HypeTrainCar, HypeTrainCar.Visibility>)m_locomotive.OnVisibilityChangedEvent).AddListener((UnityAction<HypeTrainCar, HypeTrainCar.Visibility>)OnLocomotiveFinished); StopHypeTrain(); ((Component)m_boxPrototype).gameObject.SetActive(false); ((Component)m_bitboxPrototype).gameObject.SetActive(false); } private void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) float num = Time.deltaTime * m_distancePerSecond; m_rigidBody.MovePosition(m_rigidBody.position + m_direction * num); m_locomotive.UpdateCar(Time.deltaTime, num); foreach (HypeTrainBox activeBox in m_activeBoxes) { activeBox.UpdateCar(Time.deltaTime, num); } m_carWheelsAudio.UpdateAudio(Time.deltaTime, num, m_locomotive, m_activeBoxes, m_playerRoot); } public void StartHypeTrain(Vector3 startWorldPosition, Vector3 stopWorldPosition, HypeTrainBoxData[] boxData, Transform playerRoot = null, HypeTrainOptions options = null) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) StopHypeTrain(); m_startPosition = startWorldPosition; m_stopPosition = stopWorldPosition; Vector3 val = m_stopPosition - m_startPosition; m_trackDistance = ((Vector3)(ref val)).magnitude; m_direction = ((Vector3)(ref val)).normalized; m_boxData = boxData; m_playerRoot = playerRoot; m_nextBoxIndexToSpawn = 0; m_nextBoxOffset = 0f - m_locomotive.CalculateCarLength(); m_distancePerSecond = ((options != null && options.distance_per_second.HasValue) ? options.distance_per_second.Value : m_distancePerSecond); m_keepAliveOnFinish = ((options != null && options.keep_alive_on_finish.HasValue) ? options.keep_alive_on_finish.Value : m_keepAliveOnFinish); if (options != null && options.train_layer.HasValue) { SetLayerRecursive(((Component)this).gameObject, options.train_layer.Value); HypeTrainBit[] bitPrototypes = m_bitPrototypes; foreach (HypeTrainBit hypeTrainBit in bitPrototypes) { SetLayerRecursive(((Component)hypeTrainBit).gameObject, options.train_layer.Value); } } if (options != null && options.volume.HasValue) { SetVolume(options.volume.Value); } Transform transform = ((Component)this).transform; Vector3 position = (m_rigidBody.position = startWorldPosition); transform.position = position; Transform transform2 = ((Component)this).transform; Quaternion rotation = (m_rigidBody.rotation = Quaternion.LookRotation(m_direction)); transform2.rotation = rotation; int num = Mathf.Min(Mathf.CeilToInt((m_trackDistance + m_boxPrototype.CalculateCarLength()) / m_boxPrototype.CalculateCarLength()), boxData.Length); for (int j = 0; j < num; j++) { HypeTrainBox hypeTrainBox = Object.Instantiate<HypeTrainBox>(m_boxPrototype, ((Component)m_boxPrototype).transform.parent, false); ((UnityEvent<HypeTrainCar, HypeTrainCar.Visibility>)hypeTrainBox.OnVisibilityChangedEvent).AddListener((UnityAction<HypeTrainCar, HypeTrainCar.Visibility>)OnBoxFinished); m_availableBoxes.Enqueue(hypeTrainBox); } num = Mathf.Min(Mathf.CeilToInt((m_trackDistance + m_bitboxPrototype.CalculateCarLength()) / m_bitboxPrototype.CalculateCarLength()), boxData.Length); for (int k = 0; k < num; k++) { HypeTrainBitBox hypeTrainBitBox = Object.Instantiate<HypeTrainBitBox>(m_bitboxPrototype, ((Component)m_bitboxPrototype).transform.parent, false); hypeTrainBitBox.Init(m_bitPrototypes, playerRoot, options?.player_collider_radius, options?.max_bits_per_car, options?.bit_lifetime_in_seconds); ((UnityEvent<HypeTrainCar, HypeTrainCar.Visibility>)hypeTrainBitBox.OnVisibilityChangedEvent).AddListener((UnityAction<HypeTrainCar, HypeTrainCar.Visibility>)OnBoxFinished); m_availableBitBoxes.Enqueue(hypeTrainBitBox); } m_carWheelsAudio.StartPersistentSounds(); ((Component)m_locomotive).gameObject.SetActive(true); m_locomotive.Engage(0f, m_trackDistance + m_locomotive.CalculateCarLength(), 0); FlushAvailableBoxes(); } public void StopHypeTrain() { m_carWheelsAudio.StopPersistentSounds(); foreach (HypeTrainBox availableBox in m_availableBoxes) { Object.Destroy((Object)(object)((Component)availableBox).gameObject); } m_availableBoxes.Clear(); foreach (HypeTrainBitBox availableBitBox in m_availableBitBoxes) { Object.Destroy((Object)(object)((Component)availableBitBox).gameObject); } m_availableBitBoxes.Clear(); foreach (HypeTrainBox activeBox in m_activeBoxes) { Object.Destroy((Object)(object)((Component)activeBox).gameObject); } m_activeBoxes.Clear(); ((Component)m_locomotive).gameObject.SetActive(false); } public void SetDistancePerSecond(float distancePerSecond) { m_distancePerSecond = distancePerSecond; } public void SetKeepAliveOnFinish(bool keepAlive) { m_keepAliveOnFinish = keepAlive; } public void SetVolume(float volume) { m_locomotive.SetBaseVolume(volume); m_carWheelsAudio.SetBaseVolume(volume); } private void OnLocomotiveFinished(HypeTrainCar car, HypeTrainCar.Visibility visibility) { if (visibility == HypeTrainCar.Visibility.Hidden) { FlushAvailableBoxes(); } } private void OnBoxFinished(HypeTrainCar car, HypeTrainCar.Visibility visibility) { if (visibility == HypeTrainCar.Visibility.Hidden) { m_activeBoxes.Remove((HypeTrainBox)car); if (((object)car).GetType() == typeof(HypeTrainBitBox)) { HypeTrainBitBox item = (HypeTrainBitBox)car; m_availableBitBoxes.Enqueue(item); } else { m_availableBoxes.Enqueue((HypeTrainBox)car); } FlushAvailableBoxes(); } } private void FlushAvailableBoxes() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) while (m_nextBoxIndexToSpawn < m_boxData.Length && m_availableBoxes.Count != 0) { HypeTrainBoxData hypeTrainBoxData = m_boxData[m_nextBoxIndexToSpawn]; HypeTrainBox hypeTrainBox = null; hypeTrainBox = ((hypeTrainBoxData.bit_amount <= 0) ? m_availableBoxes.Dequeue() : m_availableBitBoxes.Dequeue()); ((Component)hypeTrainBox).transform.localPosition = Vector3.forward * m_nextBoxOffset - hypeTrainBox.FrontLoc.localPosition; float num = hypeTrainBox.CalculateCarLength(); float num2 = Mathf.Abs(m_nextBoxOffset); Vector3 val = ((Component)this).transform.position - m_startPosition; float num3 = num2 - ((Vector3)(ref val)).magnitude; hypeTrainBox.Engage(hypeTrainBoxData, num3, num3 + m_trackDistance + num, m_nextBoxIndexToSpawn + 1); m_activeBoxes.Add(hypeTrainBox); m_nextBoxIndexToSpawn++; m_nextBoxOffset -= num; } bool flag = false; flag |= ((Component)m_locomotive).gameObject.activeSelf; foreach (HypeTrainBox activeBox in m_activeBoxes) { flag |= ((Component)activeBox).gameObject.activeSelf; } if (!flag) { OnFinishedEvent.Invoke(); StopHypeTrain(); if (!m_keepAliveOnFinish) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } private void SetLayerRecursive(GameObject go, int layer) { go.layer = layer; for (int i = 0; i < go.transform.childCount; i++) { SetLayerRecursive(((Component)go.transform.GetChild(i)).gameObject, layer); } } } public class HypeTrainBitBox : HypeTrainBox { [SerializeField] private BoxCollider m_bitSpawnZone; [SerializeField] private int m_maxBitBreaks = 100; [SerializeField] private TextMeshPro[] m_bitsTexts = (TextMeshPro[])(object)new TextMeshPro[0]; [SerializeField] private HypeTrainBitBoxPlayerCollider m_playerCollider; private List<HypeTrainBit> m_createdBits = new List<HypeTrainBit>(); private HypeTrainBit[] m_bitPrototypes; private int? m_maxBitsToSpawn; private float? m_bitLifetimeInSeconds; public void Init(HypeTrainBit[] bitPrototypes, Transform playerRoot, float? playerColliderRadius = null, int? maxBitsToSpawn = null, float? bitLifetimeInSeconds = null) { m_bitPrototypes = bitPrototypes; m_maxBitsToSpawn = maxBitsToSpawn; m_bitLifetimeInSeconds = bitLifetimeInSeconds; m_playerCollider.Init(this, playerRoot, playerColliderRadius); } public override void Engage(HypeTrainBoxData data, float distanceToStart, float distanceToStop, int index) { base.Engage(data, distanceToStart, distanceToStop, index); TextMeshPro[] bitsTexts = m_bitsTexts; for (int i = 0; i < bitsTexts.Length; i++) { ((TMP_Text)bitsTexts[i]).SetText($"BITS: {data.bit_amount}", true); } SpawnBits(data.bit_amount); } public void SpawnBits(int amount) { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) RelinquishCreatedBits(); if (m_bitPrototypes == null) { return; } int num = (m_maxBitsToSpawn.HasValue ? m_maxBitsToSpawn.Value : amount); int num2 = m_maxBitBreaks; Vector3 localPosition = default(Vector3); while (amount > 0 && num > 0) { int num3 = amount; if (0 < num2) { num3 = Random.Range(1, amount + 1); } amount -= num3; while (0 < num3 && num > 0) { HypeTrainBit[] bitPrototypes = m_bitPrototypes; foreach (HypeTrainBit hypeTrainBit in bitPrototypes) { if (hypeTrainBit.BitValue <= num3) { num3 -= hypeTrainBit.BitValue; num--; ((Vector3)(ref localPosition))..ctor(Random.Range((0f - m_bitSpawnZone.size.x) * 0.5f, m_bitSpawnZone.size.x * 0.5f), 0f, Random.Range((0f - m_bitSpawnZone.size.z) * 0.5f, m_bitSpawnZone.size.z * 0.5f)); HypeTrainBit hypeTrainBit2 = Object.Instantiate<HypeTrainBit>(hypeTrainBit, ((Component)m_bitSpawnZone).transform, false); ((Component)hypeTrainBit2).transform.localPosition = localPosition; hypeTrainBit2.Rigidbody.isKinematic = true; hypeTrainBit2.Collider.enabled = true; m_createdBits.Add(hypeTrainBit2); } } } num2--; } } protected override void OnShowFinished() { base.OnShowFinished(); if (m_createdBits.Count == 0) { SpawnBits(100); } } protected override void OnHideFinished() { base.OnHideFinished(); foreach (HypeTrainBit createdBit in m_createdBits) { Object.Destroy((Object)(object)((Component)createdBit).gameObject); } m_createdBits.Clear(); } public void RelinquishCreatedBits() { foreach (HypeTrainBit createdBit in m_createdBits) { createdBit.Rigidbody.isKinematic = false; createdBit.Collider.enabled = true; ((Component)createdBit).transform.SetParent((Transform)null, true); if (m_bitLifetimeInSeconds.HasValue) { createdBit.LifeTime = m_bitLifetimeInSeconds.Value; } createdBit.StartDeathCountdown(); } m_createdBits.Clear(); } } public class HypeTrainBitBoxPlayerCollider : MonoBehaviour { [SerializeField] private SphereCollider m_collider; private HypeTrainBitBox m_owner; private Transform m_playerRoot; public void Init(HypeTrainBitBox owner, Transform playerRoot, float? playerColliderRadius = null) { m_owner = owner; m_playerRoot = playerRoot; if (playerColliderRadius.HasValue) { m_collider.radius = playerColliderRadius.Value; } } private void OnCollisionEnter(Collision other) { if ((Object)null != (Object)(object)m_owner && (Object)(object)other.transform == (Object)(object)m_playerRoot) { m_owner.RelinquishCreatedBits(); } } private void OnTriggerEnter(Collider other) { if ((Object)null != (Object)(object)m_owner && (Object)(object)((Component)other).transform == (Object)(object)m_playerRoot) { m_owner.RelinquishCreatedBits(); } } } public class HypeTrainBox : HypeTrainCar { [SerializeField] private TextMeshPro[] m_nameTexts; private Material m_carMaterial; private Color m_carColor; private float m_carColorRate; private static int s_trimColorMaterialPropertyID = Shader.PropertyToID("_TrimColor"); public virtual void Engage(HypeTrainBoxData data, float distanceToStart, float distanceToStop, int index) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) Engage(distanceToStart, distanceToStop, index); SetName(data.name, data.name_color); SetBoxColor(data.box_color, data.box_color_rate); } public override void UpdateCar(float dt, float delta) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) base.UpdateCar(dt, delta); if (m_carColorRate != 0f) { float num2 = default(float); float num3 = default(float); float num = default(float); Color.RGBToHSV(m_carColor, ref num, ref num2, ref num3); for (num += m_carColorRate * delta; num > 1f; num -= 1f) { } for (; num < 0f; num += 1f) { } SetBoxColor(Color.HSVToRGB(num, num2, num3), m_carColorRate); } } public void SetName(string name, Color nameColor) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) TextMeshPro[] nameTexts = m_nameTexts; foreach (TextMeshPro obj in nameTexts) { ((TMP_Text)obj).SetText(name, true); ((Graphic)obj).color = nameColor; } } public void SetBoxColor(Color color, float carColorRate) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) if ((Object)null == (Object)(object)m_carMaterial) { m_carMaterial = new Material(((Renderer)base.Meshes[0]).material); MeshRenderer[] meshes = base.Meshes; for (int i = 0; i < meshes.Length; i++) { ((Renderer)meshes[i]).material = m_carMaterial; } } m_carColor = color; if ((Object)null != (Object)(object)m_carMaterial) { m_carMaterial.SetColor(s_trimColorMaterialPropertyID, color); } m_carColorRate = carColorRate; } } [Serializable] public class HypeTrainBoxData { public string name = ""; public Color name_color = new Color(1f, 1f, 1f); public Color box_color = new Color(0.3803921f, 0.7960785f, 0.545098f); public float box_color_rate; public int bit_amount; } public class HypeTrainCar : MonoBehaviour { public enum Visibility { Visible, Hidden } public class VisibilityChangedEvent : UnityEvent<HypeTrainCar, Visibility> { } [SerializeField] private Animator m_animatorRoot; [SerializeField] private Animator m_animatorCar; [SerializeField] private Transform m_frontLoc; [SerializeField] private Transform m_backLoc; [SerializeField] private MeshRenderer[] m_meshes = (MeshRenderer[])(object)new MeshRenderer[0]; private VisibilityChangedEvent m_onVisibilityChangedEvent = new VisibilityChangedEvent(); private float m_distanceToStart; private float m_distanceToStop; private static readonly int s_animShowTag = Animator.StringToHash("Show"); private static readonly int s_animHideTag = Animator.StringToHash("Hide"); private static readonly int s_animWobbleTag = Animator.StringToHash("Wobble"); protected MeshRenderer[] Meshes => m_meshes; public Transform FrontLoc => m_frontLoc; public Transform BackLoc => m_backLoc; public VisibilityChangedEvent OnVisibilityChangedEvent => m_onVisibilityChangedEvent; public void Engage(float distanceToStart, float distanceToStop, int index) { m_distanceToStart = distanceToStart; m_distanceToStop = distanceToStop; if (m_distanceToStart <= 0f) { Show(); float num = 5f; m_animatorCar.Play(s_animWobbleTag, 0, (float)index % (num + 1f) / num); } if (m_distanceToStop <= 0f) { Hide(); } } public virtual void UpdateCar(float dt, float delta) { if (m_distanceToStart > 0f) { m_distanceToStart -= delta; if (m_distanceToStart <= 0f) { m_distanceToStart = 0f; Show(); } } if (m_distanceToStop > 0f) { m_distanceToStop -= delta; if (m_distanceToStop <= 0f) { m_distanceToStop = 0f; Hide(); } } } public virtual void Show() { ((Component)this).gameObject.SetActive(true); m_animatorRoot.Play(s_animShowTag, 0, 0f); } public virtual void Hide() { m_animatorRoot.Play(s_animHideTag, 0, 0f); } public float CalculateCarLength() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = m_frontLoc.localPosition - m_backLoc.localPosition; return ((Vector3)(ref val)).magnitude; } protected virtual void OnShowFinished() { ((UnityEvent<HypeTrainCar, Visibility>)m_onVisibilityChangedEvent).Invoke(this, Visibility.Visible); } protected virtual void OnHideFinished() { ((Component)this).gameObject.SetActive(false); ((UnityEvent<HypeTrainCar, Visibility>)m_onVisibilityChangedEvent).Invoke(this, Visibility.Hidden); } } public class HypeTrainCarAudio : MonoBehaviour { [SerializeField] private AudioSource m_carWheelsAudio; [SerializeField] private AudioSource m_carWheelsClankAudio; [SerializeField] private AudioClip[] m_carWheelsClankAudioClips = (AudioClip[])(object)new AudioClip[0]; [SerializeField] private int m_maxSimultaneousClanks = 3; [SerializeField] private float m_clankMinInterval = 0.1f; [SerializeField] private float m_clankMaxInterval = 0.5f; private float m_nextClankTimer; private float[] m_clankTimers; private float m_wheelVolume = 1f; private float m_baseVolume = 1f; private void Awake() { m_clankTimers = new float[m_maxSimultaneousClanks]; } public void StartPersistentSounds() { m_carWheelsAudio.Play(); } public void StopPersistentSounds() { m_carWheelsAudio.Stop(); } public void UpdateAudio(float dt, float delta, HypeTrainLocomotive locomotive, List<HypeTrainBox> activeBoxes, Transform playerRoot) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)locomotive).transform.position; float x = ((Component)locomotive).transform.lossyScale.x; if ((Object)null != (Object)(object)playerRoot) { float num = Vector3.SqrMagnitude(playerRoot.position - position); foreach (HypeTrainBox activeBox in activeBoxes) { float num2 = Vector3.SqrMagnitude(playerRoot.position - ((Component)activeBox).transform.position); if (num2 < num) { num = num2; position = ((Component)activeBox).transform.position; x = ((Component)activeBox).transform.lossyScale.x; } } } position.y += 0.75f; ((Component)this).transform.position = Vector3.MoveTowards(((Component)m_carWheelsAudio).transform.position, position, delta * 4f); m_wheelVolume = Mathf.MoveTowards(m_wheelVolume, x, dt * 2f); AudioSource carWheelsAudio = m_carWheelsAudio; float volume = (m_carWheelsClankAudio.volume = m_baseVolume * m_wheelVolume); carWheelsAudio.volume = volume; if (m_nextClankTimer > 0f) { m_nextClankTimer -= dt; if (m_nextClankTimer <= 0f) { for (int i = 0; i < m_maxSimultaneousClanks; i++) { if (m_clankTimers[i] <= 0f) { AudioClip val = m_carWheelsClankAudioClips[Random.Range(0, m_carWheelsClankAudioClips.Length)]; m_clankTimers[i] = val.length; m_carWheelsClankAudio.PlayOneShot(val); break; } } } } for (int j = 0; j < m_maxSimultaneousClanks; j++) { m_clankTimers[j] -= dt; if (m_clankTimers[j] <= 0f) { while (m_nextClankTimer <= 0f) { m_nextClankTimer += Random.Range(m_clankMinInterval, m_clankMaxInterval); } } } } public void SetBaseVolume(float volume) { m_baseVolume = volume; AudioSource carWheelsAudio = m_carWheelsAudio; float volume2 = (m_carWheelsClankAudio.volume = m_baseVolume * m_wheelVolume); carWheelsAudio.volume = volume2; } } public class HypeTrainLocomotive : HypeTrainCar { [SerializeField] private AudioSource m_audioSource; private float m_baseVolume = 1f; public override void Show() { base.Show(); m_audioSource.Play(); } protected override void OnHideFinished() { base.OnHideFinished(); m_audioSource.Stop(); } public override void UpdateCar(float dt, float delta) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) base.UpdateCar(dt, delta); m_audioSource.volume = m_baseVolume * Mathf.Clamp01(((Component)this).transform.lossyScale.x); } public void SetBaseVolume(float volume) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) m_baseVolume = volume; m_audioSource.volume = m_baseVolume * Mathf.Clamp01(((Component)this).transform.lossyScale.x); } } [Serializable] public class HypeTrainOptions { public int? train_layer; public float? distance_per_second; public float? player_collider_radius; public int? max_bits_per_car; public float? bit_lifetime_in_seconds; public float? volume; public bool? keep_alive_on_finish; }
BepInEx/plugins/MyBox.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Text; using System.Text.RegularExpressions; using JetBrains.Annotations; using MyBox; using MyBox.Internal; using UnityEngine; using UnityEngine.AI; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyVersion("0.0.0.0")] public class FPSCounter : MonoBehaviour { private enum Anchor { LeftTop, LeftBottom, RightTop, RightBottom } public bool EditorOnly; [Separator] [SerializeField] private float _updateInterval = 1f; [SerializeField] private int _targetFrameRate = 30; [Separator] [SerializeField] private Anchor _anchor; [SerializeField] private int _xOffset; [SerializeField] private int _yOffset; private float _idleTime = 2f; private float _elapsed; private int _frames; private int _quantity; private float _fps; private float _averageFps; private Color _goodColor; private Color _okColor; private Color _badColor; private float _okFps; private float _badFps; private Rect _rect1; private Rect _rect2; private void Awake() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) if (!EditorOnly || Application.isEditor) { _goodColor = new Color(0.4f, 0.6f, 0.4f); _okColor = new Color(0.8f, 0.8f, 0.2f, 0.6f); _badColor = new Color(0.8f, 0.6f, 0.6f); int num = _targetFrameRate / 100; int num2 = num * 10; int num3 = num * 40; _okFps = _targetFrameRate - num2; _badFps = _targetFrameRate - num3; int num4 = 0; int num5 = 0; int num6 = 40; int num7 = 90; if (_anchor == Anchor.LeftBottom || _anchor == Anchor.RightBottom) { num5 = Screen.height - num6; } if (_anchor == Anchor.RightTop || _anchor == Anchor.RightBottom) { num4 = Screen.width - num7; } num4 += _xOffset; num5 += _yOffset; int num8 = num5 + 18; _rect1 = new Rect((float)num4, (float)num5, (float)num7, (float)num6); _rect2 = new Rect((float)num4, (float)num8, (float)num7, (float)num6); _elapsed = _updateInterval; } } private void Update() { if (EditorOnly && !Application.isEditor) { return; } if (_idleTime > 0f) { _idleTime -= Time.deltaTime; return; } _elapsed += Time.deltaTime; _frames++; if (_elapsed >= _updateInterval) { _fps = (float)_frames / _elapsed; _elapsed = 0f; _frames = 0; } _quantity++; _averageFps += (_fps - _averageFps) / (float)_quantity; } private void OnGUI() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) //IL_0069: Unknown result type (might be due to invalid IL or missing references) if (!EditorOnly || Application.isEditor) { Color color = GUI.color; Color color2 = _goodColor; if (_fps <= _okFps || _averageFps <= _okFps) { color2 = _okColor; } if (_fps <= _badFps || _averageFps <= _badFps) { color2 = _badColor; } GUI.color = color2; GUI.Label(_rect1, "FPS: " + (int)_fps); GUI.color = color; } } } [CompilerGenerated] [EditorBrowsable(EditorBrowsableState.Never)] [GeneratedCode("Unity.MonoScriptGenerator.MonoScriptInfoGenerator", null)] internal class UnitySourceGeneratedAssemblyMonoScriptTypes_v1 { private struct MonoScriptData { public byte[] FilePathsData; public byte[] TypesData; public int TotalTypes; public int TotalFiles; public bool IsEditorOnly; } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static MonoScriptData Get() { MonoScriptData result = default(MonoScriptData); result.FilePathsData = new byte[8296] { 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 66, 97, 115, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 87, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 65, 117, 116, 111, 80, 114, 111, 112, 101, 114, 116, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 87, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 66, 117, 116, 116, 111, 110, 77, 101, 116, 104, 111, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 90, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 67, 104, 97, 114, 97, 99, 116, 101, 114, 115, 82, 97, 110, 103, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 91, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 70, 105, 101, 108, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 93, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 67, 111, 110, 115, 116, 97, 110, 116, 115, 83, 101, 108, 101, 99, 116, 105, 111, 110, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 88, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 68, 101, 102, 105, 110, 101, 100, 86, 97, 108, 117, 101, 115, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 91, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 68, 105, 115, 112, 108, 97, 121, 73, 110, 115, 112, 101, 99, 116, 111, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 82, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 70, 111, 108, 100, 111, 117, 116, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 94, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 73, 110, 105, 116, 105, 97, 108, 105, 122, 97, 116, 105, 111, 110, 70, 105, 101, 108, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 80, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 76, 97, 121, 101, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 83, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 77, 97, 120, 86, 97, 108, 117, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 4, 0, 0, 0, 86, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 77, 105, 110, 77, 97, 120, 82, 97, 110, 103, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 83, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 77, 105, 110, 86, 97, 108, 117, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 89, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 77, 117, 115, 116, 66, 101, 65, 115, 115, 105, 103, 110, 101, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 88, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 79, 118, 101, 114, 114, 105, 100, 101, 76, 97, 98, 101, 108, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 92, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 80, 111, 115, 105, 116, 105, 118, 101, 86, 97, 108, 117, 101, 79, 110, 108, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 86, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 82, 97, 110, 103, 101, 86, 101, 99, 116, 111, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 83, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 82, 101, 97, 100, 79, 110, 108, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 86, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 82, 101, 103, 101, 120, 83, 116, 114, 105, 110, 103, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 87, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 82, 101, 113, 117, 105, 114, 101, 76, 97, 121, 101, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 85, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 82, 101, 113, 117, 105, 114, 101, 84, 97, 103, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 80, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 83, 99, 101, 110, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 89, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 83, 101, 97, 114, 99, 104, 97, 98, 108, 101, 69, 110, 117, 109, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 84, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 83, 101, 112, 97, 114, 97, 116, 111, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 86, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 83, 112, 114, 105, 116, 101, 76, 97, 121, 101, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 78, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 65, 116, 116, 114, 105, 98, 117, 116, 101, 115, 92, 84, 97, 103, 65, 116, 116, 114, 105, 98, 117, 116, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 78, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 65, 108, 103, 111, 114, 105, 116, 104, 109, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 73, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 67, 111, 108, 111, 114, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 83, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 67, 111, 109, 109, 111, 110, 67, 111, 110, 115, 116, 97, 110, 116, 115, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 78, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 67, 111, 114, 111, 117, 116, 105, 110, 101, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 73, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 68, 101, 98, 117, 103, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 82, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 68, 101, 108, 97, 121, 101, 100, 65, 99, 116, 105, 111, 110, 115, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 78, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 74, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 71, 105, 122, 109, 111, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 73, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 73, 110, 112, 117, 116, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 74, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 76, 97, 121, 101, 114, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 72, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 77, 97, 116, 104, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 78, 97, 118, 77, 101, 115, 104, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 86, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 79, 98, 115, 111, 108, 101, 116, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 80, 104, 121, 115, 105, 99, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 85, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 80, 104, 121, 115, 105, 99, 115, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 78, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 82, 101, 102, 108, 101, 99, 116, 105, 111, 110, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 73, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 82, 101, 103, 101, 120, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 74, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 83, 116, 114, 105, 110, 103, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 84, 101, 120, 116, 117, 114, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 70, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 85, 73, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 88, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 85, 110, 105, 116, 121, 69, 118, 101, 110, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 77, 121, 86, 101, 99, 116, 111, 114, 115, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 89, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 92, 84, 114, 97, 110, 115, 102, 111, 114, 109, 83, 104, 97, 107, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 85, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 70, 101, 97, 116, 117, 114, 101, 115, 92, 73, 80, 114, 101, 112, 97, 114, 101, 70, 101, 97, 116, 117, 114, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 102, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 73, 109, 97, 103, 101, 83, 116, 114, 105, 110, 103, 67, 111, 110, 118, 101, 114, 116, 101, 114, 92, 73, 109, 97, 103, 101, 83, 116, 114, 105, 110, 103, 67, 111, 110, 118, 101, 114, 116, 101, 114, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 85, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 73, 110, 116, 101, 114, 110, 97, 108, 92, 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 68, 97, 116, 97, 46, 99, 115, 0, 0, 0, 3, 0, 0, 0, 74, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 77, 121, 83, 99, 101, 110, 101, 66, 117, 110, 100, 108, 101, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 69, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 84, 105, 109, 101, 84, 101, 115, 116, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 74, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 85, 110, 100, 111, 110, 101, 92, 71, 76, 68, 114, 97, 119, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 76, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 85, 110, 100, 111, 110, 101, 92, 77, 121, 76, 111, 103, 103, 101, 114, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 73, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 111, 111, 108, 115, 92, 87, 97, 114, 110, 105, 110, 103, 115, 80, 111, 111, 108, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 65, 99, 116, 105, 118, 101, 83, 116, 97, 116, 101, 79, 110, 83, 116, 97, 114, 116, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 84, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 65, 110, 105, 109, 97, 116, 105, 111, 110, 83, 116, 97, 116, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 76, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 65, 115, 115, 101, 116, 70, 111, 108, 100, 101, 114, 80, 97, 116, 104, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 70, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 65, 115, 115, 101, 116, 80, 97, 116, 104, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 70, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 66, 105, 108, 108, 98, 111, 97, 114, 100, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 78, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 87, 114, 97, 112, 112, 101, 114, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 74, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 67, 111, 108, 108, 105, 100, 101, 114, 71, 105, 122, 109, 111, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 67, 111, 108, 108, 105, 100, 101, 114, 84, 111, 77, 101, 115, 104, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 80, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 67, 111, 109, 109, 101, 110, 116, 97, 114, 121, 67, 111, 109, 112, 111, 110, 101, 110, 116, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 67, 111, 114, 111, 117, 116, 105, 110, 101, 71, 114, 111, 117, 112, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 71, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 70, 80, 83, 67, 111, 117, 110, 116, 101, 114, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 71, 85, 73, 68, 92, 71, 117, 105, 100, 67, 111, 109, 112, 111, 110, 101, 110, 116, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 77, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 71, 85, 73, 68, 92, 71, 117, 105, 100, 77, 97, 110, 97, 103, 101, 114, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 71, 85, 73, 68, 92, 71, 117, 105, 100, 82, 101, 102, 101, 114, 101, 110, 99, 101, 46, 99, 115, 0, 0, 0, 3, 0, 0, 0, 67, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 77, 105, 110, 77, 97, 120, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 69, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 77, 121, 67, 117, 114, 115, 111, 114, 46, 99, 115, 0, 0, 0, 3, 0, 0, 0, 73, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 77, 121, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 46, 99, 115, 0, 0, 0, 8, 0, 0, 0, 69, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 79, 112, 116, 105, 111, 110, 97, 108, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 79, 112, 116, 105, 111, 110, 97, 108, 77, 105, 110, 77, 97, 120, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 76, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 66, 111, 111, 108, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 77, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 70, 108, 111, 97, 116, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 73, 110, 116, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 78, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 83, 116, 114, 105, 110, 103, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 76, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 84, 121, 112, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 50, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 82, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 50, 73, 110, 116, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 51, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 82, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 51, 73, 110, 116, 46, 99, 115, 0, 0, 0, 7, 0, 0, 0, 72, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 46, 99, 115, 0, 0, 0, 2, 0, 0, 0, 75, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 83, 99, 101, 110, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 70, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 83, 105, 110, 103, 108, 101, 116, 111, 110, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 74, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 84, 114, 97, 110, 115, 102, 111, 114, 109, 68, 97, 116, 97, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 69, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 85, 73, 70, 111, 108, 108, 111, 119, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 85, 73, 73, 109, 97, 103, 101, 66, 97, 115, 101, 100, 66, 117, 116, 116, 111, 110, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 79, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 85, 73, 82, 101, 108, 97, 116, 105, 118, 101, 80, 111, 115, 105, 116, 105, 111, 110, 46, 99, 115, 0, 0, 0, 1, 0, 0, 0, 69, 92, 76, 105, 98, 114, 97, 114, 121, 92, 80, 97, 99, 107, 97, 103, 101, 67, 97, 99, 104, 101, 92, 99, 111, 109, 46, 100, 111, 109, 121, 98, 101, 115, 116, 46, 109, 121, 98, 111, 120, 64, 101, 54, 48, 102, 52, 55, 55, 101, 51, 52, 92, 84, 121, 112, 101, 115, 92, 85, 73, 83, 105, 122, 101, 66, 121, 46, 99, 115 }; result.TypesData = new byte[3451] { 0, 0, 0, 0, 28, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 65, 116, 116, 114, 105, 98, 117, 116, 101, 66, 97, 115, 101, 0, 0, 0, 0, 27, 77, 121, 66, 111, 120, 124, 65, 117, 116, 111, 80, 114, 111, 112, 101, 114, 116, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 27, 77, 121, 66, 111, 120, 124, 66, 117, 116, 116, 111, 110, 77, 101, 116, 104, 111, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 30, 77, 121, 66, 111, 120, 124, 67, 104, 97, 114, 97, 99, 116, 101, 114, 115, 82, 97, 110, 103, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 31, 77, 121, 66, 111, 120, 124, 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 70, 105, 101, 108, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 33, 77, 121, 66, 111, 120, 124, 67, 111, 110, 115, 116, 97, 110, 116, 115, 83, 101, 108, 101, 99, 116, 105, 111, 110, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 28, 77, 121, 66, 111, 120, 124, 68, 101, 102, 105, 110, 101, 100, 86, 97, 108, 117, 101, 115, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 31, 77, 121, 66, 111, 120, 124, 68, 105, 115, 112, 108, 97, 121, 73, 110, 115, 112, 101, 99, 116, 111, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 22, 77, 121, 66, 111, 120, 124, 70, 111, 108, 100, 111, 117, 116, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 34, 77, 121, 66, 111, 120, 124, 73, 110, 105, 116, 105, 97, 108, 105, 122, 97, 116, 105, 111, 110, 70, 105, 101, 108, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 76, 97, 121, 101, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 124, 77, 97, 120, 86, 97, 108, 117, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 124, 77, 105, 110, 77, 97, 120, 82, 97, 110, 103, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 17, 77, 121, 66, 111, 120, 124, 82, 97, 110, 103, 101, 100, 70, 108, 111, 97, 116, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 82, 97, 110, 103, 101, 100, 73, 110, 116, 0, 0, 0, 0, 22, 77, 121, 66, 111, 120, 124, 82, 97, 110, 103, 101, 100, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 124, 77, 105, 110, 86, 97, 108, 117, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 29, 77, 121, 66, 111, 120, 124, 77, 117, 115, 116, 66, 101, 65, 115, 115, 105, 103, 110, 101, 100, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 28, 77, 121, 66, 111, 120, 124, 79, 118, 101, 114, 114, 105, 100, 101, 76, 97, 98, 101, 108, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 32, 77, 121, 66, 111, 120, 124, 80, 111, 115, 105, 116, 105, 118, 101, 86, 97, 108, 117, 101, 79, 110, 108, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 124, 82, 97, 110, 103, 101, 86, 101, 99, 116, 111, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 124, 82, 101, 97, 100, 79, 110, 108, 121, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 124, 82, 101, 103, 101, 120, 83, 116, 114, 105, 110, 103, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 27, 77, 121, 66, 111, 120, 124, 82, 101, 113, 117, 105, 114, 101, 76, 97, 121, 101, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 25, 77, 121, 66, 111, 120, 124, 82, 101, 113, 117, 105, 114, 101, 84, 97, 103, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 83, 99, 101, 110, 101, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 29, 77, 121, 66, 111, 120, 124, 83, 101, 97, 114, 99, 104, 97, 98, 108, 101, 69, 110, 117, 109, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 24, 77, 121, 66, 111, 120, 124, 83, 101, 112, 97, 114, 97, 116, 111, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 124, 83, 112, 114, 105, 116, 101, 76, 97, 121, 101, 114, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 18, 77, 121, 66, 111, 120, 124, 84, 97, 103, 65, 116, 116, 114, 105, 98, 117, 116, 101, 0, 0, 0, 0, 18, 77, 121, 66, 111, 120, 124, 77, 121, 65, 108, 103, 111, 114, 105, 116, 104, 109, 115, 0, 0, 0, 0, 19, 77, 121, 66, 111, 120, 124, 77, 121, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 0, 0, 0, 0, 13, 77, 121, 66, 111, 120, 124, 77, 121, 67, 111, 108, 111, 114, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 124, 77, 121, 67, 111, 109, 109, 111, 110, 67, 111, 110, 115, 116, 97, 110, 116, 115, 0, 0, 0, 0, 18, 77, 121, 66, 111, 120, 124, 77, 121, 67, 111, 114, 111, 117, 116, 105, 110, 101, 115, 0, 0, 0, 0, 29, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 67, 111, 114, 111, 117, 116, 105, 110, 101, 79, 119, 110, 101, 114, 0, 0, 0, 0, 13, 77, 121, 66, 111, 120, 124, 77, 121, 68, 101, 98, 117, 103, 0, 0, 0, 0, 22, 77, 121, 66, 111, 120, 124, 77, 121, 68, 101, 108, 97, 121, 101, 100, 65, 99, 116, 105, 111, 110, 115, 0, 0, 0, 0, 18, 77, 121, 66, 111, 120, 124, 77, 121, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 0, 0, 0, 0, 39, 77, 121, 66, 111, 120, 46, 77, 121, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 124, 67, 111, 109, 112, 111, 110, 101, 110, 116, 79, 102, 73, 110, 116, 101, 114, 102, 97, 99, 101, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 77, 121, 71, 105, 122, 109, 111, 115, 0, 0, 0, 0, 13, 77, 121, 66, 111, 120, 124, 77, 121, 73, 110, 112, 117, 116, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 77, 121, 76, 97, 121, 101, 114, 115, 0, 0, 0, 0, 12, 77, 121, 66, 111, 120, 124, 77, 121, 77, 97, 116, 104, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 77, 121, 78, 97, 118, 77, 101, 115, 104, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 124, 77, 121, 79, 98, 115, 111, 108, 101, 116, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 77, 121, 80, 104, 121, 115, 105, 99, 115, 0, 0, 0, 0, 25, 77, 121, 66, 111, 120, 124, 77, 121, 80, 104, 121, 115, 105, 99, 115, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 0, 0, 0, 0, 18, 77, 121, 66, 111, 120, 124, 77, 121, 82, 101, 102, 108, 101, 99, 116, 105, 111, 110, 0, 0, 0, 0, 13, 77, 121, 66, 111, 120, 124, 77, 121, 82, 101, 103, 101, 120, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 77, 121, 83, 116, 114, 105, 110, 103, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 77, 121, 84, 101, 120, 116, 117, 114, 101, 0, 0, 0, 0, 10, 77, 121, 66, 111, 120, 124, 77, 121, 85, 73, 0, 0, 0, 0, 28, 77, 121, 66, 111, 120, 124, 77, 121, 85, 110, 105, 116, 121, 69, 118, 101, 110, 116, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 77, 121, 86, 101, 99, 116, 111, 114, 115, 0, 0, 0, 0, 29, 77, 121, 66, 111, 120, 124, 84, 114, 97, 110, 115, 102, 111, 114, 109, 83, 104, 97, 107, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 73, 80, 114, 101, 112, 97, 114, 101, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 124, 73, 109, 97, 103, 101, 83, 116, 114, 105, 110, 103, 67, 111, 110, 118, 101, 114, 116, 101, 114, 0, 0, 0, 0, 30, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 67, 111, 110, 100, 105, 116, 105, 111, 110, 97, 108, 68, 97, 116, 97, 0, 0, 0, 0, 19, 77, 121, 66, 111, 120, 124, 77, 121, 83, 99, 101, 110, 101, 66, 117, 110, 100, 108, 101, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 83, 99, 101, 110, 101, 66, 117, 110, 100, 108, 101, 0, 0, 0, 0, 21, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 66, 117, 110, 100, 108, 101, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 84, 105, 109, 101, 84, 101, 115, 116, 0, 0, 0, 0, 27, 77, 121, 66, 111, 120, 46, 84, 105, 109, 101, 84, 101, 115, 116, 124, 84, 105, 109, 101, 84, 101, 115, 116, 68, 97, 116, 97, 0, 0, 0, 0, 21, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 71, 76, 68, 114, 97, 119, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 77, 121, 76, 111, 103, 103, 101, 114, 0, 0, 0, 0, 18, 77, 121, 66, 111, 120, 124, 87, 97, 114, 110, 105, 110, 103, 115, 80, 111, 111, 108, 0, 0, 0, 0, 24, 77, 121, 66, 111, 120, 124, 65, 99, 116, 105, 118, 101, 83, 116, 97, 116, 101, 79, 110, 83, 116, 97, 114, 116, 0, 0, 0, 0, 29, 77, 121, 66, 111, 120, 124, 65, 110, 105, 109, 97, 116, 105, 111, 110, 83, 116, 97, 116, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 0, 0, 0, 0, 38, 77, 121, 66, 111, 120, 124, 65, 110, 105, 109, 97, 116, 105, 111, 110, 83, 116, 97, 116, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 69, 120, 116, 101, 110, 115, 105, 111, 110, 0, 0, 0, 0, 21, 77, 121, 66, 111, 120, 124, 65, 115, 115, 101, 116, 70, 111, 108, 100, 101, 114, 80, 97, 116, 104, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 65, 115, 115, 101, 116, 80, 97, 116, 104, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 66, 105, 108, 108, 98, 111, 97, 114, 100, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 124, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 87, 114, 97, 112, 112, 101, 114, 0, 0, 0, 0, 36, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 87, 114, 97, 112, 112, 101, 114, 66, 97, 115, 101, 0, 0, 0, 0, 19, 77, 121, 66, 111, 120, 124, 67, 111, 108, 108, 105, 100, 101, 114, 71, 105, 122, 109, 111, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 67, 111, 108, 108, 105, 100, 101, 114, 84, 111, 77, 101, 115, 104, 0, 0, 0, 0, 33, 77, 121, 66, 111, 120, 46, 67, 111, 108, 108, 105, 100, 101, 114, 84, 111, 77, 101, 115, 104, 124, 84, 114, 105, 97, 110, 103, 117, 108, 97, 116, 111, 114, 0, 0, 0, 0, 34, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 67, 111, 109, 109, 101, 110, 116, 97, 114, 121, 67, 111, 109, 112, 111, 110, 101, 110, 116, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 67, 111, 114, 111, 117, 116, 105, 110, 101, 71, 114, 111, 117, 112, 0, 0, 0, 0, 11, 124, 70, 80, 83, 67, 111, 117, 110, 116, 101, 114, 0, 0, 0, 0, 19, 77, 121, 66, 111, 120, 124, 71, 117, 105, 100, 67, 111, 109, 112, 111, 110, 101, 110, 116, 0, 0, 0, 0, 17, 77, 121, 66, 111, 120, 124, 71, 117, 105, 100, 77, 97, 110, 97, 103, 101, 114, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 46, 71, 117, 105, 100, 77, 97, 110, 97, 103, 101, 114, 124, 71, 117, 105, 100, 73, 110, 102, 111, 0, 0, 0, 0, 19, 77, 121, 66, 111, 120, 124, 71, 117, 105, 100, 82, 101, 102, 101, 114, 101, 110, 99, 101, 0, 0, 0, 0, 17, 77, 121, 66, 111, 120, 124, 77, 105, 110, 77, 97, 120, 70, 108, 111, 97, 116, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 77, 105, 110, 77, 97, 120, 73, 110, 116, 0, 0, 0, 0, 22, 77, 121, 66, 111, 120, 124, 77, 105, 110, 77, 97, 120, 69, 120, 116, 101, 110, 115, 105, 111, 110, 115, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 77, 121, 67, 117, 114, 115, 111, 114, 0, 0, 0, 0, 18, 77, 121, 66, 111, 120, 124, 77, 121, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 0, 0, 0, 0, 30, 77, 121, 66, 111, 120, 46, 77, 121, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 124, 80, 114, 105, 109, 101, 72, 101, 108, 112, 101, 114, 0, 0, 0, 0, 29, 77, 121, 66, 111, 120, 46, 77, 121, 68, 105, 99, 116, 105, 111, 110, 97, 114, 121, 124, 69, 110, 117, 109, 101, 114, 97, 116, 111, 114, 0, 0, 0, 0, 19, 77, 121, 66, 111, 120, 124, 79, 112, 116, 105, 111, 110, 97, 108, 70, 108, 111, 97, 116, 0, 0, 0, 0, 17, 77, 121, 66, 111, 120, 124, 79, 112, 116, 105, 111, 110, 97, 108, 73, 110, 116, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 79, 112, 116, 105, 111, 110, 97, 108, 83, 116, 114, 105, 110, 103, 0, 0, 0, 0, 21, 77, 121, 66, 111, 120, 124, 79, 112, 116, 105, 111, 110, 97, 108, 75, 101, 121, 67, 111, 100, 101, 0, 0, 0, 0, 24, 77, 121, 66, 111, 120, 124, 79, 112, 116, 105, 111, 110, 97, 108, 71, 97, 109, 101, 79, 98, 106, 101, 99, 116, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 124, 79, 112, 116, 105, 111, 110, 97, 108, 67, 111, 109, 112, 111, 110, 101, 110, 116, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 79, 112, 116, 105, 111, 110, 97, 108, 0, 0, 0, 0, 29, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 79, 112, 116, 105, 111, 110, 97, 108, 80, 97, 114, 101, 110, 116, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 79, 112, 116, 105, 111, 110, 97, 108, 77, 105, 110, 77, 97, 120, 0, 0, 0, 0, 21, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 66, 111, 111, 108, 0, 0, 0, 0, 22, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 70, 108, 111, 97, 116, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 73, 110, 116, 0, 0, 0, 0, 23, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 83, 116, 114, 105, 110, 103, 0, 0, 0, 0, 30, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 84, 121, 112, 101, 0, 0, 0, 0, 24, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 50, 0, 0, 0, 0, 27, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 50, 73, 110, 116, 0, 0, 0, 0, 24, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 51, 0, 0, 0, 0, 27, 77, 121, 66, 111, 120, 124, 80, 108, 97, 121, 101, 114, 80, 114, 101, 102, 115, 86, 101, 99, 116, 111, 114, 51, 73, 110, 116, 0, 0, 0, 0, 27, 77, 121, 66, 111, 120, 124, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 71, 97, 109, 101, 79, 98, 106, 101, 99, 116, 0, 0, 0, 0, 31, 77, 121, 66, 111, 120, 124, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 71, 97, 109, 101, 79, 98, 106, 101, 99, 116, 76, 105, 115, 116, 0, 0, 0, 0, 26, 77, 121, 66, 111, 120, 124, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 84, 114, 97, 110, 115, 102, 111, 114, 109, 0, 0, 0, 0, 30, 77, 121, 66, 111, 120, 124, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 84, 114, 97, 110, 115, 102, 111, 114, 109, 76, 105, 115, 116, 0, 0, 0, 0, 17, 77, 121, 66, 111, 120, 124, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 0, 0, 0, 0, 21, 77, 121, 66, 111, 120, 124, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 76, 105, 115, 116, 0, 0, 0, 0, 30, 77, 121, 66, 111, 120, 46, 73, 110, 116, 101, 114, 110, 97, 108, 124, 82, 101, 111, 114, 100, 101, 114, 97, 98, 108, 101, 66, 97, 115, 101, 0, 0, 0, 0, 20, 77, 121, 66, 111, 120, 124, 83, 99, 101, 110, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 0, 0, 0, 0, 39, 77, 121, 66, 111, 120, 46, 83, 99, 101, 110, 101, 82, 101, 102, 101, 114, 101, 110, 99, 101, 124, 83, 99, 101, 110, 101, 76, 111, 97, 100, 69, 120, 99, 101, 112, 116, 105, 111, 110, 0, 0, 0, 0, 15, 77, 121, 66, 111, 120, 124, 83, 105, 110, 103, 108, 101, 116, 111, 110, 0, 0, 0, 0, 19, 77, 121, 66, 111, 120, 124, 84, 114, 97, 110, 115, 102, 111, 114, 109, 68, 97, 116, 97, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 85, 73, 70, 111, 108, 108, 111, 119, 0, 0, 0, 0, 24, 77, 121, 66, 111, 120, 124, 85, 73, 73, 109, 97, 103, 101, 66, 97, 115, 101, 100, 66, 117, 116, 116, 111, 110, 0, 0, 0, 0, 24, 77, 121, 66, 111, 120, 124, 85, 73, 82, 101, 108, 97, 116, 105, 118, 101, 80, 111, 115, 105, 116, 105, 111, 110, 0, 0, 0, 0, 14, 77, 121, 66, 111, 120, 124, 85, 73, 83, 105, 122, 101, 66, 121 }; result.TotalFiles = 95; result.TotalTypes = 125; result.IsEditorOnly = false; return result; } } namespace MyBox { [AttributeUsage(AttributeTargets.Field)] public class AutoPropertyAttribute : PropertyAttribute { public readonly AutoPropertyMode Mode; public readonly string PredicateMethodName; public readonly Type PredicateMethodTarget; public readonly bool AllowEmpty; public AutoPropertyAttribute(AutoPropertyMode mode = AutoPropertyMode.Children, string predicateMethodName = null, Type predicateMethodTarget = null, bool allowEmpty = false) { Mode = mode; PredicateMethodTarget = predicateMethodTarget; PredicateMethodName = predicateMethodName; AllowEmpty = allowEmpty; } } public enum AutoPropertyMode { Children, Parent, Scene, Asset, Any } [AttributeUsage(AttributeTargets.Method)] public class ButtonMethodAttribute : PropertyAttribute { public readonly ButtonMethodDrawOrder DrawOrder; public readonly ConditionalData Condition; public ButtonMethodAttribute(ButtonMethodDrawOrder drawOrder = ButtonMethodDrawOrder.AfterInspector) { DrawOrder = drawOrder; } public ButtonMethodAttribute(ButtonMethodDrawOrder drawOrder, string fieldToCheck, bool inverse = false, params object[] compareValues) { ConditionalData condition = new ConditionalData(fieldToCheck, inverse, compareValues); DrawOrder = drawOrder; Condition = condition; } public ButtonMethodAttribute(ButtonMethodDrawOrder drawOrder, string[] fieldToCheck, bool[] inverse = null, params object[] compare) { ConditionalData condition = new ConditionalData(fieldToCheck, inverse, compare); DrawOrder = drawOrder; Condition = condition; } public ButtonMethodAttribute(ButtonMethodDrawOrder drawOrder, params string[] fieldToCheck) { ConditionalData condition = new ConditionalData(fieldToCheck); DrawOrder = drawOrder; Condition = condition; } public ButtonMethodAttribute(ButtonMethodDrawOrder drawOrder, bool useMethod, string method, bool inverse = false) { ConditionalData condition = new ConditionalData(useMethod, method, inverse); DrawOrder = drawOrder; Condition = condition; } } public enum ButtonMethodDrawOrder { BeforeInspector, AfterInspector } public class CharactersRangeAttribute : PropertyAttribute { public readonly string Characters; public readonly CharacterRangeMode Mode; public readonly bool IgnoreCase; public CharactersRangeAttribute(string characters, CharacterRangeMode mode = CharacterRangeMode.Allow, bool ignoreCase = true) { Characters = characters; Mode = mode; IgnoreCase = ignoreCase; } } public enum CharacterRangeMode { Allow, Disallow, WarningIfAny, WarningIfNotMatch } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] public class ConditionalFieldAttribute : PropertyAttribute { public readonly ConditionalData Data; public bool IsSet { get { if (Data != null) { return Data.IsSet; } return false; } } public ConditionalFieldAttribute(string fieldToCheck, bool inverse = false, params object[] compareValues) { Data = new ConditionalData(fieldToCheck, inverse, compareValues); } public ConditionalFieldAttribute(string[] fieldToCheck, bool[] inverse = null, params object[] compare) { Data = new ConditionalData(fieldToCheck, inverse, compare); } public ConditionalFieldAttribute(params string[] fieldToCheck) { Data = new ConditionalData(fieldToCheck); } public ConditionalFieldAttribute(bool useMethod, string method, bool inverse = false) { Data = new ConditionalData(useMethod, method, inverse); } } public class ConstantsSelectionAttribute : PropertyAttribute { public readonly Type SelectFromType; public ConstantsSelectionAttribute(Type type) { SelectFromType = type; } } public class DefinedValuesAttribute : PropertyAttribute { public readonly object[] ValuesArray; public readonly string[] LabelsArray; public readonly string UseMethod; public DefinedValuesAttribute(params object[] definedValues) { ValuesArray = definedValues; } public DefinedValuesAttribute(bool withLabels, params object[] definedValues) { int num = definedValues.Length / 2; ValuesArray = new object[num]; LabelsArray = new string[num]; int num2 = 0; int num3; for (num3 = 0; num3 < definedValues.Length; num3++) { ValuesArray[num2] = definedValues[num3]; LabelsArray[num2] = definedValues[++num3].ToString(); num2++; } } public DefinedValuesAttribute(string method) { UseMethod = method; } } public class DisplayInspectorAttribute : PropertyAttribute { public readonly bool DisplayScript; public DisplayInspectorAttribute(bool displayScriptField = true) { DisplayScript = displayScriptField; } } public class FoldoutAttribute : PropertyAttribute { public readonly string Name; public readonly bool FoldEverything; public FoldoutAttribute(string name, bool foldEverything = false) { FoldEverything = foldEverything; Name = name; } } public class InitializationFieldAttribute : PropertyAttribute { } public class LayerAttribute : PropertyAttribute { } public class MaxValueAttribute : AttributeBase { private readonly float _x; private readonly float _y; private readonly float _z; private readonly bool _vectorValuesSet; public MaxValueAttribute(float value) { _x = value; } public MaxValueAttribute(float x, float y, float z) { _x = x; _y = y; _z = z; _vectorValuesSet = true; } } public class MinMaxRangeAttribute : PropertyAttribute { public readonly float Min; public readonly float Max; public MinMaxRangeAttribute(float min, float max) { Min = min; Max = max; } } [Serializable] public struct RangedFloat { public float Min; public float Max; public RangedFloat(float min, float max) { Min = min; Max = max; } } [Serializable] public struct RangedInt { public int Min; public int Max; public RangedInt(int min, int max) { Min = min; Max = max; } } public static class RangedExtensions { public static float LerpFromRange(this RangedFloat ranged, float t) { return Mathf.Lerp(ranged.Min, ranged.Max, t); } public static float LerpFromRangeUnclamped(this RangedFloat ranged, float t) { return Mathf.LerpUnclamped(ranged.Min, ranged.Max, t); } public static float LerpFromRange(this RangedInt ranged, float t) { return Mathf.Lerp((float)ranged.Min, (float)ranged.Max, t); } public static float LerpFromRangeUnclamped(this RangedInt ranged, float t) { return Mathf.LerpUnclamped((float)ranged.Min, (float)ranged.Max, t); } } public class MinValueAttribute : AttributeBase { private readonly float _x; private readonly float _y; private readonly float _z; private readonly bool _vectorValuesSet; public MinValueAttribute(float value) { _x = value; } public MinValueAttribute(float x, float y, float z) { _x = x; _y = y; _z = z; _vectorValuesSet = true; } } [AttributeUsage(AttributeTargets.Field)] public class MustBeAssignedAttribute : PropertyAttribute { } public class OverrideLabelAttribute : PropertyAttribute { public readonly string NewLabel; public OverrideLabelAttribute(string newLabel) { NewLabel = newLabel; } } public class PositiveValueOnlyAttribute : PropertyAttribute { } [AttributeUsage(AttributeTargets.Field)] public sealed class RangeVectorAttribute : PropertyAttribute { public readonly Vector3 min = Vector3.zero; public readonly Vector3 max = Vector3.zero; public bool Valid { get; } = true; public RangeVectorAttribute(float[] min, float[] max) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (min.Length > 3 || max.Length > 3) { Valid = false; return; } switch (min.Length) { case 3: this.min.x = min[0]; this.min.y = min[1]; this.min.z = min[2]; break; case 2: this.min.x = min[0]; this.min.y = min[1]; break; case 1: this.min.x = min[0]; break; } switch (max.Length) { case 3: this.max.x = max[0]; this.max.y = max[1]; this.max.z = max[2]; break; case 2: this.max.x = max[0]; this.max.y = max[1]; break; case 1: this.max.x = max[0]; break; } } } public class ReadOnlyAttribute : ConditionalFieldAttribute { public ReadOnlyAttribute(string fieldToCheck, bool inverse = false, params object[] compareValues) : base(fieldToCheck, inverse, compareValues) { } public ReadOnlyAttribute(string[] fieldToCheck, bool[] inverse = null, params object[] compare) : base(fieldToCheck, inverse, compare) { } public ReadOnlyAttribute(params string[] fieldToCheck) : base(fieldToCheck) { } public ReadOnlyAttribute(bool useMethod, string method, bool inverse = false) : base(useMethod, method, inverse) { } } public class RegexStringAttribute : PropertyAttribute { public readonly Regex Regex; public readonly RegexStringMode AttributeMode; public RegexStringAttribute(string regex, RegexStringMode mode = RegexStringMode.Match, RegexOptions options = RegexOptions.None) { Regex = new Regex(regex, options); AttributeMode = mode; } } public enum RegexStringMode { Match, Replace, WarningIfMatch, WarningIfNotMatch } [AttributeUsage(AttributeTargets.Class)] public class RequireLayerAttribute : Attribute { public readonly string LayerName; public readonly int LayerIndex = -1; public RequireLayerAttribute(string layer) { LayerName = layer; } public RequireLayerAttribute(int layer) { LayerIndex = layer; } } [AttributeUsage(AttributeTargets.Class)] public class RequireTagAttribute : Attribute { public string Tag; public RequireTagAttribute(string tag) { Tag = tag; } } [AttributeUsage(AttributeTargets.Field)] public class SceneAttribute : PropertyAttribute { } public class SearchableEnumAttribute : PropertyAttribute { } public class SeparatorAttribute : PropertyAttribute { public readonly string Title; public readonly bool WithOffset; public SeparatorAttribute() { Title = ""; } public SeparatorAttribute(string title, bool withOffset = false) { Title = title; WithOffset = withOffset; } } public class SpriteLayerAttribute : PropertyAttribute { } public class TagAttribute : PropertyAttribute { } [PublicAPI] public static class MyAlgorithms { public static T Cast<T>(this IConvertible source) { return (T)Convert.ChangeType(source, typeof(T)); } public static bool Is<T>(this object source) { return source is T; } public static T As<T>(this object source) where T : class { return source as T; } public static T Pipe<T>(this T argument, Action<T> action) { action(argument); return argument; } public static TResult Pipe<T, TResult>(this T argument, Func<T, TResult> function) { return function(argument); } public static T PipeKeep<T, TResult>(this T argument, Func<T, TResult> function) { function(argument); return argument; } } [PublicAPI] public static class MyCollections { public static T[] InsertAt<T>(this T[] array, int index) { if (index < 0) { Debug.LogError((object)"Index is less than zero. Array is not modified"); return array; } if (index > array.Length) { Debug.LogError((object)"Index exceeds array length. Array is not modified"); return array; } T[] array2 = new T[array.Length + 1]; int num = 0; for (int i = 0; i < array2.Length; i++) { if (i != index) { array2[i] = array[num]; num++; } } return array2; } public static T[] RemoveAt<T>(this T[] array, int index) { if (index < 0) { Debug.LogError((object)"Index is less than zero. Array is not modified"); return array; } if (index >= array.Length) { Debug.LogError((object)"Index exceeds array length. Array is not modified"); return array; } T[] array2 = new T[array.Length - 1]; int num = 0; for (int i = 0; i < array.Length; i++) { if (i != index) { array2[num] = array[i]; num++; } } return array2; } public static T GetRandom<T>(this T[] collection) { return collection[Random.Range(0, collection.Length)]; } public static T GetRandom<T>(this IList<T> collection) { return collection[Random.Range(0, collection.Count)]; } public static T GetRandom<T>(this IEnumerable<T> collection) { return collection.ElementAt(Random.Range(0, collection.Count())); } public static bool IsNullOrEmpty<T>(this T[] collection) { if (collection != null) { return collection.Length == 0; } return true; } public static bool IsNullOrEmpty<T>(this IList<T> collection) { if (collection != null) { return collection.Count == 0; } return true; } public static bool IsNullOrEmpty<T>(this IEnumerable<T> collection) { if (collection != null) { return !collection.Any(); } return true; } public static bool NotNullOrEmpty<T>(this T[] collection) { return !collection.IsNullOrEmpty(); } public static bool NotNullOrEmpty<T>(this IList<T> collection) { return !collection.IsNullOrEmpty(); } public static bool NotNullOrEmpty<T>(this IEnumerable<T> collection) { return !collection.IsNullOrEmpty(); } public static int NextIndexInCircle<T>(this T[] array, int desiredPosition) { if (array.IsNullOrEmpty()) { Debug.LogError((object)"NextIndexInCircle Caused: source array is null or empty"); return -1; } int num = array.Length; if (num == 1) { return 0; } return (desiredPosition % num + num) % num; } public static int IndexOfItem<T>(this IEnumerable<T> collection, T item) { if (collection == null) { Debug.LogError((object)"IndexOfItem Caused: source collection is null"); return -1; } int num = 0; foreach (T item2 in collection) { if (object.Equals(item2, item)) { return num; } num++; } return -1; } public static bool ContentsMatch<T>(this IEnumerable<T> first, IEnumerable<T> second) { if (first.IsNullOrEmpty() && second.IsNullOrEmpty()) { return true; } if (first.IsNullOrEmpty() || second.IsNullOrEmpty()) { return false; } int num = first.Count(); int num2 = second.Count(); if (num != num2) { return false; } foreach (T item in first) { if (!second.Contains(item)) { return false; } } return true; } public static bool ContentsMatchKeys<T1, T2>(this IDictionary<T1, T2> source, IEnumerable<T1> check) { if (source.IsNullOrEmpty() && check.IsNullOrEmpty()) { return true; } if (source.IsNullOrEmpty() || check.IsNullOrEmpty()) { return false; } return source.Keys.ContentsMatch(check); } public static bool ContentsMatchValues<T1, T2>(this IDictionary<T1, T2> source, IEnumerable<T2> check) { if (source.IsNullOrEmpty() && check.IsNullOrEmpty()) { return true; } if (source.IsNullOrEmpty() || check.IsNullOrEmpty()) { return false; } return source.Values.ContentsMatch(check); } public static TValue GetOrAddDefault<TKey, TValue>(this IDictionary<TKey, TValue> source, TKey key) where TValue : new() { if (!source.ContainsKey(key)) { source[key] = new TValue(); } return source[key]; } public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> source, TKey key, TValue value) { if (!source.ContainsKey(key)) { source[key] = value; } return source[key]; } public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> source, TKey key, Func<TValue> valueFactory) { if (!source.ContainsKey(key)) { source[key] = valueFactory(); } return source[key]; } public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> source, TKey key, Func<TKey, TValue> valueFactory) { if (!source.ContainsKey(key)) { source[key] = valueFactory(key); } return source[key]; } public static TValue GetOrAdd<TKey, TValue, TArg>(this IDictionary<TKey, TValue> source, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) { if (!source.ContainsKey(key)) { source[key] = valueFactory(key, factoryArgument); } return source[key]; } public static IEnumerable<T> ForEach<T>(this IEnumerable<T> source, Action<T> action) { foreach (T item in source) { action(item); } return source; } public static IEnumerable<T> ForEach<T, R>(this IEnumerable<T> source, Func<T, R> func) { foreach (T item in source) { func(item); } return source; } public static IEnumerable<T> ForEach<T>(this IEnumerable<T> source, Action<T, int> action) { int num = 0; foreach (T item in source) { action(item, num); num++; } return source; } public static IEnumerable<T> ForEach<T, R>(this IEnumerable<T> source, Func<T, int, R> func) { int num = 0; foreach (T item in source) { func(item, num); num++; } return source; } public static T MaxBy<T, S>(this IEnumerable<T> source, Func<T, S> selector) where S : IComparable<S> { if (source.IsNullOrEmpty()) { Debug.LogError((object)"MaxBy Caused: source collection is null or empty"); return default(T); } return source.Aggregate((T e, T n) => (selector(e).CompareTo(selector(n)) <= 0) ? n : e); } public static T MinBy<T, S>(this IEnumerable<T> source, Func<T, S> selector) where S : IComparable<S> { if (source.IsNullOrEmpty()) { Debug.LogError((object)"MinBy Caused: source collection is null or empty"); return default(T); } return source.Aggregate((T e, T n) => (selector(e).CompareTo(selector(n)) >= 0) ? n : e); } public static IEnumerable<T> SingleToEnumerable<T>(this T source) { return Enumerable.Empty<T>().Append(source); } public static int FirstIndex<T>(this IList<T> source, Predicate<T> predicate) { for (int i = 0; i < source.Count; i++) { if (predicate(source[i])) { return i; } } return -1; } public static int FirstIndex<T>(this IEnumerable<T> source, Predicate<T> predicate) { int num = 0; foreach (T item in source) { if (predicate(item)) { return num; } num++; } return -1; } public static int LastIndex<T>(this IList<T> source, Predicate<T> predicate) { for (int num = source.Count - 1; num >= 0; num--) { if (predicate(source[num])) { return num; } } return -1; } public static int GetWeightedRandomIndex<T>(this IEnumerable<T> source, Func<T, double> weightSelector) { IEnumerable<double> weights = from w in source.Select(weightSelector) select (!(w < 0.0)) ? w : 0.0; IEnumerable<double> source2 = weights.Select((double w, int i) => weights.Take(i + 1).Sum()); double roll = MyCommonConstants.SystemRandom.NextDouble() * weights.Sum(); return source2.FirstIndex((double ws) => ws > roll); } public static T GetWeightedRandom<T>(this IList<T> source, Func<T, double> weightSelector) { return source[source.GetWeightedRandomIndex(weightSelector)]; } public static T GetWeightedRandom<T>(this IEnumerable<T> source, Func<T, double> weightSelector) { return source.ElementAt(source.GetWeightedRandomIndex(weightSelector)); } public static IList<T> FillBy<T>(this IList<T> source, Func<int, T> valueFactory) { for (int i = 0; i < source.Count; i++) { source[i] = valueFactory(i); } return source; } public static T[] FillBy<T>(this T[] source, Func<int, T> valueFactory) { for (int i = 0; i < source.Length; i++) { source[i] = valueFactory(i); } return source; } public static T[] ExclusiveSample<T>(this IList<T> source, int sampleNumber) { if (sampleNumber > source.Count) { throw new ArgumentOutOfRangeException("Cannot sample more elements than what the source collection contains"); } T[] array = new T[sampleNumber]; int num = 0; for (int i = 0; i < source.Count; i++) { if (num >= sampleNumber) { break; } double num2 = (double)(sampleNumber - num) / (double)(source.Count - i); if (MyCommonConstants.SystemRandom.NextDouble() < num2) { array[num] = source[i]; num++; } } return array; } public static IList<T> SwapInPlace<T>(this IList<T> source, int index1, int index2) { T val = source[index2]; T val2 = source[index1]; T val4 = (source[index1] = val); val4 = (source[index2] = val2); return source; } public static IList<T> Shuffle<T>(this IList<T> source) { for (int i = 0; i < source.Count - 1; i++) { int index = Random.Range(i, source.Count); source.SwapInPlace(i, index); } return source; } } public static class MyColor { private const float LightOffset = 0.0625f; public static Color RandomBright => new Color(Random.Range(0.4f, 1f), Random.Range(0.4f, 1f), Random.Range(0.4f, 1f)); public static Color RandomDim => new Color(Random.Range(0.4f, 0.6f), Random.Range(0.4f, 0.8f), Random.Range(0.4f, 0.8f)); public static Color RandomColor => new Color(Random.Range(0.1f, 0.9f), Random.Range(0.1f, 0.9f), Random.Range(0.1f, 0.9f)); public static Color WithAlphaSetTo(this Color color, float a) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) return new Color(color.r, color.g, color.b, a); } public static void SetAlpha(this Graphic graphic, float a) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) graphic.color = graphic.color.WithAlphaSetTo(a); } public static void SetAlpha(this SpriteRenderer renderer, float a) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) renderer.color = renderer.color.WithAlphaSetTo(a); } public static string ToHex(this Color color) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) return $"#{(int)(color.r * 255f):X2}{(int)(color.g * 255f):X2}{(int)(color.b * 255f):X2}"; } public static Color Lighter(this Color color) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return color.BrightnessOffset(0.0625f); } public static Color Darker(this Color color) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return color.BrightnessOffset(-0.0625f); } public static Color BrightnessOffset(this Color color, float offset) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) return new Color(color.r + offset, color.g + offset, color.b + offset, color.a); } public static Color ToUnityColor(this string source) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) Color result = default(Color); ColorUtility.TryParseHtmlString(source, ref result); return result; } } public class MyCommonConstants { public static readonly Random SystemRandom = new Random(); } public static class MyCoroutines { private static CoroutineOwner _coroutineOwner; private static CoroutineOwner CoroutineOwner { get { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_coroutineOwner != (Object)null) { return _coroutineOwner; } GameObject val = new GameObject("Static Coroutine Owner"); Object.DontDestroyOnLoad((Object)val); ((Object)val).hideFlags = (HideFlags)61; _coroutineOwner = val.AddComponent<CoroutineOwner>(); return _coroutineOwner; } } public static Coroutine StartCoroutine(this IEnumerator coroutine) { return ((MonoBehaviour)CoroutineOwner).StartCoroutine(coroutine); } public static Coroutine StartNext(this Coroutine coroutine, IEnumerator nextCoroutine) { return StartNextCoroutine(coroutine, nextCoroutine).StartCoroutine(); } public static Coroutine OnComplete(this Coroutine coroutine, Action onComplete) { return OnCompleteCoroutine(coroutine, onComplete).StartCoroutine(); } public static void StopCoroutine(Coroutine coroutine) { ((MonoBehaviour)CoroutineOwner).StopCoroutine(coroutine); } public static void StopAllCoroutines() { ((MonoBehaviour)CoroutineOwner).StopAllCoroutines(); } public static CoroutineGroup CreateGroup(MonoBehaviour owner = null) { return new CoroutineGroup((MonoBehaviour)(object)(((Object)(object)owner != (Object)null) ? ((CoroutineOwner)(object)owner) : CoroutineOwner)); } private static IEnumerator StartNextCoroutine(Coroutine coroutine, IEnumerator nextCoroutine) { yield return coroutine; yield return nextCoroutine.StartCoroutine(); } private static IEnumerator OnCompleteCoroutine(Coroutine coroutine, Action onComplete) { yield return coroutine; onComplete?.Invoke(); } } public static class MyDebug { private static StringBuilder _stringBuilder; private static void PrepareStringBuilder() { if (_stringBuilder == null) { _stringBuilder = new StringBuilder(); } else { _stringBuilder.Clear(); } } public static void LogArray<T>(T[] toLog) { PrepareStringBuilder(); _stringBuilder.Append("Log Array: ").Append(typeof(T).Name).Append(" (") .Append(toLog.Length) .Append(")\n"); for (int i = 0; i < toLog.Length; i++) { _stringBuilder.Append("\n\t").Append(i.ToString().Colored(Colors.brown)).Append(": ") .Append(toLog[i]); } Debug.Log((object)_stringBuilder.ToString()); } public static void LogArray<T>(IList<T> toLog) { PrepareStringBuilder(); int count = toLog.Count; _stringBuilder.Append("Log Array: ").Append(typeof(T).Name).Append(" (") .Append(count) .Append(")\n"); for (int i = 0; i < count; i++) { _stringBuilder.Append("\n\t" + i.ToString().Colored(Colors.brown) + ": " + toLog[i]); } Debug.Log((object)_stringBuilder.ToString()); } public static void LogColor(Color color) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) string text = ColorUtility.ToHtmlStringRGB(color); Color val = color; Debug.Log((object)("<color=#" + text + ">████████████</color> = " + ((object)(Color)(ref val)).ToString())); } public static void DrawDebugBounds(MeshFilter mesh, Color color) { } public static void DrawDebugBounds(MeshRenderer renderer, Color color) { } public static void DrawDebugBounds(Bounds bounds, Color color) { } public static void DrawString(string text, Vector3 worldPos, Color? colour = null) { } public static void DrawArrowRay(Vector3 position, Vector3 direction, float headLength = 0.25f, float headAngle = 20f) { } public static void DrawDimensionalCross(Vector3 position, float size) { } } public static class MyDelayedActions { public static Coroutine DelayedAction(float waitSeconds, Action action, bool unscaled = false) { return DelayedActionCoroutine(waitSeconds, action, unscaled).StartCoroutine(); } public static void DelayedAction(Action action) { Coroutine().StartCoroutine(); IEnumerator Coroutine() { yield return null; action?.Invoke(); } } public static Coroutine DelayedAction(this MonoBehaviour invoker, float waitSeconds, Action action, bool unscaled = false) { return invoker.StartCoroutine(DelayedActionCoroutine(waitSeconds, action, unscaled)); } public static Coroutine DelayedAction(this MonoBehaviour invoker, Action action) { return invoker.StartCoroutine(Coroutine()); IEnumerator Coroutine() { yield return null; action?.Invoke(); } } public static IEnumerator DelayedUiSelection(GameObject objectToSelect) { yield return null; EventSystem.current.SetSelectedGameObject((GameObject)null); EventSystem.current.SetSelectedGameObject(objectToSelect); } public static Coroutine DelayedUiSelection(this MonoBehaviour invoker, GameObject objectToSelect) { return invoker.StartCoroutine(DelayedUiSelection(objectToSelect)); } private static IEnumerator DelayedActionCoroutine(float waitSeconds, Action action, bool unscaled = false) { if (unscaled) { yield return (object)new WaitForSecondsRealtime(waitSeconds); } else { yield return (object)new WaitForSeconds(waitSeconds); } action?.Invoke(); } } public static class MyExtensions { public struct ComponentOfInterface<T> { public readonly Component Component; public readonly T Interface; public ComponentOfInterface(Component component, T @interface) { Component = component; Interface = @interface; } } public static void Swap<T>(this T[] array, int a, int b) { T val = array[b]; T val2 = array[a]; array[a] = val; array[b] = val2; } public static bool IsWorldPointInViewport(this Camera camera, Vector3 point) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) Vector3 val = camera.WorldToViewportPoint(point); if (val.x > 0f) { return val.y > 0f; } return false; } public static Vector3 WorldPointOffsetByDepth(this Camera camera, Vector3 source, float distanceFromCamera, MonoOrStereoscopicEye eye = 2) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) Vector3 vector = camera.WorldToScreenPoint(source, eye); return camera.ScreenToWorldPoint(vector.SetZ(distanceFromCamera), eye); } public static void ResetPosition(this Transform transform) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) transform.position = Vector3.zero; } public static Transform SetLossyScale(this Transform source, Vector3 targetLossyScale) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) source.localScale = source.lossyScale.Pow(-1f).ScaleBy(targetLossyScale).ScaleBy(source.localScale); return source; } public static T SetLayerRecursively<T>(this T source, string layerName) where T : Component { ((Component)source).gameObject.SetLayerRecursively(LayerMask.NameToLayer(layerName)); return source; } public static T SetLayerRecursively<T>(this T source, int layer) where T : Component { ((Component)source).gameObject.SetLayerRecursively(layer); return source; } public static GameObject SetLayerRecursively(this GameObject source, string layerName) { source.SetLayerRecursively(LayerMask.NameToLayer(layerName)); return source; } public static GameObject SetLayerRecursively(this GameObject source, int layer) { Transform[] componentsInChildren = source.GetComponentsInChildren<Transform>(true); for (int i = 0; i < componentsInChildren.Length; i++) { ((Component)componentsInChildren[i]).gameObject.layer = layer; } return source; } public static T GetOrAddComponent<T>(this GameObject gameObject) where T : Component { T component = gameObject.GetComponent<T>(); if ((Object)(object)component != (Object)null) { return component; } return gameObject.AddComponent<T>(); } public static T GetOrAddComponent<T>(this Component component) where T : Component { return component.gameObject.GetOrAddComponent<T>(); } public static bool HasComponent<T>(this GameObject gameObject) { return gameObject.GetComponent<T>() != null; } public static bool HasComponent<T>(this Component component) { return component.GetComponent<T>() != null; } public static List<Transform> GetChildsWhere(this Transform transform, Predicate<Transform> match) { List<Transform> list = new List<Transform>(); RecursiveCheck(transform); return list; void RecursiveCheck(Transform parent) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown foreach (Transform item in parent) { Transform val = item; RecursiveCheck(val); if (match(val)) { list.Add(val); } } } } public static List<Transform> GetObjectsOfLayerInChilds(this GameObject gameObject, int layer) { return gameObject.transform.GetChildsWhere((Transform t) => ((Component)t).gameObject.layer == layer); } public static List<Transform> GetObjectsOfLayerInChilds(this GameObject gameObject, string layer) { return gameObject.GetObjectsOfLayerInChilds(LayerMask.NameToLayer(layer)); } public static List<Transform> GetObjectsOfLayerInChilds(this Component component, string layer) { return component.GetObjectsOfLayerInChilds(LayerMask.NameToLayer(layer)); } public static List<Transform> GetObjectsOfLayerInChilds(this Component component, int layer) { return component.gameObject.GetObjectsOfLayerInChilds(layer); } public static void SetBodyState(this Rigidbody body, bool state) { body.isKinematic = !state; body.detectCollisions = state; } public static T[] FindObjectsOfInterface<T>() where T : class { return (from behaviour in Object.FindObjectsOfType<Transform>() select ((Component)behaviour).GetComponent(typeof(T))).OfType<T>().ToArray(); } public static ComponentOfInterface<T>[] FindObjectsOfInterfaceAsComponents<T>() where T : class { return (from c in Object.FindObjectsOfType<Component>() where c is T select new ComponentOfInterface<T>(c, c as T)).ToArray(); } public static T[] OnePerInstance<T>(this T[] components) where T : Component { if (components == null || components.Length == 0) { return null; } return (from h in components group h by ((Object)((Component)h).transform).GetInstanceID() into g select g.First()).ToArray(); } public static RaycastHit2D[] OneHitPerInstance(this RaycastHit2D[] hits) { if (hits == null || hits.Length == 0) { return null; } return (from h in hits group h by ((Object)((RaycastHit2D)(ref h)).transform).GetInstanceID() into g select g.First()).ToArray(); } public static Collider2D[] OneHitPerInstance(this Collider2D[] hits) { if (hits == null || hits.Length == 0) { return null; } return (from h in hits group h by ((Object)((Component)h).transform).GetInstanceID() into g select g.First()).ToArray(); } public static List<Collider2D> OneHitPerInstanceList(this Collider2D[] hits) { if (hits == null || hits.Length == 0) { return null; } return (from h in hits group h by ((Object)((Component)h).transform).GetInstanceID() into g select g.First()).ToList(); } } public static class MyGizmos { public static void DrawArrow(Vector3 from, Vector3 direction, float headLength = 0.25f, float headAngle = 20f) { } } public static class MyInput { public static bool GetNumberDown(int num) { switch (num) { case 0: if (Input.GetKeyDown((KeyCode)48) || Input.GetKeyDown((KeyCode)256)) { return true; } break; case 1: if (Input.GetKeyDown((KeyCode)49) || Input.GetKeyDown((KeyCode)257)) { return true; } break; case 2: if (Input.GetKeyDown((KeyCode)50) || Input.GetKeyDown((KeyCode)258)) { return true; } break; case 3: if (Input.GetKeyDown((KeyCode)51) || Input.GetKeyDown((KeyCode)259)) { return true; } break; case 4: if (Input.GetKeyDown((KeyCode)52) || Input.GetKeyDown((KeyCode)260)) { return true; } break; case 5: if (Input.GetKeyDown((KeyCode)53) || Input.GetKeyDown((KeyCode)261)) { return true; } break; case 6: if (Input.GetKeyDown((KeyCode)54) || Input.GetKeyDown((KeyCode)262)) { return true; } break; case 7: if (Input.GetKeyDown((KeyCode)55) || Input.GetKeyDown((KeyCode)263)) { return true; } break; case 8: if (Input.GetKeyDown((KeyCode)56) || Input.GetKeyDown((KeyCode)264)) { return true; } break; case 9: if (Input.GetKeyDown((KeyCode)57) || Input.GetKeyDown((KeyCode)265)) { return true; } break; } return false; } public static int GetNumberDown(KeyCode key) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I4 //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Invalid comparison between Unknown and I4 //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Invalid comparison between Unknown and I4 //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Invalid comparison between Unknown and I4 //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Inv