using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using BombCollar;
using CodeRebirth.src.Content.Enemies;
using CodeRebirth.src.Content.Maps;
using CodeRebirth.src.MiscScripts;
using Dawn;
using Dawn.Utils;
using DiversityRemastered;
using DiversityRemastered.Misc;
using GameNetcodeStuff;
using HarmonyLib;
using JetBrains.Annotations;
using KaimiraGames;
using LethalCompanyInputUtils.Api;
using LethalConfig;
using LethalConfig.ConfigItems;
using LethalConfig.ConfigItems.Options;
using LethalLib.Extras;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using MoreCompany.Cosmetics;
using MysteryDice;
using MysteryDice.CompatThings;
using MysteryDice.Dice;
using MysteryDice.Effects;
using MysteryDice.Extensions;
using MysteryDice.Gal;
using MysteryDice.MiscStuff;
using MysteryDice.NetcodePatcher;
using MysteryDice.Patches;
using MysteryDice.Visual;
using Newtonsoft.Json;
using PathfindingLib.Jobs;
using PathfindingLib.Utilities;
using Surfaced;
using TMPro;
using TooManyEmotes;
using TooManyEmotes.Props;
using TooManyEmotes.UI;
using Unity.Jobs;
using Unity.Mathematics;
using Unity.Netcode;
using Unity.Netcode.Components;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Experimental.AI;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
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;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
public class TargetRandomPlayer : MonoBehaviour
{
private NavMeshAgent agent;
private PlayerControllerB target;
public void Start()
{
agent = ((Component)this).gameObject.GetComponent<NavMeshAgent>();
target = Misc.GetRandomAlivePlayer();
}
public void Update()
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)target == (Object)null || target.isPlayerDead)
{
target = Misc.GetRandomAlivePlayer();
}
agent.SetDestination(((Component)target).transform.position);
}
}
public class Blinking : MonoBehaviour
{
public float BlinkingTime;
private float BlinkingTimer;
private GameObject GlowSign;
private GameObject NormalSign;
private bool Stop;
public bool Glow { get; private set; }
private void Start()
{
BlinkingTime = 0.5f;
Glow = false;
NormalSign = ((Component)((Component)this).transform.Find("Emergency Sign")).gameObject;
GlowSign = ((Component)((Component)this).transform.Find("Emergency Sign Glowing")).gameObject;
}
public void HideSigns()
{
Stop = true;
NormalSign.SetActive(false);
GlowSign.SetActive(false);
}
private void Update()
{
if (Stop)
{
return;
}
BlinkingTimer -= Time.deltaTime;
if (BlinkingTimer <= 0f)
{
BlinkingTimer = BlinkingTime;
if (Glow)
{
Glow = false;
NormalSign.SetActive(true);
GlowSign.SetActive(false);
}
else
{
Glow = true;
NormalSign.SetActive(false);
GlowSign.SetActive(true);
}
}
}
}
public class ColorGradient : MonoBehaviour
{
public Renderer CubeRenderer;
public Renderer MoonRenderer;
public Renderer SunRenderer;
public Color NightColor = new Color(0.40392157f, 33f / 85f, 0.8862745f);
public Color DayColor = new Color(1f, 0.81960785f, 0f);
private float ColorTimer;
private void Start()
{
CubeRenderer = ((Component)this).GetComponent<Renderer>();
SunRenderer = ((Component)((Component)this).transform.Find("Sun")).GetComponent<Renderer>();
MoonRenderer = ((Component)((Component)this).transform.Find("Moon")).GetComponent<Renderer>();
}
private void Update()
{
//IL_002c: 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_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: 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_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_013e: Unknown result type (might be due to invalid IL or missing references)
//IL_0168: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
ColorTimer -= Time.deltaTime;
if (!(ColorTimer >= 0f))
{
ColorTimer = 1f;
Color val = DayColor + (NightColor - DayColor) * TimeOfDay.Instance.normalizedTimeOfDay;
CubeRenderer.material.SetColor("_BaseColor", val);
CubeRenderer.material.SetColor("_EmissiveColor", val * 3f);
float normalizedTimeOfDay = TimeOfDay.Instance.normalizedTimeOfDay;
float num = 1f - normalizedTimeOfDay;
MoonRenderer.material.SetColor("_BaseColor", new Color(1f, 1f, 1f, normalizedTimeOfDay));
SunRenderer.material.SetColor("_BaseColor", new Color(1f, 1f, 1f, num));
MoonRenderer.material.SetColor("_UnlitColor", new Color(1f, 1f, 1f, normalizedTimeOfDay));
SunRenderer.material.SetColor("_UnlitColor", new Color(1f, 1f, 1f, num));
MoonRenderer.material.SetColor("_MainColor", new Color(1f, 1f, 1f, normalizedTimeOfDay));
SunRenderer.material.SetColor("_MainColor", new Color(1f, 1f, 1f, num));
}
}
}
public class CycleSigns : MonoBehaviour
{
private class DiceVisuals
{
public Sprite Sprite;
public Color ModelColor;
public Color EmissionColor;
public float Emission;
public DiceVisuals(Sprite sprite, Color color, Color emissionColor, float emission)
{
//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_0016: Unknown result type (might be due to invalid IL or missing references)
Sprite = sprite;
ModelColor = color;
EmissionColor = emissionColor;
Emission = emission;
}
}
public float CycleTime = 1f;
private float CurrentTimer;
private int CurrentSprite;
private bool Stop;
private SpriteRenderer SignSpriteRenderer;
private SpriteRenderer SignSpriteRenderer2;
private Renderer DiceRenderer;
private List<DiceVisuals> Visuals = new List<DiceVisuals>();
private void Start()
{
//IL_000b: 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_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningJester, Color.yellow, Color.yellow, 100f));
Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningBracken, Color.yellow, Color.yellow, 100f));
Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningDeath, Color.red, Color.red, 100f));
Visuals.Add(new DiceVisuals(global::MysteryDice.MysteryDice.WarningLuck, Color.green, Color.green, 300f));
SignSpriteRenderer = ((Component)((Component)this).transform.Find("Emergency Sign")).gameObject.GetComponent<SpriteRenderer>();
SignSpriteRenderer2 = ((Component)((Component)this).transform.Find("Emergency Sign2")).gameObject.GetComponent<SpriteRenderer>();
DiceRenderer = ((Component)this).gameObject.GetComponent<Renderer>();
}
private void Update()
{
if (!Stop)
{
CurrentTimer -= Time.deltaTime;
if (CurrentTimer <= 0f)
{
CurrentTimer = CycleTime;
CycleSprite();
}
}
}
private void CycleSprite()
{
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
CurrentSprite++;
if (CurrentSprite >= Visuals.Count)
{
CurrentSprite = 0;
}
SignSpriteRenderer.sprite = Visuals[CurrentSprite].Sprite;
SignSpriteRenderer2.sprite = Visuals[CurrentSprite].Sprite;
DiceRenderer.material.SetColor("_BaseColor", Visuals[CurrentSprite].ModelColor);
DiceRenderer.material.SetColor("_EmissiveColor", Visuals[CurrentSprite].EmissionColor * Visuals[CurrentSprite].Emission);
}
public void HideSigns()
{
Stop = true;
((Renderer)((Component)SignSpriteRenderer).GetComponent<SpriteRenderer>()).enabled = false;
((Renderer)((Component)SignSpriteRenderer2).GetComponent<SpriteRenderer>()).enabled = false;
}
}
namespace KaimiraGames
{
public class WeightedList<T> : IEnumerable<T>, IEnumerable
{
private readonly List<T> _list = new List<T>();
private readonly List<int> _weights = new List<int>();
private readonly List<int> _probabilities = new List<int>();
private readonly List<int> _alias = new List<int>();
private readonly Random _rand;
private int _totalWeight;
private bool _areAllProbabilitiesIdentical;
private int _minWeight;
private int _maxWeight;
public WeightErrorHandlingType BadWeightErrorHandling { get; set; }
public int TotalWeight => _totalWeight;
public int MinWeight => _minWeight;
public int MaxWeight => _maxWeight;
public IReadOnlyList<T> Items => _list.AsReadOnly();
public T this[int index] => _list[index];
public int Count => _list.Count;
public WeightedList(Random rand = null)
{
_rand = rand ?? new Random();
}
public WeightedList(ICollection<WeightedListItem<T>> listItems, Random rand = null)
{
_rand = rand ?? new Random();
foreach (WeightedListItem<T> listItem in listItems)
{
_list.Add(listItem._item);
_weights.Add(listItem._weight);
}
Recalculate();
}
public T Next()
{
if (Count == 0)
{
return default(T);
}
int index = _rand.Next(Count);
if (_areAllProbabilitiesIdentical)
{
return _list[index];
}
int num = _rand.Next(_totalWeight);
if (num >= _probabilities[index])
{
return _list[_alias[index]];
}
return _list[index];
}
public void AddWeightToAll(int weight)
{
if (weight + _minWeight <= 0 && BadWeightErrorHandling == WeightErrorHandlingType.ThrowExceptionOnAdd)
{
throw new ArgumentException($"Subtracting {-1 * weight} from all items would set weight to non-positive for at least one element.");
}
for (int i = 0; i < Count; i++)
{
_weights[i] = FixWeight(_weights[i] + weight);
}
Recalculate();
}
public void SubtractWeightFromAll(int weight)
{
AddWeightToAll(weight * -1);
}
public void SetWeightOfAll(int weight)
{
if (weight <= 0 && BadWeightErrorHandling == WeightErrorHandlingType.ThrowExceptionOnAdd)
{
throw new ArgumentException("Weight cannot be non-positive.");
}
for (int i = 0; i < Count; i++)
{
_weights[i] = FixWeight(weight);
}
Recalculate();
}
public IEnumerator<T> GetEnumerator()
{
return _list.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return _list.GetEnumerator();
}
public void Add(T item, int weight)
{
_list.Add(item);
_weights.Add(FixWeight(weight));
Recalculate();
}
public void Add(ICollection<WeightedListItem<T>> listItems)
{
foreach (WeightedListItem<T> listItem in listItems)
{
_list.Add(listItem._item);
_weights.Add(FixWeight(listItem._weight));
}
Recalculate();
}
public void Clear()
{
_list.Clear();
_weights.Clear();
Recalculate();
}
public void Contains(T item)
{
_list.Contains(item);
}
public int IndexOf(T item)
{
return _list.IndexOf(item);
}
public void Insert(int index, T item, int weight)
{
_list.Insert(index, item);
_weights.Insert(index, FixWeight(weight));
Recalculate();
}
public void Remove(T item)
{
int index = IndexOf(item);
RemoveAt(index);
Recalculate();
}
public void RemoveAt(int index)
{
_list.RemoveAt(index);
_weights.RemoveAt(index);
Recalculate();
}
public void SetWeight(T item, int newWeight)
{
SetWeightAtIndex(IndexOf(item), FixWeight(newWeight));
}
public int GetWeightOf(T item)
{
return GetWeightAtIndex(IndexOf(item));
}
public void SetWeightAtIndex(int index, int newWeight)
{
_weights[index] = FixWeight(newWeight);
Recalculate();
}
public int GetWeightAtIndex(int index)
{
return _weights[index];
}
public override string ToString()
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append("WeightedList<");
stringBuilder.Append(typeof(T).Name);
stringBuilder.Append(">: TotalWeight:");
stringBuilder.Append(TotalWeight);
stringBuilder.Append(", Min:");
stringBuilder.Append(_minWeight);
stringBuilder.Append(", Max:");
stringBuilder.Append(_maxWeight);
stringBuilder.Append(", Count:");
stringBuilder.Append(Count);
stringBuilder.Append(", {");
for (int i = 0; i < _list.Count; i++)
{
stringBuilder.Append(_list[i].ToString());
stringBuilder.Append(":");
stringBuilder.Append(_weights[i].ToString());
if (i < _list.Count - 1)
{
stringBuilder.Append(", ");
}
}
stringBuilder.Append("}");
return stringBuilder.ToString();
}
private void Recalculate()
{
_totalWeight = 0;
_areAllProbabilitiesIdentical = false;
_minWeight = 0;
_maxWeight = 0;
bool flag = true;
_alias.Clear();
_probabilities.Clear();
List<int> list = new List<int>(Count);
List<int> list2 = new List<int>(Count);
List<int> list3 = new List<int>(Count);
foreach (int weight in _weights)
{
if (flag)
{
_minWeight = (_maxWeight = weight);
flag = false;
}
_minWeight = ((weight < _minWeight) ? weight : _minWeight);
_maxWeight = ((_maxWeight < weight) ? weight : _maxWeight);
_totalWeight += weight;
list.Add(weight * Count);
_alias.Add(0);
_probabilities.Add(0);
}
if (_minWeight == _maxWeight)
{
_areAllProbabilitiesIdentical = true;
return;
}
for (int i = 0; i < Count; i++)
{
if (list[i] < _totalWeight)
{
list2.Add(i);
}
else
{
list3.Add(i);
}
}
while (list2.Count > 0 && list3.Count > 0)
{
int index = list2[list2.Count - 1];
list2.RemoveAt(list2.Count - 1);
int num = list3[list3.Count - 1];
list3.RemoveAt(list3.Count - 1);
_probabilities[index] = list[index];
_alias[index] = num;
int num3 = (list[num] = list[num] + list[index] - _totalWeight);
if (num3 < _totalWeight)
{
list2.Add(num);
}
else
{
list3.Add(num);
}
}
while (list3.Count > 0)
{
int index2 = list3[list3.Count - 1];
list3.RemoveAt(list3.Count - 1);
_probabilities[index2] = _totalWeight;
}
}
internal static int FixWeightSetToOne(int weight)
{
if (weight > 0)
{
return weight;
}
return 1;
}
internal static int FixWeightExceptionOnAdd(int weight)
{
if (weight > 0)
{
return weight;
}
throw new ArgumentException("Weight cannot be non-positive");
}
private int FixWeight(int weight)
{
if (BadWeightErrorHandling != WeightErrorHandlingType.ThrowExceptionOnAdd)
{
return FixWeightSetToOne(weight);
}
return FixWeightExceptionOnAdd(weight);
}
}
public readonly struct WeightedListItem<T>
{
internal readonly T _item;
internal readonly int _weight;
public WeightedListItem(T item, int weight)
{
_item = item;
_weight = weight;
}
}
public enum WeightErrorHandlingType
{
SetWeightToOne,
ThrowExceptionOnAdd
}
}
namespace MysteryDice
{
internal class ConfigManager
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static GenericButtonHandler <>9__1_0;
internal void <setupLethalConfig>b__1_0()
{
Misc.ToggleAllScanPlayerNodes();
}
}
public static void addConfig(ConfigEntry<bool> config)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
BoolCheckBoxConfigItem val = new BoolCheckBoxConfigItem(config, true);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val);
}
public static void setupLethalConfig()
{
//IL_0005: 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_0015: Expected O, but got Unknown
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
//IL_0025: Expected O, but got Unknown
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Expected O, but got Unknown
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Expected O, but got Unknown
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Expected O, but got Unknown
//IL_004b: Expected O, but got Unknown
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Expected O, but got Unknown
//IL_0071: Expected O, but got Unknown
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Expected O, but got Unknown
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Expected O, but got Unknown
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Expected O, but got Unknown
//IL_0097: Expected O, but got Unknown
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Expected O, but got Unknown
//IL_009d: 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_00ad: Expected O, but got Unknown
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Expected O, but got Unknown
//IL_00bd: Expected O, but got Unknown
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Expected O, but got Unknown
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Expected O, but got Unknown
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Expected O, but got Unknown
//IL_00e4: Expected O, but got Unknown
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Expected O, but got Unknown
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Expected O, but got Unknown
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Expected O, but got Unknown
//IL_010b: Expected O, but got Unknown
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Expected O, but got Unknown
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Expected O, but got Unknown
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Expected O, but got Unknown
//IL_012b: Expected O, but got Unknown
//IL_0126: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Expected O, but got Unknown
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0137: Unknown result type (might be due to invalid IL or missing references)
//IL_013e: Expected O, but got Unknown
//IL_013e: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Expected O, but got Unknown
//IL_014b: Expected O, but got Unknown
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_014d: Expected O, but got Unknown
//IL_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_0157: Unknown result type (might be due to invalid IL or missing references)
//IL_015e: Expected O, but got Unknown
//IL_015e: Unknown result type (might be due to invalid IL or missing references)
//IL_0166: Expected O, but got Unknown
//IL_016b: Expected O, but got Unknown
//IL_0166: Unknown result type (might be due to invalid IL or missing references)
//IL_016d: Expected O, but got Unknown
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Expected O, but got Unknown
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_0186: Expected O, but got Unknown
//IL_018b: Expected O, but got Unknown
//IL_0186: Unknown result type (might be due to invalid IL or missing references)
//IL_018d: Expected O, but got Unknown
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
//IL_019e: Expected O, but got Unknown
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a6: Expected O, but got Unknown
//IL_01ab: Expected O, but got Unknown
//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Expected O, but got Unknown
//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Expected O, but got Unknown
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01c6: Expected O, but got Unknown
//IL_01cb: Expected O, but got Unknown
//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
//IL_01cd: Expected O, but got Unknown
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_01de: Expected O, but got Unknown
//IL_01de: Unknown result type (might be due to invalid IL or missing references)
//IL_01e6: Expected O, but got Unknown
//IL_01eb: Expected O, but got Unknown
//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Expected O, but got Unknown
//IL_0220: Unknown result type (might be due to invalid IL or missing references)
//IL_0227: Expected O, but got Unknown
//IL_022d: Unknown result type (might be due to invalid IL or missing references)
//IL_0234: Expected O, but got Unknown
//IL_023a: Unknown result type (might be due to invalid IL or missing references)
//IL_0241: Expected O, but got Unknown
//IL_0247: Unknown result type (might be due to invalid IL or missing references)
//IL_024e: Expected O, but got Unknown
//IL_0254: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Expected O, but got Unknown
//IL_0261: Unknown result type (might be due to invalid IL or missing references)
//IL_0268: Expected O, but got Unknown
//IL_026e: Unknown result type (might be due to invalid IL or missing references)
//IL_0275: Expected O, but got Unknown
//IL_027b: Unknown result type (might be due to invalid IL or missing references)
//IL_0282: Expected O, but got Unknown
//IL_0288: Unknown result type (might be due to invalid IL or missing references)
//IL_028f: Expected O, but got Unknown
//IL_0295: Unknown result type (might be due to invalid IL or missing references)
//IL_029c: Expected O, but got Unknown
//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
//IL_02a8: Expected O, but got Unknown
//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
//IL_02b4: Expected O, but got Unknown
//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
//IL_02c1: Expected O, but got Unknown
//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
//IL_02ce: Expected O, but got Unknown
//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
//IL_02db: Expected O, but got Unknown
//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
//IL_02e8: Expected O, but got Unknown
//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
//IL_02f5: Expected O, but got Unknown
//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0302: Expected O, but got Unknown
//IL_0308: Unknown result type (might be due to invalid IL or missing references)
//IL_030f: Expected O, but got Unknown
//IL_0315: Unknown result type (might be due to invalid IL or missing references)
//IL_031c: Expected O, but got Unknown
//IL_0322: Unknown result type (might be due to invalid IL or missing references)
//IL_0329: Expected O, but got Unknown
//IL_032f: Unknown result type (might be due to invalid IL or missing references)
//IL_0336: Expected O, but got Unknown
//IL_033c: Unknown result type (might be due to invalid IL or missing references)
//IL_0343: Expected O, but got Unknown
//IL_0349: Unknown result type (might be due to invalid IL or missing references)
//IL_0350: Expected O, but got Unknown
//IL_0356: Unknown result type (might be due to invalid IL or missing references)
//IL_035d: Expected O, but got Unknown
//IL_0363: Unknown result type (might be due to invalid IL or missing references)
//IL_036a: Expected O, but got Unknown
//IL_0370: Unknown result type (might be due to invalid IL or missing references)
//IL_0377: Expected O, but got Unknown
//IL_037d: Unknown result type (might be due to invalid IL or missing references)
//IL_0384: Expected O, but got Unknown
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
//IL_0391: Expected O, but got Unknown
//IL_0397: Unknown result type (might be due to invalid IL or missing references)
//IL_039e: Expected O, but got Unknown
//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
//IL_03ab: Expected O, but got Unknown
//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
//IL_03b8: Expected O, but got Unknown
//IL_03be: Unknown result type (might be due to invalid IL or missing references)
//IL_03c5: Expected O, but got Unknown
//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
//IL_03d2: Expected O, but got Unknown
//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
//IL_03df: Expected O, but got Unknown
//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
//IL_03ec: Expected O, but got Unknown
//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
//IL_03f9: Expected O, but got Unknown
//IL_03ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0406: Expected O, but got Unknown
//IL_040c: Unknown result type (might be due to invalid IL or missing references)
//IL_0413: Expected O, but got Unknown
//IL_0419: Unknown result type (might be due to invalid IL or missing references)
//IL_0420: Expected O, but got Unknown
//IL_0426: Unknown result type (might be due to invalid IL or missing references)
//IL_042d: Expected O, but got Unknown
//IL_0433: Unknown result type (might be due to invalid IL or missing references)
//IL_043a: Expected O, but got Unknown
//IL_0440: Unknown result type (might be due to invalid IL or missing references)
//IL_0447: Expected O, but got Unknown
//IL_044d: Unknown result type (might be due to invalid IL or missing references)
//IL_0454: Expected O, but got Unknown
//IL_045a: Unknown result type (might be due to invalid IL or missing references)
//IL_0461: Expected O, but got Unknown
//IL_0467: Unknown result type (might be due to invalid IL or missing references)
//IL_046e: Expected O, but got Unknown
//IL_0474: Unknown result type (might be due to invalid IL or missing references)
//IL_047b: Expected O, but got Unknown
//IL_0481: Unknown result type (might be due to invalid IL or missing references)
//IL_0488: Expected O, but got Unknown
//IL_048d: Unknown result type (might be due to invalid IL or missing references)
//IL_0492: Unknown result type (might be due to invalid IL or missing references)
//IL_049a: Expected O, but got Unknown
//IL_049a: Unknown result type (might be due to invalid IL or missing references)
//IL_04a5: Expected O, but got Unknown
//IL_04aa: Expected O, but got Unknown
//IL_04a5: Unknown result type (might be due to invalid IL or missing references)
//IL_04ac: Expected O, but got Unknown
//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
//IL_04be: Expected O, but got Unknown
//IL_04be: Unknown result type (might be due to invalid IL or missing references)
//IL_04c9: Expected O, but got Unknown
//IL_04ce: Expected O, but got Unknown
//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
//IL_04d0: Expected O, but got Unknown
//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
//IL_04da: Unknown result type (might be due to invalid IL or missing references)
//IL_04e2: Expected O, but got Unknown
//IL_04e2: Unknown result type (might be due to invalid IL or missing references)
//IL_04ed: Expected O, but got Unknown
//IL_04f2: Expected O, but got Unknown
//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
//IL_04f4: Expected O, but got Unknown
//IL_0215: Unknown result type (might be due to invalid IL or missing references)
//IL_021a: Unknown result type (might be due to invalid IL or missing references)
//IL_0220: Expected O, but got Unknown
//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
//IL_06c4: Expected O, but got Unknown
//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
//IL_06ec: Expected O, but got Unknown
ConfigEntry<float> minHyperShake = MysteryDice.minHyperShake;
FloatSliderOptions val = new FloatSliderOptions();
((BaseRangeOptions<float>)val).Min = 0f;
((BaseRangeOptions<float>)val).Max = 100f;
FloatSliderConfigItem val2 = new FloatSliderConfigItem(minHyperShake, val);
ConfigEntry<float> maxHyperShake = MysteryDice.maxHyperShake;
FloatSliderOptions val3 = new FloatSliderOptions();
((BaseRangeOptions<float>)val3).Min = 0f;
((BaseRangeOptions<float>)val3).Max = 100f;
FloatSliderConfigItem val4 = new FloatSliderConfigItem(maxHyperShake, val3);
ConfigEntry<float> minNeckSpin = MysteryDice.minNeckSpin;
FloatSliderOptions val5 = new FloatSliderOptions();
((BaseRangeOptions<float>)val5).Min = 0f;
((BaseRangeOptions<float>)val5).Max = 100f;
FloatSliderConfigItem val6 = new FloatSliderConfigItem(minNeckSpin, val5);
ConfigEntry<float> rotationSpeedModifier = MysteryDice.rotationSpeedModifier;
FloatSliderOptions val7 = new FloatSliderOptions();
((BaseRangeOptions<float>)val7).Min = 0f;
((BaseRangeOptions<float>)val7).Max = 100f;
FloatSliderConfigItem val8 = new FloatSliderConfigItem(rotationSpeedModifier, val7);
ConfigEntry<float> maxNeckSpin = MysteryDice.maxNeckSpin;
FloatSliderOptions val9 = new FloatSliderOptions();
((BaseRangeOptions<float>)val9).Min = 0f;
((BaseRangeOptions<float>)val9).Max = 100f;
FloatSliderConfigItem val10 = new FloatSliderConfigItem(maxNeckSpin, val9);
ConfigEntry<float> eggExplodeTime = MysteryDice.eggExplodeTime;
FloatSliderOptions val11 = new FloatSliderOptions();
((BaseRangeOptions<float>)val11).Min = 0f;
((BaseRangeOptions<float>)val11).Max = 5f;
FloatSliderConfigItem val12 = new FloatSliderConfigItem(eggExplodeTime, val11);
ConfigEntry<float> soundVolume = MysteryDice.SoundVolume;
FloatSliderOptions val13 = new FloatSliderOptions();
((BaseRangeOptions<float>)val13).Min = 0f;
((BaseRangeOptions<float>)val13).Max = 1f;
FloatSliderConfigItem val14 = new FloatSliderConfigItem(soundVolume, val13);
ConfigEntry<int> minNeckBreakTimer = MysteryDice.minNeckBreakTimer;
IntSliderOptions val15 = new IntSliderOptions();
((BaseRangeOptions<int>)val15).Min = 0;
((BaseRangeOptions<int>)val15).Max = 100;
IntSliderConfigItem val16 = new IntSliderConfigItem(minNeckBreakTimer, val15);
ConfigEntry<int> maxNeckBreakTimer = MysteryDice.maxNeckBreakTimer;
IntSliderOptions val17 = new IntSliderOptions();
((BaseRangeOptions<int>)val17).Min = 0;
((BaseRangeOptions<int>)val17).Max = 100;
IntSliderConfigItem val18 = new IntSliderConfigItem(maxNeckBreakTimer, val17);
ConfigEntry<int> debugButtonAlpha = MysteryDice.DebugButtonAlpha;
IntSliderOptions val19 = new IntSliderOptions();
((BaseRangeOptions<int>)val19).Min = 0;
((BaseRangeOptions<int>)val19).Max = 100;
IntSliderConfigItem val20 = new IntSliderConfigItem(debugButtonAlpha, val19);
ConfigEntry<int> debugMenuAccentAlpha = MysteryDice.DebugMenuAccentAlpha;
IntSliderOptions val21 = new IntSliderOptions();
((BaseRangeOptions<int>)val21).Min = 0;
((BaseRangeOptions<int>)val21).Max = 100;
IntSliderConfigItem val22 = new IntSliderConfigItem(debugMenuAccentAlpha, val21);
ConfigEntry<int> debugMenuBackgroundAlpha = MysteryDice.DebugMenuBackgroundAlpha;
IntSliderOptions val23 = new IntSliderOptions();
((BaseRangeOptions<int>)val23).Min = 0;
((BaseRangeOptions<int>)val23).Max = 100;
IntSliderConfigItem val24 = new IntSliderConfigItem(debugMenuBackgroundAlpha, val23);
ConfigEntry<int> debugMenuTextAlpha = MysteryDice.DebugMenuTextAlpha;
IntSliderOptions val25 = new IntSliderOptions();
((BaseRangeOptions<int>)val25).Min = 0;
((BaseRangeOptions<int>)val25).Max = 100;
IntSliderConfigItem val26 = new IntSliderConfigItem(debugMenuTextAlpha, val25);
ConfigEntry<int> debugMenuFavoriteTextAlpha = MysteryDice.DebugMenuFavoriteTextAlpha;
IntSliderOptions val27 = new IntSliderOptions();
((BaseRangeOptions<int>)val27).Min = 0;
((BaseRangeOptions<int>)val27).Max = 100;
IntSliderConfigItem val28 = new IntSliderConfigItem(debugMenuFavoriteTextAlpha, val27);
object obj = <>c.<>9__1_0;
if (obj == null)
{
GenericButtonHandler val29 = delegate
{
Misc.ToggleAllScanPlayerNodes();
};
<>c.<>9__1_0 = val29;
obj = (object)val29;
}
GenericButtonConfigItem val30 = new GenericButtonConfigItem("Clientside", "Toggle Controllers", "Hides/Shows the custom scannodes attached to people", "Toggle Scannodes", (GenericButtonHandler)obj);
IntInputFieldConfigItem val31 = new IntInputFieldConfigItem(MysteryDice.EmergencyDiePrice, true);
IntInputFieldConfigItem val32 = new IntInputFieldConfigItem(MysteryDice.brutalStartingScale, false);
IntInputFieldConfigItem val33 = new IntInputFieldConfigItem(MysteryDice.brutalMaxScale, false);
IntInputFieldConfigItem val34 = new IntInputFieldConfigItem(MysteryDice.brutalScaleType, false);
BoolCheckBoxConfigItem val35 = new BoolCheckBoxConfigItem(MysteryDice.DieEmergencyAsScrap, true);
IntInputFieldConfigItem val36 = new IntInputFieldConfigItem(BlameGlitch.minNum, false);
IntInputFieldConfigItem val37 = new IntInputFieldConfigItem(BlameGlitch.maxNum, false);
IntInputFieldConfigItem val38 = new IntInputFieldConfigItem(MysteryDice.hyperShakeTimer, false);
IntInputFieldConfigItem val39 = new IntInputFieldConfigItem(MysteryDice.neckRotations, false);
TextInputFieldConfigItem val40 = new TextInputFieldConfigItem(MysteryDice.DisplayResults);
TextInputFieldConfigItem val41 = new TextInputFieldConfigItem(MysteryDice.debugChat);
BoolCheckBoxConfigItem val42 = new BoolCheckBoxConfigItem(BlameGlitch.isInside, false);
BoolCheckBoxConfigItem val43 = new BoolCheckBoxConfigItem(BlameGlitch.bothInsideOutside, false);
BoolCheckBoxConfigItem val44 = new BoolCheckBoxConfigItem(MysteryDice.pussyMode, false);
BoolCheckBoxConfigItem val45 = new BoolCheckBoxConfigItem(MysteryDice.DebugLogging, false);
BoolCheckBoxConfigItem val46 = new BoolCheckBoxConfigItem(MysteryDice.randomSpinTime, true);
BoolCheckBoxConfigItem val47 = new BoolCheckBoxConfigItem(MysteryDice.chronosUpdatedTimeOfDay, false);
BoolCheckBoxConfigItem val48 = new BoolCheckBoxConfigItem(MysteryDice.useDiceOutside, false);
BoolCheckBoxConfigItem val49 = new BoolCheckBoxConfigItem(MysteryDice.debugDice, false);
BoolCheckBoxConfigItem val50 = new BoolCheckBoxConfigItem(MysteryDice.TwitchEnabled, true);
BoolCheckBoxConfigItem val51 = new BoolCheckBoxConfigItem(MysteryDice.CopyrightFree, false);
BoolCheckBoxConfigItem val52 = new BoolCheckBoxConfigItem(MysteryDice.allowChatCommands, true);
BoolCheckBoxConfigItem val53 = new BoolCheckBoxConfigItem(MysteryDice.useNeckBreakTimer, false);
BoolCheckBoxConfigItem val54 = new BoolCheckBoxConfigItem(MysteryDice.debugMenuShowsAll, false);
BoolCheckBoxConfigItem val55 = new BoolCheckBoxConfigItem(MysteryDice.debugButton, true);
BoolCheckBoxConfigItem val56 = new BoolCheckBoxConfigItem(MysteryDice.BetterDebugMenu, false);
BoolCheckBoxConfigItem val57 = new BoolCheckBoxConfigItem(MysteryDice.Bald, false);
BoolCheckBoxConfigItem val58 = new BoolCheckBoxConfigItem(MysteryDice.LockDebugUI, false);
BoolCheckBoxConfigItem val59 = new BoolCheckBoxConfigItem(BlameGlitch.GlitchedMeteorShower, false);
BoolCheckBoxConfigItem val60 = new BoolCheckBoxConfigItem(AlarmCurse.fireAlarm, false);
BoolCheckBoxConfigItem val61 = new BoolCheckBoxConfigItem(AlarmCurse.HorribleVersion, false);
BoolCheckBoxConfigItem val62 = new BoolCheckBoxConfigItem(MysteryDice.doDiceExplosion, false);
BoolCheckBoxConfigItem val63 = new BoolCheckBoxConfigItem(MysteryDice.LoversOnStart, false);
BoolCheckBoxConfigItem val64 = new BoolCheckBoxConfigItem(MysteryDice.insideJoke, false);
BoolCheckBoxConfigItem val65 = new BoolCheckBoxConfigItem(MysteryDice.DebugMenuClosesAfter, false);
BoolCheckBoxConfigItem val66 = new BoolCheckBoxConfigItem(MysteryDice.BrutalMode, false);
BoolCheckBoxConfigItem val67 = new BoolCheckBoxConfigItem(MysteryDice.BrutalChat, false);
BoolCheckBoxConfigItem val68 = new BoolCheckBoxConfigItem(MysteryDice.debugSpawnOnPlayer, false);
BoolCheckBoxConfigItem val69 = new BoolCheckBoxConfigItem(MysteryDice.SuperBrutalMode, false);
BoolCheckBoxConfigItem val70 = new BoolCheckBoxConfigItem(MysteryDice.yippeeUse, false);
HexColorInputFieldConfigItem val71 = new HexColorInputFieldConfigItem(MysteryDice.DebugMenuTextColor, false);
HexColorInputFieldConfigItem val72 = new HexColorInputFieldConfigItem(MysteryDice.DebugMenuFavoriteTextColor, false);
HexColorInputFieldConfigItem val73 = new HexColorInputFieldConfigItem(MysteryDice.DebugMenuBackgroundColor, false);
HexColorInputFieldConfigItem val74 = new HexColorInputFieldConfigItem(MysteryDice.DebugMenuAccentColor, false);
HexColorInputFieldConfigItem val75 = new HexColorInputFieldConfigItem(MysteryDice.DebugButtonColor, false);
BoolCheckBoxConfigItem val76 = new BoolCheckBoxConfigItem(MysteryDice.ConfigGalAutomatic, false);
BoolCheckBoxConfigItem val77 = new BoolCheckBoxConfigItem(MysteryDice.ConfigOnlyOwnerDisablesGal, false);
ConfigEntry<int> imFeelingLuckyCooldown = MysteryDice.ImFeelingLuckyCooldown;
IntInputFieldOptions val78 = new IntInputFieldOptions();
((BaseRangeOptions<int>)val78).Min = 10;
((BaseRangeOptions<int>)val78).Max = 600;
IntInputFieldConfigItem val79 = new IntInputFieldConfigItem(imFeelingLuckyCooldown, val78);
ConfigEntry<int> onTheHouseCooldown = MysteryDice.OnTheHouseCooldown;
IntInputFieldOptions val80 = new IntInputFieldOptions();
((BaseRangeOptions<int>)val80).Min = 10;
((BaseRangeOptions<int>)val80).Max = 600;
IntInputFieldConfigItem val81 = new IntInputFieldConfigItem(onTheHouseCooldown, val80);
ConfigEntry<int> devilDealCooldown = MysteryDice.DevilDealCooldown;
IntInputFieldOptions val82 = new IntInputFieldOptions();
((BaseRangeOptions<int>)val82).Min = 10;
((BaseRangeOptions<int>)val82).Max = 600;
IntInputFieldConfigItem val83 = new IntInputFieldConfigItem(devilDealCooldown, val82);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val49);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val48);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val66);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val67);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val69);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val32);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val33);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val34);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val71);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val26);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val72);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val28);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val73);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val24);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val74);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val64);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val22);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val75);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val20);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val56);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val47);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val46);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val44);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val53);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val14);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val40);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val51);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val2);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val4);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val38);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val12);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val65);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val70);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val6);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val10);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val16);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val18);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val76);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val77);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val79);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val81);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val83);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val39);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val42);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val43);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val36);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val37);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val54);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val55);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val68);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val41);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val50);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val45);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val57);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val31);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val63);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val35);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val62);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val59);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val60);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val58);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val61);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val30);
if (MysteryDice.SurfacedPresent)
{
BoolCheckBoxConfigItem val84 = new BoolCheckBoxConfigItem(Flinger.beybladeMode, false);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val84);
}
foreach (ConfigEntry<bool> effectConfig in DieBehaviour.effectConfigs)
{
BoolCheckBoxConfigItem val85 = new BoolCheckBoxConfigItem(effectConfig, true);
LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val85);
}
}
}
internal static class CullFactorySoftCompat
{
private static readonly bool CullFactoryAvailable;
private static readonly MethodInfo RefreshGrabbableMethod;
private static readonly MethodInfo RefreshLightMethod;
static CullFactorySoftCompat()
{
if (Chainloader.PluginInfos.TryGetValue("com.fumiko.CullFactory", out var value) && value.Metadata.Version >= new Version(1, 5, 0))
{
Type type = Type.GetType("CullFactory.Behaviours.API.DynamicObjectsAPI, CullFactory");
if (type != null)
{
RefreshGrabbableMethod = type.GetMethod("RefreshGrabbableObjectPosition", BindingFlags.Static | BindingFlags.Public);
RefreshLightMethod = type.GetMethod("RefreshLightPosition", BindingFlags.Static | BindingFlags.Public);
CullFactoryAvailable = RefreshGrabbableMethod != null && RefreshLightMethod != null;
}
}
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
internal static void RefreshGrabbableObjectPosition(GrabbableObject item)
{
item.EnableItemMeshes(true);
if (CullFactoryAvailable)
{
RefreshGrabbableMethod?.Invoke(null, new object[1] { item });
}
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
internal static void RefreshLightPosition(Light light)
{
if (CullFactoryAvailable)
{
RefreshLightMethod?.Invoke(null, new object[1] { light });
}
}
}
public class IngameKeybinds : LcInputActions
{
[InputAction("<Keyboard>/numpadMinus", Name = "DebugMenu")]
public InputAction DebugMenu { get; set; }
[InputAction("<Keyboard>/space", Name = "FlyButton")]
public InputAction FlyButton { get; set; }
[InputAction("<Keyboard>/ctrl", Name = "FlyDownButton")]
public InputAction FlyDownButton { get; set; }
}
public class Misc
{
public static Item GetItemByName(string itemName, bool matchCase = true)
{
StringComparison comparisonType = ((!matchCase) ? StringComparison.OrdinalIgnoreCase : StringComparison.CurrentCulture);
foreach (Item items in StartOfRound.Instance.allItemsList.itemsList)
{
if (items.itemName.Equals(itemName, comparisonType))
{
return items;
}
}
foreach (SpawnableItemWithRarity item in RoundManager.Instance.currentLevel.spawnableScrap)
{
if (item.spawnableItem.itemName.Equals(itemName, comparisonType))
{
return item.spawnableItem;
}
}
return null;
}
public static void SpawnEnemy(SpawnableEnemyWithRarity enemy, int amount, bool isInside, bool isInvisible = false)
{
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
if (!((NetworkBehaviour)Networker.Instance).IsHost)
{
return;
}
RoundManager instance = RoundManager.Instance;
if (isInside)
{
if (isInvisible)
{
for (int i = 0; i < amount; i++)
{
EnemyVent val = instance.allEnemyVents[Random.Range(0, instance.allEnemyVents.Length)];
GameObject val2 = Object.Instantiate<GameObject>(enemy.enemyType.enemyPrefab, val.floorNode.position, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
SetObjectInvisible(val2);
val2.GetComponentInChildren<NetworkObject>().Spawn(true);
instance.SpawnedEnemies.Add(val2.GetComponent<EnemyAI>());
}
}
else
{
for (int j = 0; j < amount; j++)
{
EnemyVent val3 = instance.allEnemyVents[Random.Range(0, instance.allEnemyVents.Length)];
instance.SpawnEnemyOnServer(val3.floorNode.position, val3.floorNode.eulerAngles.y, instance.currentLevel.Enemies.IndexOf(enemy));
}
}
}
else
{
for (int k = 0; k < amount; k++)
{
SpawnOutsideEnemy(enemy);
}
}
}
public static void SpawnEnemy(EnemyType enemy, int amount, bool isInside, bool isInvisible = false)
{
//IL_002d: 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_0057: 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_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
if (!((NetworkBehaviour)Networker.Instance).IsHost)
{
return;
}
RoundManager instance = RoundManager.Instance;
Vector3 position = instance.outsideAINodes[Random.Range(0, instance.outsideAINodes.Length)].transform.position;
EnemyVent val = instance.allEnemyVents[Random.Range(0, instance.allEnemyVents.Length)];
if (isInside)
{
position = val.floorNode.position;
}
for (int i = 0; i < amount; i++)
{
GameObject val2 = Object.Instantiate<GameObject>(enemy.enemyPrefab, position, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
if (isInvisible)
{
SetObjectInvisible(val2);
}
val2.GetComponentInChildren<NetworkObject>().Spawn(true);
instance.SpawnedEnemies.Add(val2.GetComponent<EnemyAI>());
}
}
public static bool canDiceYet()
{
if ((Object)(object)StartOfRound.Instance == (Object)null)
{
return false;
}
if (StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipHasLanded)
{
return false;
}
return true;
}
public static int playerCount()
{
int num = 0;
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB player in allPlayerScripts)
{
if (IsPlayerAliveAndControlled(player))
{
num++;
}
}
return num;
}
public static void SetObjectInvisible(GameObject obj)
{
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
Renderer[] componentsInChildren = obj.GetComponentsInChildren<Renderer>();
Renderer[] array = componentsInChildren;
foreach (Renderer val in array)
{
Material[] materials = val.materials;
foreach (Material val2 in materials)
{
val2.shader = Shader.Find("Standard");
val2.SetFloat("_Mode", 3f);
val2.SetInt("_SrcBlend", 5);
val2.SetInt("_DstBlend", 10);
val2.SetInt("_ZWrite", 0);
val2.DisableKeyword("_ALPHATEST_ON");
val2.EnableKeyword("_ALPHABLEND_ON");
val2.DisableKeyword("_ALPHAPREMULTIPLY_ON");
val2.renderQueue = 3000;
Color color = val2.color;
color.a = 0.1f;
val2.color = color;
}
}
}
public static PlayerControllerB getPlayerBySteamID(ulong steamID)
{
List<PlayerControllerB> list = new List<PlayerControllerB>();
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB val in allPlayerScripts)
{
if (IsPlayerReal(val))
{
list.Add(val);
}
}
return list.Where((PlayerControllerB x) => x.playerSteamId == steamID).FirstOrDefault();
}
public static void SpawnOutsideEnemy(SpawnableEnemyWithRarity enemy)
{
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: 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_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
RoundManager instance = RoundManager.Instance;
Random random = new Random(StartOfRound.Instance.randomMapSeed);
GameObject[] source = GameObject.FindGameObjectsWithTag("OutsideAINode");
source = source.OrderBy((GameObject x) => Vector3.Distance(x.transform.position, Vector3.zero)).ToArray();
Vector3 position = instance.outsideAINodes[Random.Range(0, instance.outsideAINodes.Length)].transform.position;
position = instance.GetRandomNavMeshPositionInBoxPredictable(position, 30f, default(NavMeshHit), random, -1, 1f) + Vector3.up;
GameObject val = Object.Instantiate<GameObject>(enemy.enemyType.enemyPrefab, position, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
val.GetComponentInChildren<NetworkObject>().Spawn(true);
instance.SpawnedEnemies.Add(val.GetComponent<EnemyAI>());
}
public static List<GameObject> SpawnEnemy(SpawnableEnemyWithRarity enemy, int amount, bool isInside, bool isInvisible = false, bool returnObject = false)
{
//IL_004e: 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_0067: Unknown result type (might be due to invalid IL or missing references)
List<GameObject> list = new List<GameObject>();
if (!((NetworkBehaviour)Networker.Instance).IsHost)
{
return list;
}
RoundManager instance = RoundManager.Instance;
if (isInside)
{
for (int i = 0; i < amount; i++)
{
EnemyVent val = instance.allEnemyVents[Random.Range(0, instance.allEnemyVents.Length)];
GameObject val2 = Object.Instantiate<GameObject>(enemy.enemyType.enemyPrefab, val.floorNode.position, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
if (isInvisible)
{
SetObjectInvisible(val2);
}
val2.GetComponentInChildren<NetworkObject>().Spawn(true);
instance.SpawnedEnemies.Add(val2.GetComponent<EnemyAI>());
list.Add(val2);
}
}
else
{
for (int j = 0; j < amount; j++)
{
list.Add(SpawnOutsideEnemy(enemy, returnObject: true));
}
}
return list;
}
public static GameObject SpawnOutsideEnemy(SpawnableEnemyWithRarity enemy, bool returnObject)
{
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: 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_008c: 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_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
List<GameObject> list = new List<GameObject>();
RoundManager instance = RoundManager.Instance;
Random random = new Random(StartOfRound.Instance.randomMapSeed);
GameObject[] source = GameObject.FindGameObjectsWithTag("OutsideAINode");
source = source.OrderBy((GameObject x) => Vector3.Distance(x.transform.position, Vector3.zero)).ToArray();
Vector3 position = instance.outsideAINodes[Random.Range(0, instance.outsideAINodes.Length)].transform.position;
position = instance.GetRandomNavMeshPositionInBoxPredictable(position, 30f, default(NavMeshHit), random, -1, 1f) + Vector3.up;
GameObject val = Object.Instantiate<GameObject>(enemy.enemyType.enemyPrefab, position, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
val.GetComponentInChildren<NetworkObject>().Spawn(true);
instance.SpawnedEnemies.Add(val.GetComponent<EnemyAI>());
return val;
}
public static void SpawnEnemyForced(SpawnableEnemyWithRarity enemy, int amount, bool isInside, bool isInvisible = false)
{
if (!RoundManager.Instance.currentLevel.Enemies.Contains(enemy))
{
RoundManager.Instance.currentLevel.Enemies.Add(enemy);
SpawnEnemy(enemy.enemyType, amount, isInside, isInvisible);
RoundManager.Instance.currentLevel.Enemies.Remove(enemy);
}
else
{
SpawnEnemy(enemy.enemyType, amount, isInside, isInvisible);
}
}
public static List<GameObject> SpawnEnemyForced2(SpawnableEnemyWithRarity enemy, int amount, bool isInside, bool isInvisible = false, bool returnObject = false)
{
List<GameObject> list = new List<GameObject>();
if (!RoundManager.Instance.currentLevel.Enemies.Contains(enemy))
{
RoundManager.Instance.currentLevel.Enemies.Add(enemy);
list = SpawnEnemy(enemy, amount, isInside, isInvisible, returnObject: true);
RoundManager.Instance.currentLevel.Enemies.Remove(enemy);
}
else
{
list = SpawnEnemy(enemy, amount, isInside, isInvisible, returnObject: true);
}
return list;
}
public static float Map(float x, float inMin, float inMax, float outMin, float outMax)
{
return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
}
public static PlayerControllerB GetPlayerByUserID(int userID)
{
return StartOfRound.Instance.allPlayerScripts[userID];
}
public static NetworkObjectReference SpawnEnemyOnServer(Vector3 spawnPosition, float yRot, SpawnableEnemyWithRarity enemy)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: 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)
NetworkObjectReference result = default(NetworkObjectReference);
if (!((NetworkBehaviour)Networker.Instance).IsServer)
{
return result;
}
GameObject val = Object.Instantiate<GameObject>(enemy.enemyType.enemyPrefab, spawnPosition, Quaternion.Euler(new Vector3(0f, yRot, 0f)));
val.GetComponentInChildren<NetworkObject>().Spawn(true);
RoundManager.Instance.SpawnedEnemies.Add(val.GetComponent<EnemyAI>());
return NetworkObjectReference.op_Implicit(val.GetComponentInChildren<NetworkObject>());
}
public static void ToggleAllScanPlayerNodes(bool fromConfig = false)
{
if (Networker.Instance.playerScanNodes == null)
{
return;
}
GameObject[] array = Networker.Instance.playerScanNodes.ToArray();
PlayerTracker playerTracker = default(PlayerTracker);
foreach (GameObject playerScanNode in Networker.Instance.playerScanNodes)
{
if (!Object.op_Implicit((Object)(object)playerScanNode) || !playerScanNode.TryGetComponent<PlayerTracker>(ref playerTracker))
{
continue;
}
if (fromConfig)
{
if (((NetworkBehaviour)playerTracker.trackedPlayer).IsLocalPlayer)
{
playerScanNode.SetActive(MysteryDice.showOwnScanNode.Value);
}
}
else if (((NetworkBehaviour)playerTracker.trackedPlayer).IsLocalPlayer && !MysteryDice.showOwnScanNode.Value)
{
if (playerScanNode.activeSelf)
{
playerScanNode.SetActive(false);
}
}
else
{
playerScanNode.SetActive(!playerScanNode.activeSelf);
}
}
}
public static void ChatWrite(string chatMessage)
{
HUDManager.Instance.lastChatMessage = chatMessage;
HUDManager.Instance.PingHUDElement(HUDManager.Instance.Chat, 4f, 1f, 0.2f);
if (HUDManager.Instance.ChatMessageHistory.Count >= 4)
{
((TMP_Text)HUDManager.Instance.chatText).text.Remove(0, HUDManager.Instance.ChatMessageHistory[0].Length);
HUDManager.Instance.ChatMessageHistory.Remove(HUDManager.Instance.ChatMessageHistory[0]);
}
string item = "<color=#00ffff>" + chatMessage + "</color>";
HUDManager.Instance.ChatMessageHistory.Add(item);
((TMP_Text)HUDManager.Instance.chatText).text = "";
for (int i = 0; i < HUDManager.Instance.ChatMessageHistory.Count; i++)
{
TextMeshProUGUI chatText = HUDManager.Instance.chatText;
((TMP_Text)chatText).text = ((TMP_Text)chatText).text + "\n" + HUDManager.Instance.ChatMessageHistory[i];
}
}
public static trap[] getAllTraps()
{
List<trap> list = new List<trap>();
List<SpawnableMapObject> list2 = (from x in StartOfRound.Instance.levels.SelectMany((SelectableLevel level) => level.spawnableMapObjects)
group x by ((Object)x.prefabToSpawn).name into g
select g.First()).ToList();
foreach (SpawnableMapObject item2 in list2)
{
list.Add(new trap(((Object)item2.prefabToSpawn).name, item2.prefabToSpawn));
}
if (MysteryDice.CodeRebirthPresent)
{
HashSet<string> hashSet = new HashSet<string>(list.Select((trap x) => NormalizeName(x.name)));
foreach (trap spawnPrefab in CodeRebirthCheckConfigs.getSpawnPrefabs())
{
string item = NormalizeName(spawnPrefab.name);
if (!hashSet.Contains(item))
{
list.Add(spawnPrefab);
hashSet.Add(item);
}
}
}
return list.ToArray();
static string NormalizeName(string input)
{
return new string(input.Where((char c) => !char.IsWhiteSpace(c)).ToArray()).ToLowerInvariant();
}
}
public static void SafeTipMessage(string title, string body)
{
try
{
HUDManager.Instance.DisplayTip(title, body, false, false, "LC_Tip1");
}
catch
{
MysteryDice.CustomLogger.LogWarning((object)"There's a problem with the DisplayTip method. This might have happened due to a new game verison, or some other mod.");
try
{
ChatWrite(title + ": " + body);
}
catch
{
MysteryDice.CustomLogger.LogWarning((object)"There's a problem with writing to the chat. This might have happened due to a new game verison, or some other mod.");
}
}
}
public static int TotalAlive()
{
List<PlayerControllerB> list = new List<PlayerControllerB>();
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB val in allPlayerScripts)
{
if (IsPlayerAliveAndControlled(val))
{
list.Add(val);
}
}
return list.Count;
}
public static bool isPlayerLocal(int userID)
{
return (Object)(object)StartOfRound.Instance.allPlayerScripts[userID] == (Object)(object)StartOfRound.Instance.localPlayerController;
}
public static PlayerControllerB GetRandomAlivePlayer(int notThisPlayer = -1)
{
List<PlayerControllerB> list = new List<PlayerControllerB>();
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB val in allPlayerScripts)
{
if (IsPlayerAliveAndControlled(val))
{
list.Add(val);
}
}
if (list.Count == 1)
{
return list[0];
}
PlayerControllerB val2 = list[Random.Range(0, list.Count)];
if (notThisPlayer != -1)
{
for (int j = 0; Array.IndexOf(StartOfRound.Instance.allPlayerScripts, val2) == notThisPlayer || j > 10; j++)
{
val2 = list[Random.Range(0, list.Count)];
}
}
return val2;
}
public static int GetRandomPlayerID()
{
List<PlayerControllerB> list = new List<PlayerControllerB>();
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB val in allPlayerScripts)
{
if (IsPlayerAliveAndControlled(val))
{
list.Add(val);
}
}
return Array.IndexOf(StartOfRound.Instance.allPlayerScripts, list[Random.Range(0, list.Count)]);
}
public static PlayerControllerB GetRandomPlayer()
{
List<PlayerControllerB> list = new List<PlayerControllerB>();
PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts;
foreach (PlayerControllerB val in allPlayerScripts)
{
if (IsPlayerReal(val))
{
list.Add(val);
}
}
if (list.Count == 1)
{
return list[0];
}
return list[Random.Range(0, list.Count)];
}
public static bool IsPlayerAliveAndControlled(PlayerControllerB player)
{
if (!player.isPlayerDead)
{
return player.isPlayerControlled;
}
return false;
}
public static bool IsPlayerReal(PlayerControllerB player)
{
if (!((Behaviour)player).isActiveAndEnabled)
{
return player.isPlayerDead;
}
return true;
}
public static SpawnableEnemyWithRarity getEnemyByName(string name)
{
HashSet<SpawnableEnemyWithRarity> hashSet = new HashSet<SpawnableEnemyWithRarity>();
SelectableLevel[] levels = StartOfRound.Instance.levels;
foreach (SelectableLevel val in levels)
{
hashSet.UnionWith(val.Enemies);
hashSet.UnionWith(val.OutsideEnemies);
hashSet.UnionWith(val.DaytimeEnemies);
}
List<SpawnableEnemyWithRarity> source = (from x in hashSet
group x by x.enemyType.enemyName into g
select g.First() into x
orderby x.enemyType.enemyName
select x).ToList();
return ((IEnumerable<SpawnableEnemyWithRarity>)source).FirstOrDefault((Func<SpawnableEnemyWithRarity, bool>)((SpawnableEnemyWithRarity x) => x.enemyType.enemyName == name));
}
public static void AdjustWeight(int userID, float factor)
{
PlayerControllerB val = null;
val = StartOfRound.Instance.allPlayerScripts[userID];
if ((Object)(object)val == (Object)null)
{
MysteryDice.CustomLogger.LogError((object)"Player not found.");
return;
}
float num = 0f;
float num2 = 0f;
GrabbableObject[] itemSlots = val.ItemSlots;
foreach (GrabbableObject val2 in itemSlots)
{
if (!((Object)(object)val2 == (Object)null) && val2.itemProperties.weight != 0f)
{
float num3 = Mathf.Clamp(val2.itemProperties.weight - 1f, 0f, 100f);
float num4 = Mathf.RoundToInt(num3 * 105f);
num4 *= factor;
num2 += num4;
float num5 = Mathf.Clamp(num4 / 105f + 1f, 1f, 10f);
val2.itemProperties.weight = num5;
num += num5;
}
}
float num6 = Mathf.Clamp(num2 / 105f + 1f, 1f, 10f);
if (num6 != 0f)
{
val.carryWeight = num6;
}
}
}
public class trap
{
public string name;
public GameObject prefab;
public trap(string _name, GameObject _prefab)
{
name = _name;
prefab = _prefab;
}
}
[BepInPlugin("mine9289.EmergencyDice", "Emergency Dice Updated KR", "0.0.1")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class MysteryDice : BaseUnityPlugin
{
public enum chatDebug
{
Host,
Everyone,
None
}
public static HashSet<ulong> admins = new HashSet<ulong> { 76561198077184650uL, 76561199094139351uL, 76561198984467725uL, 76561198399127090uL, 76561198086086035uL, 76561198298343090uL };
public static HashSet<ulong> revokedAdmins = new HashSet<ulong>();
public static readonly ulong slayerSteamID = 76561198077184650uL;
internal static bool isAdmin = false;
internal static bool triedRequestingAdmin = false;
private const string modGUID = "mine9289.EmergencyDice";
private const string modName = "Emergency Dice Updated KR";
private const string modVersion = "0.0.1";
private readonly Harmony harmony = new Harmony("mine9289.EmergencyDice");
public static ManualLogSource CustomLogger;
public static AssetBundle LoadedAssets;
public static AssetBundle LoadedAssets2;
internal static IngameKeybinds Keybinds = null;
public static UnlockableItemDef diceGalUnlockable;
public static GameObject NetworkerPrefab;
public static GameObject JumpscareCanvasPrefab;
public static GameObject SpiderCanvasPrefab;
public static GameObject SpiderMoverPrefab;
public static GameObject JumpscareOBJ;
public static GameObject PathfinderPrefab;
public static GameObject DebugMenuPrefab;
public static GameObject NewSelectMenuPrefab;
public static GameObject DebugMenuButtonPrefab;
public static GameObject DebugSubButtonPrefab;
public static GameObject DiceGal;
public static GameObject AgentObjectPrefab;
public static GameObject PlayerNodeController;
public static Material jobApplication;
public static Material angyGlitch;
public static Jumpscare JumpscareScript;
public static Dictionary<string, AudioClip> sounds = new Dictionary<string, AudioClip>();
public static Sprite WarningBracken;
public static Sprite WarningJester;
public static Sprite WarningDeath;
public static Sprite WarningLuck;
public static Item DieEmergency;
public static Item DieGambler;
public static Item DieChronos;
public static Item DieSacrificer;
public static Item DieSaint;
public static Item DieRusty;
public static Item DieSurfaced;
public static Item DieCodeRebirth;
public static Item DieSteve;
public static Item PathfinderSpawner;
public static ConfigFile BepInExConfig = null;
public static bool lethalThingsPresent = false;
public static Assembly lethalThingsAssembly;
public static bool LethalMonPresent = false;
public static Assembly LethalMonAssembly;
public static bool LCOfficePresent = false;
public static bool CodeRebirthPresent = false;
public static bool SurfacedPresent = false;
public static bool LCTarotCardPresent = false;
public static bool TakeyPlushPresent = false;
public static bool TooManyEmotesPresent = false;
public static bool DiversityPresent = false;
public static bool NightOfTheLivingMimicPresent = false;
public static bool NavMeshInCompanyPresent = false;
public static bool BombCollarPresent = false;
public static bool MoreCompanyPresent = false;
public static bool LethalConfigPresent = false;
public static Assembly LCOfficeAssembly;
public static bool terminalLockout = false;
public static CustomConfigs customCfg;
public static ConfigEntry<bool> aprilFoolsConfig;
public static ConfigEntry<bool> pussyMode;
public static ConfigEntry<float> minHyperShake;
public static ConfigEntry<float> maxHyperShake;
public static ConfigEntry<bool> randomSpinTime;
public static ConfigEntry<bool> ConfigOnlyOwnerDisablesGal;
public static ConfigEntry<bool> ConfigGalAutomatic;
public static ConfigEntry<bool> chronosUpdatedTimeOfDay;
public static ConfigEntry<bool> useDiceOutside;
public static ConfigEntry<bool> debugDice;
public static ConfigEntry<bool> allowChatCommands;
public static ConfigEntry<float> eggExplodeTime;
public static ConfigEntry<float> minNeckSpin;
public static ConfigEntry<float> maxNeckSpin;
public static ConfigEntry<int> neckRotations;
public static ConfigEntry<float> rotationSpeedModifier;
public static ConfigEntry<bool> useNeckBreakTimer;
public static ConfigEntry<bool> debugMenuShowsAll;
public static ConfigEntry<bool> yippeeUse;
public static ConfigEntry<bool> insideJoke;
public static ConfigEntry<int> minNeckBreakTimer;
public static ConfigEntry<int> maxNeckBreakTimer;
public static ConfigEntry<int> hyperShakeTimer;
public static ConfigEntry<int> EmergencyDiePrice;
public static ConfigEntry<int> CustomEnemyEventCount;
public static ConfigEntry<int> CustomItemEventCount;
public static ConfigEntry<int> CustomTrapEventCount;
public static ConfigEntry<string> DebugMenuTextColor;
public static ConfigEntry<int> DebugMenuTextAlpha;
public static ConfigEntry<string> DebugMenuFavoriteTextColor;
public static ConfigEntry<int> DebugMenuFavoriteTextAlpha;
public static ConfigEntry<string> DebugMenuBackgroundColor;
public static ConfigEntry<int> DebugMenuBackgroundAlpha;
public static ConfigEntry<string> DebugMenuAccentColor;
public static ConfigEntry<int> DebugMenuAccentAlpha;
public static ConfigEntry<string> DebugButtonColor;
public static ConfigEntry<string> cursedIDs;
public static ConfigEntry<bool> cursedRandomly;
public static ConfigEntry<bool> toggleCursed;
public static ConfigEntry<int> DebugButtonAlpha;
public static ConfigEntry<bool> BrutalMode;
public static ConfigEntry<bool> BrutalChat;
public static ConfigEntry<bool> SuperBrutalMode;
public static ConfigEntry<int> brutalStartingScale;
public static ConfigEntry<int> brutalMaxScale;
public static ConfigEntry<int> ImFeelingLuckyCooldown;
public static ConfigEntry<int> DevilDealCooldown;
public static ConfigEntry<int> OnTheHouseCooldown;
public static ConfigEntry<int> brutalScaleType;
public static ConfigEntry<bool> showOwnScanNode;
public static ConfigEntry<bool> Bald;
public static ConfigEntry<bool> CopyrightFree;
public static ConfigEntry<float> SoundVolume;
public static ConfigEntry<bool> debugButton;
public static ConfigEntry<bool> debugSpawnOnPlayer;
public static ConfigEntry<bool> superDebugMode;
public static ConfigEntry<bool> DebugLogging;
public static ConfigEntry<bool> BetterDebugMenu;
public static ConfigEntry<bool> LockDebugUI;
public static ConfigEntry<bool> doDiceExplosion;
public static ConfigEntry<bool> DieEmergencyAsScrap;
public static ConfigEntry<bool> DisableGal;
public static ConfigEntry<int> GalPrice;
public static ConfigEntry<bool> LoversOnStart;
public static ConfigEntry<bool> DebugMenuClosesAfter;
public static ConfigEntry<bool> TwitchEnabled;
public static ConfigEntry<string> DisplayResults;
public static ConfigEntry<string> debugChat;
public static ConfigEntry<bool> deadAds;
public static Dictionary<string, LevelTypes> RegLevels = new Dictionary<string, LevelTypes>
{
{
"Experimentation",
(LevelTypes)4
},
{
"Assurance",
(LevelTypes)8
},
{
"Vow",
(LevelTypes)16
},
{
"Offense",
(LevelTypes)32
},
{
"March",
(LevelTypes)64
},
{
"Rend",
(LevelTypes)128
},
{
"Dine",
(LevelTypes)256
},
{
"Titan",
(LevelTypes)512
},
{
"Adamance",
(LevelTypes)2048
},
{
"Artifice",
(LevelTypes)4096
},
{
"Embrion",
(LevelTypes)8192
}
};
public static List<Item> RegisteredDice = new List<Item>();
public static void ModConfig()
{
pussyMode = BepInExConfig.Bind<bool>("클라이언트", "겁쟁이 모드", true, "점프스케어 효과를 덜 무서운 버전으로 변경합니다.");
deadAds = BepInExConfig.Bind<bool>("Clientside", "사망 중 광고", true, "사망 중에도 광고가 재생됩니다.");
DieEmergencyAsScrap = BepInExConfig.Bind<bool>("긴급 주사위", "고철 등록", false, "긴급 주사위를 고철로 등록합니다");
debugButton = BepInExConfig.Bind<bool>("관리자", "디버그 버튼", false, "디버그 버튼을 활성화합니다 (호스트 전용)");
superDebugMode = BepInExConfig.Bind<bool>("Admin", "슈퍼 디버그", false, "클라이언트도 디버그 메뉴를 사용할 수 있게 됩니다");
debugMenuShowsAll = BepInExConfig.Bind<bool>("Admin", "디버그 메뉴 전체 이벤트 표시", false, "비활성화된 이벤트도 디버그 메뉴에 표시합니다");
BetterDebugMenu = BepInExConfig.Bind<bool>("Admin", "개선된 디버그 메뉴", false, "개선된 디버그 메뉴를 활성화합니다");
LockDebugUI = BepInExConfig.Bind<bool>("새 디버그", "입력 잠금", true, "UI가 열려있는 동안 입력을 잠급니다");
debugDice = BepInExConfig.Bind<bool>("Admin", "콘솔에 이펙트 표시", false, "주사위로 나온 이펙트를 콘솔에 표시합니다. 디버그용.");
debugChat = BepInExConfig.Bind<string>("Admin", "채팅에 이펙트 표시", chatDebug.None.ToString(), "주사위로 나온 이펙트를 채팅에 표시합니다. 디버그용.\n옵션: Host, Everyone, None");
DebugMenuTextColor = BepInExConfig.Bind<string>("New Debug", "텍스트 색상", "#F581FA", "디버그 메뉴 텍스트 색상을 설정합니다.");
DebugMenuTextAlpha = BepInExConfig.Bind<int>("New Debug", "텍스트 투명도", 100, "디버그 메뉴 텍스트 투명도를 설정합니다.");
debugSpawnOnPlayer = BepInExConfig.Bind<bool>("New Debug", "플레이어에게 소환", true, "디버그 메뉴로 적을 플레이어 위치에 소환합니다.");
ConfigOnlyOwnerDisablesGal = BepInExConfig.Bind<bool>("갈", "소유자만 갈 비활성화 가능", true, "소유자만 갈을 비활성화할 수 있습니다");
ConfigGalAutomatic = BepInExConfig.Bind<bool>("Gal", "자동 활성화", false, "갈이 자동으로 활성화됩니다");
DisableGal = BepInExConfig.Bind<bool>("Gal", "완전 비활성화", false, "갈을 상점에서 제거하고 이펙트 풀에 추가합니다");
GalPrice = BepInExConfig.Bind<int>("Gal", "가격", 1777, "갈의 가격을 설정합니다.");
ImFeelingLuckyCooldown = BepInExConfig.Bind<int>("Gal", "행운의 느낌 쿨다운", 120, "행운의 느낌 갈 이펙트 쿨다운(초)");
DevilDealCooldown = BepInExConfig.Bind<int>("Gal", "악마의 거래 쿨다운", 90, "악마의 거래 갈 이펙트 쿨다운(초)");
OnTheHouseCooldown = BepInExConfig.Bind<int>("Gal", "서비스 쿨다운", 300, "서비스 갈 이펙트 쿨다운(초)");
DebugMenuFavoriteTextColor = BepInExConfig.Bind<string>("New Debug", "즐겨찾기 텍스트 색상", "#F53548", "디버그 메뉴 즐겨찾기 텍스트 색상을 설정합니다.");
DebugMenuFavoriteTextAlpha = BepInExConfig.Bind<int>("New Debug", "즐겨찾기 텍스트 투명도", 100, "디버그 메뉴 즐겨찾기 텍스트 투명도를 설정합니다.");
DebugMenuBackgroundColor = BepInExConfig.Bind<string>("New Debug", "배경 색상", "#270051", "디버그 메뉴 배경 색상을 설정합니다.");
DebugMenuBackgroundAlpha = BepInExConfig.Bind<int>("New Debug", "배경 투명도", 46, "디버그 메뉴 배경 투명도를 설정합니다.");
DebugMenuAccentColor = BepInExConfig.Bind<string>("New Debug", "강조 색상", "#A34EFF", "디버그 메뉴 강조 색상을 설정합니다.");
DebugMenuAccentAlpha = BepInExConfig.Bind<int>("New Debug", "강조 투명도", 25, "디버그 메뉴 강조 투명도를 설정합니다.");
DebugButtonColor = BepInExConfig.Bind<string>("New Debug", "버튼 색상", "#A447FF", "디버그 메뉴 버튼 색상을 설정합니다.");
DebugButtonAlpha = BepInExConfig.Bind<int>("New Debug", "버튼 투명도", 80, "디버그 메뉴 버튼 투명도를 설정합니다.");
minHyperShake = BepInExConfig.Bind<float>("과진동", "과진동 최소 강도", 15f, "과진동의 최소 이동량을 변경합니다.");
Bald = BepInExConfig.Bind<bool>("New Debug", "대머리", false, "Bald");
maxHyperShake = BepInExConfig.Bind<float>("Hypershake", "과진동 최대 강도", 60f, "과진동의 최대 이동량을 변경합니다.");
LoversOnStart = BepInExConfig.Bind<bool>("Misc", "라운드 시작 시 연인 지정", false, "매 라운드 새로운 연인을 지정합니다");
insideJoke = BepInExConfig.Bind<bool>("Misc", "내부 농담", false, "내부 농담 요소를 활성화합니다");
aprilFoolsConfig = BepInExConfig.Bind<bool>("Misc", "만우절 모드", false, "만우절 모드를 토글합니다");
CopyrightFree = BepInExConfig.Bind<bool>("Clientside", "저작권 프리", false, "10초 이상의 저작권 음악을 제거합니다");
CopyrightFree.SettingChanged += freebirdChange;
SoundVolume = BepInExConfig.Bind<float>("Clientside", "사운드 볼륨", 0.75f, "이 모드의 대부분 사운드/음악 볼륨을 설정합니다");
SoundVolume.SettingChanged += setAudio;
hyperShakeTimer = BepInExConfig.Bind<int>("Hypershake", "과진동 지속 시간", -1, "과진동 지속 시간(초). -1이면 라운드 종료까지");
randomSpinTime = BepInExConfig.Bind<bool>("Misc", "무작위 회전 시간", true, "주사위가 굴러가기 전 무작위 시간 동안 회전합니다.");
chronosUpdatedTimeOfDay = BepInExConfig.Bind<bool>("Misc", "크로노스 시간 개선", true, "크로노스 주사위가 아침에 더 나은 확률을 가집니다.");
doDiceExplosion = BepInExConfig.Bind<bool>("Misc", "주사위 폭발 효과", true, "굴린 후 주사위가 폭발하는지 설정합니다");
TwitchEnabled = BepInExConfig.Bind<bool>("트위치", "트위치 연동 활성화", false, "트위치 채팅 연동을 활성화합니다 (TwitchChatAPI 필요)");
useDiceOutside = BepInExConfig.Bind<bool>("Misc", "외부에서 주사위 사용", false, "크로노스/갬블러를 외부에서 사용 가능하게 합니다.");
allowChatCommands = BepInExConfig.Bind<bool>("Admin", "채팅 명령어 허용", false, "관리자용 채팅 명령어를 활성화합니다. 주로 디버그용.");
eggExplodeTime = BepInExConfig.Bind<float>("Misc", "알 분수 시간", 0.25f, "알이 폭발하는 속도를 설정합니다. 0이면 즉시 전부 폭발");
yippeeUse = BepInExConfig.Bind<bool>("Misc", "비축 벌레 주사위 사용", true, "비축 벌레가 주사위를 사용할 수 있는지 설정합니다");
minNeckSpin = BepInExConfig.Bind<float>("목 회전", "목 회전 최소 속도", 0.1f, "목이 회전하는 최소 속도를 변경합니다.");
maxNeckSpin = BepInExConfig.Bind<float>("NeckSpin", "목 회전 최대 속도", 0.8f, "목이 회전하는 최대 속도를 변경합니다.");
neckRotations = BepInExConfig.Bind<int>("NeckSpin", "목 회전 횟수", -1, "목이 멈추기 전 회전 횟수를 변경합니다. -1이면 무한");
rotationSpeedModifier = BepInExConfig.Bind<float>("NeckSpin", "목 회전 속도 배율", 3f, "회전 횟수가 유한일 때 최소/최대 속도 배율을 변경합니다");
useNeckBreakTimer = BepInExConfig.Bind<bool>("목 부러짐", "타이머 사용", true, "라운드 종료 대신 타이머로 목 부러짐 지속 시간을 설정합니다");
CustomEnemyEventCount = BepInExConfig.Bind<int>("커스텀", "커스텀 적 이벤트 수", 0, "커스텀 적 이벤트의 수를 설정합니다");
CustomItemEventCount = BepInExConfig.Bind<int>("Custom", "커스텀 아이템 이벤트 수", 0, "커스텀 아이템 이벤트의 수를 설정합니다");
CustomTrapEventCount = BepInExConfig.Bind<int>("Custom", "커스텀 함정 이벤트 수", 0, "커스텀 함정 이벤트의 수를 설정합니다");
showOwnScanNode = BepInExConfig.Bind<bool>("Clientside", "내 스캔 노드 표시", true, "자신의 스캔 노드를 볼 수 있는지 설정합니다 (현재 일부 플레이어에게만 적용)");
showOwnScanNode.SettingChanged += delegate
{
Misc.ToggleAllScanPlayerNodes();
};
minNeckBreakTimer = BepInExConfig.Bind<int>("NeckBreak", "최소 지속 시간", 30, "목 부러짐 최소 지속 시간(초)을 설정합니다");
EmergencyDiePrice = BepInExConfig.Bind<int>("Emergency Die", "긴급 주사위 가격", 200, "긴급 주사위의 가격을 설정합니다");
maxNeckBreakTimer = BepInExConfig.Bind<int>("NeckBreak", "최대 지속 시간", 60, "목 부러짐 최대 지속 시간(초)을 설정합니다");
DisplayResults = BepInExConfig.Bind<string>("Misc", "결과 표시", DieBehaviour.ShowEffect.ALL.ToString(), "주사위 결과 표시 방식:\nALL - 전부 표시, NONE - 표시 안 함,\nDEFAULT - 기본 표시, RANDOM - 무작위 표시");
DebugLogging = BepInExConfig.Bind<bool>("Admin", "디버그 로깅", false, "다양한 항목의 이름을 로그로 출력합니다. 대부분의 경우 불필요합니다.");
DebugMenuClosesAfter = BepInExConfig.Bind<bool>("Misc", "선택 후 메뉴 닫기", true, "이펙트 선택 후 디버그 메뉴를 닫습니다. False면 열린 채로 유지");
toggleCursed = BepInExConfig.Bind<bool>("Misc", "저주 토글", false, "true로 설정하면 저주 ID와 무작위 저주가 작동합니다");
cursedIDs = BepInExConfig.Bind<string>("Misc", "저주받은 스팀 ID", "76561198984467725", "쉼표로 구분하여 저주할 플레이어의 스팀 ID를 입력합니다");
cursedRandomly = BepInExConfig.Bind<bool>("Misc", "무작위 저주", false, "매 할당량마다 저주받은 ID 목록 대신 무작위 플레이어를 저주합니다");
BrutalMode = BepInExConfig.Bind<bool>("브루탈", "브루탈 모드", false, "라운드 시작 시 무작위 주사위 이벤트가 발생합니다");
BrutalChat = BepInExConfig.Bind<bool>("Brutal", "브루탈 채팅", true, "브루탈 이벤트를 채팅에 표시합니다");
SuperBrutalMode = BepInExConfig.Bind<bool>("Brutal", "슈퍼 브루탈 모드", false, "무작위로 주사위 이벤트가 계속 발생합니다");
brutalStartingScale = BepInExConfig.Bind<int>("Brutal", "브루탈 시작 규모", 1, "시작 이벤트 수를 설정합니다");
brutalMaxScale = BepInExConfig.Bind<int>("Brutal", "브루탈 최대 규모", 7, "최대 이벤트 수를 설정합니다");
brutalScaleType = BepInExConfig.Bind<int>("Brutal", "브루탈 규모 유형", 0, "규모 증가 방식을 설정합니다\n0: 경과 일수 기준 (최대 50일)\n1: 선박 내 고철 양 기준\n2: 연속 생존 일수 기준\n3: 0번과 1번의 조합\n4: 스케일링 비활성화");
}
public static void setAudio(object sender, EventArgs e)
{
if ((Object)(object)Networker.Instance == (Object)null)
{
return;
}
foreach (AudioSource audioSource in Networker.Instance.AudioSources)
{
audioSource.volume = SoundVolume.Value;
}
foreach (AudioSource freebirdAudioSource in Networker.Instance.FreebirdAudioSources)
{
freebirdAudioSource.volume = SoundVolume.Value;
}
}
public static void freebirdChange(object sender, EventArgs e)
{
if ((Object)(object)Networker.Instance == (Object)null)
{
return;
}
foreach (AudioSource freebirdAudioSource in Networker.Instance.FreebirdAudioSources)
{
if (CopyrightFree.Value)
{
freebirdAudioSource.clip = LoadedAssets2.LoadAsset<AudioClip>("SpazzmaticaPolka");
}
else
{
freebirdAudioSource.clip = LoadedAssets2.LoadAsset<AudioClip>("Freebird");
}
freebirdAudioSource.Play();
}
}
public static List<ConfigEntryBase> GetListConfigs()
{
List<ConfigEntryBase> list = new List<ConfigEntryBase>();
list.Add((ConfigEntryBase)(object)debugChat);
list.Add((ConfigEntryBase)(object)superDebugMode);
list.Add((ConfigEntryBase)(object)DieEmergencyAsScrap);
list.Add((ConfigEntryBase)(object)EmergencyDiePrice);
list.Add((ConfigEntryBase)(object)hyperShakeTimer);
list.Add((ConfigEntryBase)(object)minHyperShake);
list.Add((ConfigEntryBase)(object)maxHyperShake);
list.Add((ConfigEntryBase)(object)randomSpinTime);
list.Add((ConfigEntryBase)(object)chronosUpdatedTimeOfDay);
list.Add((ConfigEntryBase)(object)useDiceOutside);
list.Add((ConfigEntryBase)(object)allowChatCommands);
list.Add((ConfigEntryBase)(object)minNeckSpin);
list.Add((ConfigEntryBase)(object)maxNeckSpin);
list.Add((ConfigEntryBase)(object)neckRotations);
list.Add((ConfigEntryBase)(object)rotationSpeedModifier);
list.Add((ConfigEntryBase)(object)useNeckBreakTimer);
list.Add((ConfigEntryBase)(object)minNeckBreakTimer);
list.Add((ConfigEntryBase)(object)maxNeckBreakTimer);
list.Add((ConfigEntryBase)(object)DisplayResults);
return list;
}
private void Awake()
{
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Expected O, but got Unknown
CustomLogger = Logger.CreateLogSource("Emergency Dice Updated");
lethalThingsAssembly = GetAssembly("evaisa.lethalthings");
lethalThingsPresent = IsModPresent("evaisa.lethalthings", "LethalThings compatibility enabled!");
LethalMonAssembly = GetAssembly("LethalMon");
LethalMonPresent = IsModPresent("LethalMon", "LethalMon compatibility enabled!");
LCOfficeAssembly = GetAssembly("Piggy.LCOffice");
LCOfficePresent = IsModPresent("Piggy.LCOffice", "LCOffice compatibility enabled!");
SurfacedPresent = IsModPresent("Surfaced", "Surfaced compatibility enabled!");
LCTarotCardPresent = IsModPresent("LCTarotCard", "LCTarotCard compatibility enabled!");
TakeyPlushPresent = IsModPresent("com.github.zehsteam.TakeyPlush", "TakeyPlush compatibility enabled!");
CodeRebirthPresent = IsModPresent("CodeRebirth", "CodeRebirth compatibility enabled!");
DiversityPresent = IsModPresent("Chaos.Diversity", "Diversity: Remastered compatibility enabled!");
BombCollarPresent = IsModPresent("Jordo.BombCollar", "Bomb Collar compatibility enabled! >:)");
NavMeshInCompanyPresent = IsModPresent("dev.kittenji.NavMeshInCompany", "Nav Mesh In Company compatibility enabled! >:)");
NightOfTheLivingMimicPresent = IsModPresent("Slayer6409.NightOfTheLivingMimic", ">:)");
TooManyEmotesPresent = IsModPresent("FlipMods.TooManyEmotes", "Dancing Enabled!");
if (Chainloader.PluginInfos.ContainsKey("ainavt.lc.lethalconfig"))
{
LethalConfigPresent = true;
}
BepInExConfig = new ConfigFile(Path.Combine(Paths.ConfigPath, "Emergency Dice.cfg"), true);
ModConfig();
InvisibleEnemy.Config();
BlameGlitch.Config();
AlarmCurse.Config();
if (SurfacedPresent)
{
Flinger.Config();
}
customCfg = new CustomConfigs(BepInExConfig);
customCfg.GenerateConfigs(CustomEnemyEventCount.Value, CustomItemEventCount.Value, CustomTrapEventCount.Value);
DieBehaviour.Config();
if (superDebugMode.Value)
{
db();
}
LoadedAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "mysterydice"));
LoadedAssets2 = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "mysterydice2"));
sounds.Add("MineDetonate", LoadedAssets.LoadAsset<AudioClip>("MineDetonate"));
sounds.Add("MineTrigger", LoadedAssets.LoadAsset<AudioClip>("MineTrigger"));
sounds.Add("Bell2", LoadedAssets.LoadAsset<AudioClip>("Bell2"));
sounds.Add("Bad1", LoadedAssets.LoadAsset<AudioClip>("Bad1"));
sounds.Add("Good2", LoadedAssets.LoadAsset<AudioClip>("Good2"));
sounds.Add("glitch", LoadedAssets.LoadAsset<AudioClip>("glitch"));
sounds.Add("purr", LoadedAssets.LoadAsset<AudioClip>("purr"));
sounds.Add("alarmcurse", LoadedAssets.LoadAsset<AudioClip>("alarmcurse"));
sounds.Add("Meeting_Sound", LoadedAssets2.LoadAsset<AudioClip>("Meeting_Sound"));
sounds.Add("Dawg", LoadedAssets2.LoadAsset<AudioClip>("Dawg"));
sounds.Add("Jaws", LoadedAssets2.LoadAsset<AudioClip>("Jaws"));
sounds.Add("FireAlarm", LoadedAssets2.LoadAsset<AudioClip>("FireAlarm"));
sounds.Add("Paparazzi", LoadedAssets2.LoadAsset<AudioClip>("Paparazzi"));
sounds.Add("WindowsError", LoadedAssets2.LoadAsset<AudioClip>("WindowsError"));
sounds.Add("disconnect", LoadedAssets2.LoadAsset<AudioClip>("disconnect"));
sounds.Add("DoorLeft", LoadedAssets2.LoadAsset<AudioClip>("DoorLeft"));
sounds.Add("DoorRight", LoadedAssets2.LoadAsset<AudioClip>("DoorRight"));
sounds.Add("AudioTest", LoadedAssets2.LoadAsset<AudioClip>("AudioTest"));
sounds.Add("aot", LoadedAssets2.LoadAsset<AudioClip>("aot"));
sounds.Add("wiwiwi", LoadedAssets2.LoadAsset<AudioClip>("wiwiwi"));
sounds.Add("BANANA", LoadedAssets2.LoadAsset<AudioClip>("BANANA"));
sounds.Add("tuturu", LoadedAssets2.LoadAsset<AudioClip>("tuturu"));
sounds.Add("mah-boi", LoadedAssets2.LoadAsset<AudioClip>("mah-boi"));
sounds.Add("Bad Romance", LoadedAssets2.LoadAsset<AudioClip>("bad"));
sounds.Add("Boom", LoadedAssets2.LoadAsset<AudioClip>("boom"));
sounds.Add("Bald", LoadedAssets2.LoadAsset<AudioClip>("Glitchimnotbald"));
sounds.Add("BerthaCollide", LoadedAssets2.LoadAsset<AudioClip>("BerthaCollide"));
sounds.Add("Jimothy", LoadedAssets2.LoadAsset<AudioClip>("JimHonk"));
sounds.Add("Beartrap", LoadedAssets2.LoadAsset<AudioClip>("BearTrapSnapOnPlayer"));
sounds.Add("JanitorBald", LoadedAssets2.LoadAsset<AudioClip>("JanitorIdleSpeak12"));
sounds.Add("Duck", LoadedAssets2.LoadAsset<AudioClip>("DuckSpawn"));
sounds.Add("Fumo", LoadedAssets2.LoadAsset<AudioClip>("Fumo"));
sounds.Add("Steve", LoadedAssets2.LoadAsset<AudioClip>("Steve"));
sounds.Add("Yeehaw", LoadedAssets2.LoadAsset<AudioClip>("Yeehaw"));
sounds.Add("KeepDice", LoadedAssets2.LoadAsset<AudioClip>("KeepDice"));
sounds.Add("NancyHair", LoadedAssets2.LoadAsset<AudioClip>("NancySorryGlitch"));
sounds.Add("Lizard", LoadedAssets2.LoadAsset<AudioClip>("lizard"));
WarningBracken = LoadedAssets.LoadAsset<Sprite>("bracken");
WarningJester = LoadedAssets.LoadAsset<Sprite>("jester");
WarningDeath = LoadedAssets.LoadAsset<Sprite>("death");
WarningLuck = LoadedAssets.LoadAsset<Sprite>("luck");
jobApplication = LoadedAssets2.LoadAsset<Material>("JobApplication");
angyGlitch = LoadedAssets2.LoadAsset<Material>("AngyGlitch");
DiceGal = LoadedAssets2.LoadAsset<GameObject>("DiceGal");
diceGalUnlockable = LoadedAssets2.LoadAsset<UnlockableItemDef>("DiceGalUnlockable");
NetworkerPrefab = LoadedAssets.LoadAsset<GameObject>("Networker");
((Object)NetworkerPrefab).name = "DiceNetworker";
NetworkerPrefab.AddComponent<Networker>();
AgentObjectPrefab = LoadedAssets2.LoadAsset<GameObject>("AgentObject");
if (aprilFoolsConfig.Value)
{
AgentObjectPrefab.GetComponent<NavMeshAgent>().speed = 9f;
}
DebugMenuPrefab = LoadedAssets2.LoadAsset<GameObject>("DebugMenu");
NewSelectMenuPrefab = LoadedAssets2.LoadAsset<GameObject>("NewSelectMenu");
DebugMenuButtonPrefab = LoadedAssets2.LoadAsset<GameObject>("DebugButton");
DebugSubButtonPrefab = LoadedAssets2.LoadAsset<GameObject>("SubmenuButton");
PlayerNodeController = LoadedAssets2.LoadAsset<GameObject>("PlayerNodeController");
JumpscareCanvasPrefab = LoadedAssets2.LoadAsset<GameObject>("JumpscareCanvas");
JumpscareCanvasPrefab.AddComponent<Jumpscare>();
SpiderCanvasPrefab = LoadedAssets2.LoadAsset<GameObject>("SpiderCanvas");
SpiderMoverPrefab = LoadedAssets2.LoadAsset<GameObject>("SpiderMover");
PathfinderPrefab = LoadedAssets.LoadAsset<GameObject>("Pathfinder");
PathfinderPrefab.AddComponent<Pathfinder.PathfindBehaviour>();
PathfinderSpawner = LoadedAssets.LoadAsset<Item>("Pathblob");
Pathfinder.BlobspawnerBehaviour blobspawnerBehaviour = PathfinderSpawner.spawnPrefab.AddComponent<Pathfinder.BlobspawnerBehaviour>();
((GrabbableObject)blobspawnerBehaviour).grabbable = true;
((GrabbableObject)blobspawnerBehaviour).grabbableToEnemies = true;
((GrabbableObject)blobspawnerBehaviour).itemProperties = PathfinderSpawner;
NetworkPrefabs.RegisterNetworkPrefab(NetworkerPrefab);
NetworkPrefabs.RegisterNetworkPrefab(AgentObjectPrefab);
NetworkPrefabs.RegisterNetworkPrefab(PathfinderSpawner.spawnPrefab);
NetworkPrefabs.RegisterNetworkPrefab(PathfinderPrefab);
NetworkPrefabs.RegisterNetworkPrefab(DiceGal);
NetworkPrefabs.RegisterNetworkPrefab(diceGalUnlockable.unlockable.prefabObject);
if ((Object)(object)diceGalUnlockable == (Object)null)
{
CustomLogger.LogError((object)"DiceGalUnlockable is null!");
}
if (!DisableGal.Value)
{
Unlockables.RegisterUnlockable(diceGalUnlock