using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Dissonance.Config;
using HarmonyLib;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SkinwalkerMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkinwalkerMod")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fd4979a2-cef0-46af-8bf8-97e630b11475")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
internal class <Module>
{
static <Module>()
{
NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>();
NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>();
NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<float>();
NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<float>();
}
}
namespace SkinwalkerMod;
[BepInPlugin("RugbugRedfern.SkinwalkerMod", "Skinwalker Mod", "1.0.8")]
internal class PluginLoader : BaseUnityPlugin
{
private readonly Harmony harmony = new Harmony("RugbugRedfern.SkinwalkerMod");
private const string modGUID = "RugbugRedfern.SkinwalkerMod";
private const string modVersion = "1.0.8";
private static bool initialized;
public static PluginLoader Instance { get; private set; }
private void Awake()
{
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Expected O, but got Unknown
if (initialized)
{
return;
}
initialized = true;
Instance = this;
harmony.PatchAll(Assembly.GetExecutingAssembly());
Type[] types = Assembly.GetExecutingAssembly().GetTypes();
Type[] array = types;
foreach (Type type in array)
{
MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
MethodInfo[] array2 = methods;
foreach (MethodInfo methodInfo in array2)
{
object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
if (customAttributes.Length != 0)
{
methodInfo.Invoke(null, null);
}
}
}
SkinwalkerLogger.Initialize("RugbugRedfern.SkinwalkerMod");
SkinwalkerLogger.Log("SKINWALKER MOD STARTING UP 1.0.8");
SkinwalkerConfig.InitConfig();
SceneManager.sceneLoaded += SkinwalkerNetworkManagerHandler.ClientConnectInitializer;
GameObject val = new GameObject("Skinwalker Mod");
val.AddComponent<SkinwalkerModPersistent>();
((Object)val).hideFlags = (HideFlags)61;
Object.DontDestroyOnLoad((Object)(object)val);
}
public void BindConfig<T>(ref ConfigEntry<T> config, string section, string key, T defaultValue, string description = "")
{
config = ((BaseUnityPlugin)this).Config.Bind<T>(section, key, defaultValue, description);
}
}
internal class SkinwalkerBehaviour : MonoBehaviour
{
private AudioSource audioSource;
public const float PLAY_INTERVAL_MIN = 15f;
public const float PLAY_INTERVAL_MAX = 40f;
private const float MAX_DIST = 100f;
private float nextTimeToPlayAudio;
private EnemyAI ai;
public void Initialize(EnemyAI ai)
{
this.ai = ai;
audioSource = ai.creatureVoice;
SetNextTime();
}
private void Update()
{
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
if (!(Time.time > nextTimeToPlayAudio))
{
return;
}
SetNextTime();
float num = -1f;
if (Object.op_Implicit((Object)(object)ai) && !ai.isEnemyDead)
{
if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || (num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position)) < 100f)
{
AudioClip sample = SkinwalkerModPersistent.Instance.GetSample();
if (Object.op_Implicit((Object)(object)sample))
{
SkinwalkerLogger.Log(((Object)this).name + " played voice line 1");
audioSource.PlayOneShot(sample);
}
else
{
SkinwalkerLogger.Log(((Object)this).name + " played voice line 0");
}
}
else
{
SkinwalkerLogger.Log(((Object)this).name + " played voice line no (too far away) " + num);
}
}
else
{
SkinwalkerLogger.Log(((Object)this).name + " played voice line no (dead) EnemyAI: " + (object)ai);
}
}
private void SetNextTime()
{
if (SkinwalkerNetworkManager.Instance.VoiceLineFrequency.Value <= 0f)
{
nextTimeToPlayAudio = Time.time + 100000000f;
}
else
{
nextTimeToPlayAudio = Time.time + Random.Range(15f, 40f) / SkinwalkerNetworkManager.Instance.VoiceLineFrequency.Value;
}
}
private T CopyComponent<T>(T original, GameObject destination) where T : Component
{
Type type = ((object)original).GetType();
Component val = destination.AddComponent(type);
FieldInfo[] fields = type.GetFields();
FieldInfo[] array = fields;
foreach (FieldInfo fieldInfo in array)
{
fieldInfo.SetValue(val, fieldInfo.GetValue(original));
}
return (T)(object)((val is T) ? val : null);
}
}
internal class SkinwalkerConfig
{
public static ConfigEntry<bool> VoiceEnabled_BaboonHawk;
public static ConfigEntry<bool> VoiceEnabled_Bracken;
public static ConfigEntry<bool> VoiceEnabled_BunkerSpider;
public static ConfigEntry<bool> VoiceEnabled_Centipede;
public static ConfigEntry<bool> VoiceEnabled_CoilHead;
public static ConfigEntry<bool> VoiceEnabled_EyelessDog;
public static ConfigEntry<bool> VoiceEnabled_ForestGiant;
public static ConfigEntry<bool> VoiceEnabled_GhostGirl;
public static ConfigEntry<bool> VoiceEnabled_GiantWorm;
public static ConfigEntry<bool> VoiceEnabled_HoardingBug;
public static ConfigEntry<bool> VoiceEnabled_Hygrodere;
public static ConfigEntry<bool> VoiceEnabled_Jester;
public static ConfigEntry<bool> VoiceEnabled_Masked;
public static ConfigEntry<bool> VoiceEnabled_Nutcracker;
public static ConfigEntry<bool> VoiceEnabled_SporeLizard;
public static ConfigEntry<bool> VoiceEnabled_Thumper;
public static ConfigEntry<float> VoiceLineFrequency;
public static void InitConfig()
{
PluginLoader.Instance.BindConfig(ref VoiceLineFrequency, "Voice Settings", "VoiceLineFrequency", 1f, "1 is the default, and voice lines will occur every " + 15f.ToString("0") + " to " + 40f.ToString("0") + " seconds per enemy. Setting this to 2 means they will occur twice as often, 0.5 means half as often, etc.");
PluginLoader.Instance.BindConfig(ref VoiceEnabled_BaboonHawk, "Monster Voices", "Baboon Hawk", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_Bracken, "Monster Voices", "Bracken", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_BunkerSpider, "Monster Voices", "Bunker Spider", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_Centipede, "Monster Voices", "Centipede", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_CoilHead, "Monster Voices", "Coil Head", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_EyelessDog, "Monster Voices", "Eyeless Dog", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_ForestGiant, "Monster Voices", "Forest Giant", defaultValue: false);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_GhostGirl, "Monster Voices", "Ghost Girl", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_GiantWorm, "Monster Voices", "Giant Worm", defaultValue: false);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_HoardingBug, "Monster Voices", "Hoarding Bug", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_Hygrodere, "Monster Voices", "Hygrodere", defaultValue: false);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_Jester, "Monster Voices", "Jester", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_Masked, "Monster Voices", "Masked", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_Nutcracker, "Monster Voices", "Nutcracker", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_SporeLizard, "Monster Voices", "Spore Lizard", defaultValue: true);
PluginLoader.Instance.BindConfig(ref VoiceEnabled_Thumper, "Monster Voices", "Thumper", defaultValue: true);
SkinwalkerLogger.Log("VoiceEnabled_BaboonHawk" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_BaboonHawk.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_Bracken" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Bracken.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_BunkerSpider" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_BunkerSpider.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_Centipede" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Centipede.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_CoilHead" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_CoilHead.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_EyelessDog" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_EyelessDog.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_ForestGiant" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_ForestGiant.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_GhostGirl" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_GhostGirl.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_GiantWorm" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_GiantWorm.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_HoardingBug" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_HoardingBug.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_Hygrodere" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Hygrodere.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_Jester" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Jester.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_Masked" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Masked.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_Nutcracker" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Nutcracker.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_SporeLizard" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_SporeLizard.Value}]");
SkinwalkerLogger.Log("VoiceEnabled_Thumper" + $" VALUE LOADED FROM CONFIG: [{VoiceEnabled_Thumper.Value}]");
SkinwalkerLogger.Log("VoiceLineFrequency" + $" VALUE LOADED FROM CONFIG: [{VoiceLineFrequency.Value}]");
}
}
internal static class SkinwalkerLogger
{
internal static ManualLogSource logSource;
public static void Initialize(string modGUID)
{
logSource = Logger.CreateLogSource(modGUID);
}
public static void Log(object message)
{
logSource.LogInfo(message);
}
public static void LogError(object message)
{
logSource.LogError(message);
}
public static void LogWarning(object message)
{
logSource.LogWarning(message);
}
}
public class SkinwalkerModPersistent : MonoBehaviour
{
private string audioFolder;
private List<AudioClip> cachedAudio = new List<AudioClip>();
private float nextTimeToCheckFolder = 30f;
private float nextTimeToCheckEnemies = 30f;
private const float folderScanInterval = 8f;
private const float enemyScanInterval = 5f;
public static SkinwalkerModPersistent Instance { get; private set; }
private void Awake()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
Instance = this;
((Component)this).transform.position = Vector3.zero;
SkinwalkerLogger.Log("Skinwalker Mod Object Initialized");
audioFolder = Path.Combine(Application.dataPath, "..", "Dissonance_Diagnostics");
EnableRecording();
if (!Directory.Exists(audioFolder))
{
Directory.CreateDirectory(audioFolder);
}
}
private void Start()
{
try
{
if (Directory.Exists(audioFolder))
{
Directory.Delete(audioFolder, recursive: true);
}
}
catch (Exception message)
{
SkinwalkerLogger.Log(message);
}
}
private void OnApplicationQuit()
{
DisableRecording();
}
private void EnableRecording()
{
DebugSettings.Instance.EnablePlaybackDiagnostics = true;
DebugSettings.Instance.RecordFinalAudio = true;
}
private void Update()
{
if (Time.realtimeSinceStartup > nextTimeToCheckFolder)
{
nextTimeToCheckFolder = Time.realtimeSinceStartup + 8f;
if (!Directory.Exists(audioFolder))
{
SkinwalkerLogger.Log("Audio folder not present. Don't worry about it, it will be created automatically when you play with friends. (" + audioFolder + ")");
return;
}
string[] files = Directory.GetFiles(audioFolder);
foreach (string text in files)
{
SkinwalkerLogger.Log("Got audio file path " + text);
((MonoBehaviour)this).StartCoroutine(LoadWavFile(text, delegate(AudioClip audioClip)
{
cachedAudio.Add(audioClip);
}));
}
}
if (!(Time.realtimeSinceStartup > nextTimeToCheckEnemies))
{
return;
}
nextTimeToCheckEnemies = Time.realtimeSinceStartup + 5f;
EnemyAI[] array = Object.FindObjectsOfType<EnemyAI>(true);
EnemyAI[] array2 = array;
SkinwalkerBehaviour skinwalkerBehaviour = default(SkinwalkerBehaviour);
foreach (EnemyAI val in array2)
{
SkinwalkerLogger.Log("IsEnemyEnabled " + ((Object)val).name + " " + IsEnemyEnabled(val));
if (IsEnemyEnabled(val) && !((Component)val).TryGetComponent<SkinwalkerBehaviour>(ref skinwalkerBehaviour))
{
((Component)val).gameObject.AddComponent<SkinwalkerBehaviour>().Initialize(val);
}
}
}
private bool IsEnemyEnabled(EnemyAI enemy)
{
if ((Object)(object)enemy == (Object)null)
{
return false;
}
return ((Object)((Component)enemy).gameObject).name switch
{
"MaskedPlayerEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Masked.Value,
"NutcrackerEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Nutcracker.Value,
"BaboonHawkEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_BaboonHawk.Value,
"Flowerman(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Bracken.Value,
"SandSpider(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_BunkerSpider.Value,
"RedLocustBees(Clone)" => false,
"Centipede(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Centipede.Value,
"SpringMan(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_CoilHead.Value,
"MouthDog(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_EyelessDog.Value,
"ForestGiant(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_ForestGiant.Value,
"DressGirl(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_GhostGirl.Value,
"SandWorm(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_GiantWorm.Value,
"HoarderBug(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_HoardingBug.Value,
"Blob(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Hygrodere.Value,
"JesterEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Jester.Value,
"PufferEnemy(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_SporeLizard.Value,
"Crawler(Clone)" => SkinwalkerNetworkManager.Instance.VoiceEnabled_Thumper.Value,
"DocileLocustBees(Clone)" => false,
"DoublewingedBird(Clone)" => false,
_ => true,
};
}
internal IEnumerator LoadWavFile(string path, Action<AudioClip> callback)
{
UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(path, (AudioType)20);
try
{
yield return www.SendWebRequest();
if ((int)www.result == 1)
{
SkinwalkerLogger.Log("Loaded clip from path " + path);
AudioClip audioClip = DownloadHandlerAudioClip.GetContent(www);
if (audioClip.length > 0.9f)
{
callback(audioClip);
}
try
{
File.Delete(path);
}
catch (Exception e)
{
SkinwalkerLogger.LogWarning(e);
}
}
}
finally
{
((IDisposable)www)?.Dispose();
}
}
private void DisableRecording()
{
DebugSettings.Instance.EnablePlaybackDiagnostics = false;
DebugSettings.Instance.RecordFinalAudio = false;
if (Directory.Exists(audioFolder))
{
Directory.Delete(audioFolder, recursive: true);
}
}
public AudioClip GetSample()
{
if (cachedAudio.Count > 0)
{
int index = Random.Range(0, cachedAudio.Count - 1);
AudioClip result = cachedAudio[index];
cachedAudio.RemoveAt(index);
return result;
}
while (cachedAudio.Count > 200)
{
cachedAudio.RemoveAt(0);
}
return null;
}
public void ClearCache()
{
cachedAudio.Clear();
}
}
internal static class SkinwalkerNetworkManagerHandler
{
internal static void ClientConnectInitializer(Scene sceneName, LoadSceneMode sceneEnum)
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
if (((Scene)(ref sceneName)).name == "SampleSceneRelay")
{
GameObject val = new GameObject("SkinwalkerNetworkManager");
val.AddComponent<NetworkObject>();
val.AddComponent<SkinwalkerNetworkManager>();
Debug.Log((object)"Initialized SkinwalkerNetworkManager");
}
}
}
internal class SkinwalkerNetworkManager : NetworkBehaviour
{
public NetworkVariable<bool> VoiceEnabled_BaboonHawk = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_Bracken = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_BunkerSpider = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_Centipede = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_CoilHead = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_EyelessDog = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_ForestGiant = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_GhostGirl = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_GiantWorm = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_HoardingBug = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_Hygrodere = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_Jester = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_Masked = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_Nutcracker = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_SporeLizard = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<bool> VoiceEnabled_Thumper = new NetworkVariable<bool>(true, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public NetworkVariable<float> VoiceLineFrequency = new NetworkVariable<float>(1f, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);
public static SkinwalkerNetworkManager Instance { get; private set; }
private void Awake()
{
Instance = this;
if (GameNetworkManager.Instance.isHostingGame)
{
VoiceEnabled_BaboonHawk.Value = SkinwalkerConfig.VoiceEnabled_BaboonHawk.Value;
VoiceEnabled_Bracken.Value = SkinwalkerConfig.VoiceEnabled_Bracken.Value;
VoiceEnabled_BunkerSpider.Value = SkinwalkerConfig.VoiceEnabled_BunkerSpider.Value;
VoiceEnabled_Centipede.Value = SkinwalkerConfig.VoiceEnabled_Centipede.Value;
VoiceEnabled_CoilHead.Value = SkinwalkerConfig.VoiceEnabled_CoilHead.Value;
VoiceEnabled_EyelessDog.Value = SkinwalkerConfig.VoiceEnabled_EyelessDog.Value;
VoiceEnabled_ForestGiant.Value = SkinwalkerConfig.VoiceEnabled_ForestGiant.Value;
VoiceEnabled_GhostGirl.Value = SkinwalkerConfig.VoiceEnabled_GhostGirl.Value;
VoiceEnabled_GiantWorm.Value = SkinwalkerConfig.VoiceEnabled_GiantWorm.Value;
VoiceEnabled_HoardingBug.Value = SkinwalkerConfig.VoiceEnabled_HoardingBug.Value;
VoiceEnabled_Hygrodere.Value = SkinwalkerConfig.VoiceEnabled_Hygrodere.Value;
VoiceEnabled_Jester.Value = SkinwalkerConfig.VoiceEnabled_Jester.Value;
VoiceEnabled_Masked.Value = SkinwalkerConfig.VoiceEnabled_Masked.Value;
VoiceEnabled_Nutcracker.Value = SkinwalkerConfig.VoiceEnabled_Nutcracker.Value;
VoiceEnabled_SporeLizard.Value = SkinwalkerConfig.VoiceEnabled_SporeLizard.Value;
VoiceEnabled_Thumper.Value = SkinwalkerConfig.VoiceEnabled_Thumper.Value;
VoiceLineFrequency.Value = SkinwalkerConfig.VoiceLineFrequency.Value;
SkinwalkerLogger.Log("HOST SENDING CONFIG TO CLIENTS");
}
SkinwalkerLogger.Log("SkinwalkerNetworkManager Awake");
}
public override void OnDestroy()
{
((NetworkBehaviour)this).OnDestroy();
SkinwalkerLogger.Log("SkinwalkerNetworkManager OnDestroy");
SkinwalkerModPersistent.Instance?.ClearCache();
}
protected override void __initializeVariables()
{
if (VoiceEnabled_BaboonHawk == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_BaboonHawk cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_BaboonHawk).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_BaboonHawk, "VoiceEnabled_BaboonHawk");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_BaboonHawk);
if (VoiceEnabled_Bracken == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Bracken cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_Bracken).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Bracken, "VoiceEnabled_Bracken");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Bracken);
if (VoiceEnabled_BunkerSpider == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_BunkerSpider cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_BunkerSpider).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_BunkerSpider, "VoiceEnabled_BunkerSpider");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_BunkerSpider);
if (VoiceEnabled_Centipede == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Centipede cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_Centipede).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Centipede, "VoiceEnabled_Centipede");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Centipede);
if (VoiceEnabled_CoilHead == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_CoilHead cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_CoilHead).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_CoilHead, "VoiceEnabled_CoilHead");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_CoilHead);
if (VoiceEnabled_EyelessDog == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_EyelessDog cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_EyelessDog).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_EyelessDog, "VoiceEnabled_EyelessDog");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_EyelessDog);
if (VoiceEnabled_ForestGiant == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_ForestGiant cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_ForestGiant).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_ForestGiant, "VoiceEnabled_ForestGiant");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_ForestGiant);
if (VoiceEnabled_GhostGirl == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_GhostGirl cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_GhostGirl).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_GhostGirl, "VoiceEnabled_GhostGirl");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_GhostGirl);
if (VoiceEnabled_GiantWorm == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_GiantWorm cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_GiantWorm).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_GiantWorm, "VoiceEnabled_GiantWorm");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_GiantWorm);
if (VoiceEnabled_HoardingBug == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_HoardingBug cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_HoardingBug).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_HoardingBug, "VoiceEnabled_HoardingBug");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_HoardingBug);
if (VoiceEnabled_Hygrodere == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Hygrodere cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_Hygrodere).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Hygrodere, "VoiceEnabled_Hygrodere");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Hygrodere);
if (VoiceEnabled_Jester == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Jester cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_Jester).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Jester, "VoiceEnabled_Jester");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Jester);
if (VoiceEnabled_Masked == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Masked cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_Masked).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Masked, "VoiceEnabled_Masked");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Masked);
if (VoiceEnabled_Nutcracker == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Nutcracker cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_Nutcracker).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Nutcracker, "VoiceEnabled_Nutcracker");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Nutcracker);
if (VoiceEnabled_SporeLizard == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_SporeLizard cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_SporeLizard).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_SporeLizard, "VoiceEnabled_SporeLizard");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_SporeLizard);
if (VoiceEnabled_Thumper == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceEnabled_Thumper cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceEnabled_Thumper).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceEnabled_Thumper, "VoiceEnabled_Thumper");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceEnabled_Thumper);
if (VoiceLineFrequency == null)
{
throw new Exception("SkinwalkerNetworkManager.VoiceLineFrequency cannot be null. All NetworkVariableBase instances must be initialized.");
}
((NetworkVariableBase)VoiceLineFrequency).Initialize((NetworkBehaviour)(object)this);
((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)VoiceLineFrequency, "VoiceLineFrequency");
base.NetworkVariableFields.Add((NetworkVariableBase)(object)VoiceLineFrequency);
((NetworkBehaviour)this).__initializeVariables();
}
protected internal override string __getTypeName()
{
return "SkinwalkerNetworkManager";
}
}