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.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Train;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FUCKINGCHRISTMASMOD")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FUCKINGCHRISTMASMOD")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("569358b5-40b7-40af-868e-efd4fa37c465")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
public class SnowBall : MonoBehaviour
{
public GameObject DestroyParticle;
public bool CanDamage;
public float damage = 1f;
private ItemIdentifier itid;
private Rigidbody rb;
private Vector3 velocityBeforeCollision;
private void Start()
{
itid = ((Component)this).GetComponent<ItemIdentifier>();
rb = ((Component)this).GetComponent<Rigidbody>();
}
private void FixedUpdate()
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)rb))
{
velocityBeforeCollision = rb.velocity;
}
}
private void OnCollisionEnter(Collision collision)
{
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//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_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Unknown result type (might be due to invalid IL or missing references)
//IL_019f: Unknown result type (might be due to invalid IL or missing references)
if (!itid.pickedUp && ((Vector3)(ref velocityBeforeCollision)).magnitude > 15f && CanDamage)
{
EnemyIdentifierIdentifier val = default(EnemyIdentifierIdentifier);
if ((collision.gameObject.layer == 11 || collision.gameObject.layer == 10) && collision.gameObject.TryGetComponent<EnemyIdentifierIdentifier>(ref val))
{
if (Object.op_Implicit((Object)(object)val.eid))
{
EnemyIdentifier eid = val.eid;
GameObject gameObject = collision.gameObject;
ContactPoint contact = collision.GetContact(0);
Vector3 val2 = -((ContactPoint)(ref contact)).point * 10f;
contact = collision.GetContact(0);
eid.DeliverDamage(gameObject, val2, ((ContactPoint)(ref contact)).point, damage, true, 0f, (GameObject)null, false, false);
}
rb.velocity = Vector3.zero;
return;
}
Bleeder val3 = default(Bleeder);
if (collision.gameObject.TryGetComponent<Bleeder>(ref val3))
{
val3.GetHit(((Component)this).transform.position, (GoreType)0, false);
}
}
EnemyIdentifierIdentifier val4 = default(EnemyIdentifierIdentifier);
if (CanDamage && !itid.pickedUp && (collision.gameObject.layer == 8 || collision.gameObject.layer == 24 || collision.gameObject.layer == 25 || ((collision.gameObject.layer == 11 || collision.gameObject.layer == 10) && collision.gameObject.TryGetComponent<EnemyIdentifierIdentifier>(ref val4))))
{
Object.Instantiate<GameObject>(DestroyParticle, ((Component)this).transform.position, Quaternion.identity);
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
public void HitWith(GameObject target)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
EnemyIdentifierIdentifier val = default(EnemyIdentifierIdentifier);
if (target.TryGetComponent<EnemyIdentifierIdentifier>(ref val))
{
val.eid.DeliverDamage(target, Vector3.zero, target.transform.position, damage, true, 0f, (GameObject)null, false, false);
Object.Instantiate<GameObject>(DestroyParticle, ((Component)this).transform.position, Quaternion.identity);
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
public void SetCanDamage(bool can)
{
CanDamage = can;
}
}
namespace FUCKINGCHRISTMASMOD;
[BepInPlugin("com.michi.FUCKINGCHRISTMASMOD", "FUCKINGCHRISTMASMOD", "1.0.0")]
public class FUCKINGCHRISTMASMODPlugin : BaseUnityPlugin
{
private const string MyGUID = "com.michi.FUCKINGCHRISTMASMOD";
private const string PluginName = "FUCKINGCHRISTMASMOD";
private const string VersionString = "1.0.0";
public static Dictionary<string, GameObject> cachedPrefabs = new Dictionary<string, GameObject>();
public static Dictionary<string, Material> cachedMaterials = new Dictionary<string, Material>();
public static Dictionary<string, AudioClip> cachedParrySounds = new Dictionary<string, AudioClip>();
public static Dictionary<string, AudioClip> cachedSounds = new Dictionary<string, AudioClip>();
public static Dictionary<string, ConfigEntry<bool>> Configs = new Dictionary<string, ConfigEntry<bool>>();
private List<Sprite> JollyBorders = new List<Sprite>();
public float minDistanceBetweenCorners = 50f;
public float cornerDetectionThreshold = 1E-05f;
public GameObject lightPrefab;
public static Texture2D[] snowTextures;
private static readonly Harmony Harmony = new Harmony("com.michi.FUCKINGCHRISTMASMOD");
public static ManualLogSource Log = new ManualLogSource("FUCKINGCHRISTMASMOD");
private static AssetBundle christmasBundle;
public Light mainLight;
public Color ambientLightColor = new Color(0.1f, 0.1f, 0.2f);
public Color mainLightColor = new Color(1f, 0.8f, 0.6f);
public float mainLightIntensity = 0.8f;
public int numberOfChristmasLights = 50;
public Color skyboxColor = new Color(0f, 0f, 0.1f);
public bool enableFog = true;
public Color fogColor = new Color(0.15f, 0.15f, 0.2f);
public float fogDensity = 0.02f;
public GameObject[] cornerPrefabs = (GameObject[])(object)new GameObject[3];
private void Awake()
{
Assembly executingAssembly = Assembly.GetExecutingAssembly();
christmasBundle = AssetBundle.LoadFromStream(executingAssembly.GetManifestResourceStream("FUCKINGCHRISTMASMOD.Bundles.christmas"));
PreloadCriticalAssets();
SetupConfigs();
cornerPrefabs[0] = christmasBundle.LoadAsset<GameObject>("RedBulb");
cornerPrefabs[1] = christmasBundle.LoadAsset<GameObject>("GreenBulb");
cornerPrefabs[2] = christmasBundle.LoadAsset<GameObject>("YellowBulb");
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: FUCKINGCHRISTMASMOD, VersionString: 1.0.0 is loading...");
Harmony.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: FUCKINGCHRISTMASMOD, VersionString: 1.0.0 is loaded.");
Log = ((BaseUnityPlugin)this).Logger;
SceneManager.sceneLoaded += SceneManager_sceneLoaded;
}
private void SetupConfigs()
{
Dictionary<string, bool> dictionary = new Dictionary<string, bool>
{
{ "Set Snow Textures", true },
{ "Replace Music (Most are copyrighted)", true },
{ "Replace voicelines", true },
{ "Replace HUDS", true },
{ "Icy Cerberi", true },
{ "Christmas trees", true },
{ "Replace Atmosphere", true },
{ "Snowballs (Disables leaderboard)", true },
{ "Icy water", true },
{ "Border", true }
};
foreach (KeyValuePair<string, bool> item in dictionary)
{
Configs.Add(item.Key, ((BaseUnityPlugin)this).Config.Bind<bool>("Christmas", item.Key, item.Value, (ConfigDescription)null));
}
}
private void PreloadCriticalAssets()
{
//IL_058b: Unknown result type (might be due to invalid IL or missing references)
//IL_0592: Expected O, but got Unknown
//IL_073f: Unknown result type (might be due to invalid IL or missing references)
//IL_0746: Expected O, but got Unknown
//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
//IL_05f2: Unknown result type (might be due to invalid IL or missing references)
string[] array = new string[10] { "Snowy", "ChristmasTree", "Baller", "ExplosionSnow", "SnowificationEffect", "SnowFire", "Confetti", "FireWork", "SleighTram", "SkullCookiesAndMilk" };
string[] array2 = new string[6] { "Cerb", "AngryDerb", "CerbOw", "AngryDerbOW", "Snow", "SnowParticleMat" };
string[] array3 = new string[1] { "z" };
string[] array4 = new string[80]
{
"TakeSnow", "iwantyou", "everywhereyoulook", "merrychristmas", "jollypost status", "minos intro", "Jinglement", "Jinglement2", "Claus", "Claus2",
"Preparethystocking", "PrepareThyStocking2", "ThyHolidayIsOver", "ThyHolidayIsOver2", "MERRY", "minos outro", "PRESENTLESS", "dp_intro", "dp_keepemcomin", "dp_youcantescape",
"dp_yesthatsit", "dp_thiswillhurt", "dp_nicetry", "dp_grunt", "dp_destroy", "dp_begone", "dp_thisprison", "dp_outro", "fullauto", "fullerauto",
"death_mandy", "death_shammy", "playerdeath_mandy", "playerdeath_shammy", "taunt1_mandy", "taunt1_shammy", "taunt2_mandy", "taunt3_mandy", "taunt3_shammy", "taunt4_mandy",
"waitingpuzzle_shammy", "waitingpuzzle2_mandy", "gab_intro", "gab_intro2", "gab_intro3", "woes", "naughtyfuckingboy", "gab2nd_intro1", "gab2nd_intro2", "Enough",
"gab_Taunt1", "gab_Taunt2", "gab_Taunt3", "gab_Taunt4", "gab_Taunt5", "gab_Taunt6", "gab_Taunt7", "gab_Taunt8", "gab_Taunt9", "gab_Taunt10",
"gab_Taunt11", "gab_Taunt12", "gab2nd_phaseChange2", "gab2nd_TauntAngry1", "gab2nd_TauntAngry2", "gab2nd_TauntAngry3", "gab2nd_TauntAngry4", "gab2nd_TauntAngry5", "gab2nd_TauntAngry6", "gab2nd_TauntAngry7",
"gab2nd_TauntEcstatic1", "gab2nd_TauntEcstatic2", "gab2nd_TauntEcstatic3", "gab2nd_TauntEcstatic5", "gab2nd_TauntEcstatic6", "gab2nd_TauntEcstatic7", "gab2nd_TauntEcstatic9", "gab2nd_TauntEcstatic10", "gab2nd_Woes", "gab2nd_outro"
};
string[] array5 = array;
foreach (string text in array5)
{
GameObject val = christmasBundle.LoadAsset<GameObject>(text);
if ((Object)(object)val != (Object)null)
{
cachedPrefabs[text] = val;
}
}
string[] array6 = array2;
foreach (string text2 in array6)
{
Material val2 = christmasBundle.LoadAsset<Material>(text2);
if ((Object)(object)val2 != (Object)null)
{
cachedMaterials[text2] = val2;
}
}
string[] array7 = array3;
foreach (string text3 in array7)
{
AudioClip val3 = christmasBundle.LoadAsset<AudioClip>(text3);
if ((Object)(object)val3 != (Object)null)
{
cachedParrySounds[text3] = val3;
}
}
string[] array8 = array4;
foreach (string text4 in array8)
{
AudioClip val4 = christmasBundle.LoadAsset<AudioClip>(text4);
if ((Object)(object)val4 != (Object)null)
{
cachedSounds[text4] = val4;
}
if ((Object)(object)val4 == (Object)null)
{
Debug.Log((object)("Audio " + text4 + " not found"));
}
}
Assembly executingAssembly = Assembly.GetExecutingAssembly();
string[] array9 = (from r in executingAssembly.GetManifestResourceNames()
where r.Contains("Images") && r.EndsWith(".png")
select r).ToArray();
((BaseUnityPlugin)this).Logger.LogInfo((object)array9.Length);
if (array9.Length == 0)
{
((BaseUnityPlugin)this).Logger.LogError((object)"No PNG images found in Resources!");
return;
}
string[] array10 = array9;
foreach (string text5 in array10)
{
using Stream stream = executingAssembly.GetManifestResourceStream(text5);
((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading " + text5));
try
{
byte[] array11 = new byte[stream.Length];
stream.Read(array11, 0, array11.Length);
Texture2D val5 = new Texture2D(2, 2);
if (!ImageConversion.LoadImage(val5, array11))
{
((BaseUnityPlugin)this).Logger.LogError((object)("Failed to load image from resource " + text5 + "."));
continue;
}
Sprite item = Sprite.Create(val5, new Rect(0f, 0f, (float)((Texture)val5).width, (float)((Texture)val5).height), new Vector2(0.5f, 0.5f));
JollyBorders.Add(item);
((BaseUnityPlugin)this).Logger.LogInfo((object)("Succesfully loaded " + text5));
}
catch (Exception ex)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Error processing resource " + text5 + ": " + ex.Message));
}
}
string[] array12 = (from r in executingAssembly.GetManifestResourceNames()
where r.Contains("Resources.Snow") && r.EndsWith(".png")
select r).ToArray();
snowTextures = (Texture2D[])(object)new Texture2D[array12.Length];
((BaseUnityPlugin)this).Logger.LogInfo((object)array9.Length);
if (array9.Length == 0)
{
((BaseUnityPlugin)this).Logger.LogError((object)"No PNG images found in Resources!");
return;
}
for (int n = 0; n < array12.Length; n++)
{
using Stream stream2 = executingAssembly.GetManifestResourceStream(array12[n]);
((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading " + array12[n]));
try
{
byte[] array13 = new byte[stream2.Length];
stream2.Read(array13, 0, array13.Length);
Texture2D val6 = new Texture2D(2, 2);
if (!ImageConversion.LoadImage(val6, array13))
{
((BaseUnityPlugin)this).Logger.LogError((object)("Failed to load image from resource " + array12[n] + "."));
}
else
{
snowTextures[n] = val6;
}
}
catch (Exception ex2)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Error processing resource " + array12[n] + ": " + ex2.Message));
}
}
}
private void SceneManager_sceneLoaded(Scene scene, LoadSceneMode mode)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
((MonoBehaviour)this).StartCoroutine(ProcessSceneLoadedAsync(scene));
}
private IEnumerator ProcessSceneLoadedAsync(Scene scene)
{
//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)
if (Configs["Set Snow Textures"].Value)
{
GameObject[] floors = (from x in Resources.FindObjectsOfTypeAll<GameObject>()
where x.scene == scene && (x.layer == 24 || x.layer == 25 || x.layer == 8)
select x).ToArray();
int batchSize = 50;
for (int i = 0; i < floors.Length; i += batchSize)
{
IEnumerable<GameObject> batch = floors.Skip(i).Take(batchSize);
ProcessFloorBatch(batch);
yield return null;
}
}
yield return ((MonoBehaviour)this).StartCoroutine(SetupSceneEnhancements());
}
private void ProcessFloorBatch(IEnumerable<GameObject> floors)
{
foreach (GameObject floor in floors)
{
try
{
OptimizeMaterialReplacement(floor);
}
catch (Exception ex)
{
Debug.LogError((object)("Error processing floor " + ((Object)floor).name + ": " + ex.Message));
}
}
}
private void OptimizeMaterialReplacement(GameObject floor)
{
if ((Object)(object)floor == (Object)null)
{
return;
}
if (((Object)floor).name.Contains("Statue"))
{
ReplaceStatueMaterials(floor);
}
else
{
if ((Object)(object)floor.GetComponentInChildren<ItemPlaceZone>() != (Object)null)
{
return;
}
Renderer[] componentsInChildren = floor.GetComponentsInChildren<Renderer>();
foreach (Renderer item in componentsInChildren.Where((Renderer r) => r.enabled))
{
if (item.sharedMaterials == null)
{
continue;
}
Material[] array = (Material[])(object)new Material[item.sharedMaterials.Length];
for (int i = 0; i < item.sharedMaterials.Length; i++)
{
if (!((Object)(object)item.sharedMaterials[i] == (Object)null))
{
array[i] = CreateSnowMaterial(item.sharedMaterials[i]);
}
}
item.sharedMaterials = array;
}
}
}
private void ReplaceStatueMaterials(GameObject floor)
{
Renderer val = null;
if (((Object)floor).name.Contains("StatueFake"))
{
Transform obj = floor.transform.Find("StatueBoss/Andre");
val = (Renderer)(object)((obj != null) ? ((Component)obj).GetComponent<SkinnedMeshRenderer>() : null);
}
else
{
val = (Renderer)(object)floor.GetComponent<MeshRenderer>();
}
if ((Object)(object)val != (Object)null && cachedMaterials.TryGetValue("Cerb", out var value))
{
val.materials = Enumerable.Repeat<Material>(value, val.materials.Length).ToArray();
}
}
public void ApplyRandomImageFilter()
{
if (!Configs["Border"].Value)
{
return;
}
try
{
Sprite val = JollyBorders[Random.Range(0, JollyBorders.Count)];
((BaseUnityPlugin)this).Logger.LogInfo((object)("Selected image: " + ((Object)val).name));
Image val2 = MakeBigImage();
val2.sprite = val;
val2.type = (Type)1;
val2.preserveAspect = false;
}
catch (Exception ex)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Error loading random image: " + ex.Message));
}
}
public Image MakeBigImage()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
//IL_0041: 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_0057: Expected O, but got Unknown
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject("FullScreenImageCanvas");
Canvas val2 = val.AddComponent<Canvas>();
val2.renderMode = (RenderMode)0;
val2.sortingOrder = int.MinValue;
CanvasScaler val3 = val.AddComponent<CanvasScaler>();
val3.uiScaleMode = (ScaleMode)1;
val3.referenceResolution = new Vector2(800f, 600f);
GameObject val4 = new GameObject("FullScreenImage");
val4.transform.SetParent(val.transform, false);
Image val5 = val4.AddComponent<Image>();
RectTransform rectTransform = ((Graphic)val5).rectTransform;
rectTransform.anchorMin = Vector2.zero;
rectTransform.anchorMax = Vector2.one;
rectTransform.sizeDelta = Vector2.zero;
((Graphic)val5).raycastTarget = false;
return val5;
}
private Material CreateSnowMaterial(Material originalMaterial)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
Material val = new Material(originalMaterial);
val.mainTexture = (Texture)(object)snowTextures[Random.Range(0, snowTextures.Length)];
val.SetFloat("_Glossiness", 0.5f);
val.SetFloat("_Metallic", 0f);
val.color = new Color(Color.white.r, Color.white.g, Color.white.b, originalMaterial.color.a);
return val;
}
private void ReplaceTrams()
{
Tram[] array = (from x in Resources.FindObjectsOfTypeAll<Tram>()
where ((Component)x).gameObject.scene == SceneManager.GetActiveScene()
select x).ToArray();
Tram[] array2 = array;
foreach (Tram val in array2)
{
GameObject gameObject = ((Component)val).gameObject;
MeshRenderer[] array3 = (from x in gameObject.GetComponentsInChildren<MeshRenderer>()
where ((Object)x).name.Contains("Cube")
select x).ToArray();
MeshRenderer[] array4 = array3;
foreach (MeshRenderer val2 in array4)
{
((Renderer)val2).enabled = false;
}
GameObject val3 = Object.Instantiate<GameObject>(cachedPrefabs["SleighTram"], gameObject.transform);
}
}
private void ReplaceSkulls()
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Invalid comparison between Unknown and I4
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Invalid comparison between Unknown and I4
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Invalid comparison between Unknown and I4
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_00fe: Expected O, but got Unknown
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Expected I4, but got Unknown
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
ItemIdentifier[] array = (from x in Resources.FindObjectsOfTypeAll<ItemIdentifier>()
where ((Component)x).gameObject.scene == SceneManager.GetActiveScene()
select x).ToArray();
Debug.Log((object)array.Length);
ItemIdentifier[] array2 = array;
foreach (ItemIdentifier val in array2)
{
if ((int)val.itemType != 1 && (int)val.itemType != 2 && (int)val.itemType != 3)
{
break;
}
GameObject gameObject = ((Component)val).gameObject;
((Renderer)gameObject.GetComponent<MeshRenderer>()).enabled = false;
GameObject val2 = Object.Instantiate<GameObject>(cachedPrefabs["SkullCookiesAndMilk"], gameObject.transform);
MeshRenderer[] array3 = (from x in val2.GetComponentsInChildren<MeshRenderer>()
where ((Object)((Component)x).gameObject).name.Contains("Cookie")
select x).ToArray();
MeshRenderer[] array4 = array3;
foreach (MeshRenderer val3 in array4)
{
Material val4 = new Material(((Renderer)val3).material);
ItemType itemType = val.itemType;
ItemType val5 = itemType;
switch (val5 - 1)
{
case 0:
val4.color = Color.cyan;
break;
case 1:
val4.color = Color.red;
break;
case 2:
val4.color = Color.green;
break;
}
((Renderer)val3).material = val4;
}
}
}
private IEnumerator SetupSceneEnhancements()
{
SetupAmbientLighting();
SetupMainLighting();
SetupFog();
SetupChristmasLights();
ApplyRandomImageFilter();
ReplaceTrams();
ReplaceSkulls();
yield return ((MonoBehaviour)this).StartCoroutine(ReplaceTreesAsync());
DetectAndSpawnCorners();
Shader.SetGlobalTexture("_SandTex", (Texture)(object)snowTextures[Random.Range(0, snowTextures.Length)]);
GameObject instantiatedSnow = Object.Instantiate<GameObject>(cachedPrefabs["Snowy"], ((Component)MonoSingleton<NewMovement>.Instance).transform);
instantiatedSnow.transform.localPosition = new Vector3(0f, 100f, 0f);
instantiatedSnow.GetComponent<ParticleSystem>().time = 100f;
yield return (object)new WaitForSeconds(0.1f);
}
private IEnumerator ReplaceTreesAsync()
{
if (!Configs["Christmas trees"].Value)
{
yield return null;
}
GameObject[] trees = (from x in Resources.FindObjectsOfTypeAll<GameObject>()
where ((Object)x).name.ToLower().Contains("tree") && !((Object)x).name.ToLower().Contains("streetcleaner") && (Object)(object)x.GetComponent<MeshRenderer>() != (Object)null
select x).ToArray();
GameObject[] array = trees;
foreach (GameObject tree in array)
{
if (!Configs["Christmas trees"].Value)
{
break;
}
if ((Object)(object)tree == (Object)null || ((Object)tree).name.Contains("Suicide") || ((Object)tree).name.Contains("Hungry"))
{
continue;
}
if (!cachedPrefabs.TryGetValue("ChristmasTree", out var christmasTreePrefab))
{
Debug.LogWarning((object)("Christmas tree prefab not found for tree: " + ((Object)tree).name));
continue;
}
if ((Object)(object)christmasTreePrefab == (Object)null)
{
Debug.LogError((object)"Cached Christmas tree prefab is null!");
continue;
}
try
{
Transform obj = tree.transform.parent;
if (obj == null)
{
Scene scene = tree.scene;
obj = ((Scene)(ref scene)).GetRootGameObjects()[0].transform;
}
Transform parentTransform = obj;
GameObject replacementTree = Object.Instantiate<GameObject>(christmasTreePrefab, tree.transform.position, tree.transform.rotation, parentTransform);
if ((Object)(object)replacementTree != (Object)null)
{
replacementTree.transform.localScale = tree.transform.localScale;
Object.Destroy((Object)(object)tree);
}
else
{
Debug.LogError((object)("Failed to instantiate replacement tree for: " + ((Object)tree).name));
}
}
catch (Exception ex2)
{
Exception ex = ex2;
Debug.LogError((object)("Error replacing tree " + ((Object)tree).name + ": " + ex.Message));
}
yield return null;
christmasTreePrefab = null;
}
}
private void SetupFog()
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
if (Configs["Replace Atmosphere"].Value)
{
RenderSettings.fog = RenderSettings.fog;
if (RenderSettings.fog)
{
RenderSettings.fogColor = fogColor;
RenderSettings.fogMode = (FogMode)2;
RenderSettings.fogDensity = fogDensity;
}
}
}
private void SetupAmbientLighting()
{
//IL_0026: 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)
if (Configs["Replace Atmosphere"].Value)
{
RenderSettings.ambientMode = (AmbientMode)3;
RenderSettings.ambientLight = ambientLightColor;
if ((Object)(object)RenderSettings.skybox != (Object)null)
{
RenderSettings.skybox = RenderSettings.skybox;
RenderSettings.skybox.SetColor("_Tint", skyboxColor);
}
else
{
Debug.LogWarning((object)"Skybox material is not assigned!");
}
}
}
private void SetupMainLighting()
{
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
if (!Configs["Replace Atmosphere"].Value)
{
return;
}
if ((Object)(object)mainLight == (Object)null)
{
foreach (Light item in from x in Resources.FindObjectsOfTypeAll<Light>()
where ((Component)x).gameObject.scene == SceneManager.GetActiveScene()
select x)
{
item.color = mainLightColor;
item.intensity = mainLightIntensity;
item.shadows = (LightShadows)2;
}
}
if ((Object)(object)mainLight != (Object)null)
{
mainLight.color = mainLightColor;
mainLight.intensity = mainLightIntensity;
mainLight.shadows = (LightShadows)2;
}
}
private void SetupChristmasLights()
{
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)lightPrefab == (Object)null)
{
Debug.LogWarning((object)"Light prefab is not assigned!");
return;
}
Vector3 val = default(Vector3);
for (int i = 0; i < numberOfChristmasLights; i++)
{
((Vector3)(ref val))..ctor(Random.Range(-10f, 10f), Random.Range(2f, 5f), Random.Range(-10f, 10f));
GameObject val2 = Object.Instantiate<GameObject>(lightPrefab, val, Quaternion.identity);
Light component = val2.GetComponent<Light>();
if ((Object)(object)component != (Object)null)
{
component.color = Random.ColorHSV(0f, 1f, 0.7f, 1f, 0.8f, 1f);
component.intensity = Random.Range(0.5f, 1.5f);
component.range = Random.Range(3f, 5f);
}
}
}
private Texture2D LoadEmbeddedResourceTexture(string resourceName)
{
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Expected O, but got Unknown
Assembly executingAssembly = Assembly.GetExecutingAssembly();
using Stream stream = executingAssembly.GetManifestResourceStream(resourceName);
if (stream == null)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Resource " + resourceName + " not found."));
return null;
}
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
Texture2D val = new Texture2D(2, 2);
ImageConversion.LoadImage(val, array);
return val;
}
private void DetectAndSpawnCorners()
{
try
{
Collider[] array = (from x in Resources.FindObjectsOfTypeAll<Collider>()
where ((Component)x).gameObject.scene == SceneManager.GetActiveScene()
select x).ToArray();
List<Vector3> spawnedCorners = new List<Vector3>();
Collider[] array2 = array;
foreach (Collider val in array2)
{
if (!((Object)(object)val == (Object)null) && !val.isTrigger && (((Component)val).gameObject.layer == 8 || ((Component)val).gameObject.layer == 24 || ((Component)val).gameObject.layer == 25))
{
List<Vector3> colliderCorners = GetColliderCorners(val);
SpawnPrefabsAtCorners(((Component)val).gameObject, colliderCorners, spawnedCorners);
}
}
}
catch (Exception ex)
{
Debug.LogError((object)("Error in DetectAndSpawnCorners: " + ex.Message));
}
}
private List<Vector3> GetColliderCorners(Collider collider)
{
try
{
BoxCollider val = (BoxCollider)(object)((collider is BoxCollider) ? collider : null);
if (val != null)
{
return GetBoxColliderCorners(val);
}
MeshCollider val2 = (MeshCollider)(object)((collider is MeshCollider) ? collider : null);
if (val2 != null && val2.convex)
{
return GetConvexMeshColliderCorners(val2);
}
return new List<Vector3>();
}
catch (Exception ex)
{
Debug.LogError((object)("Error in GetColliderCorners: " + ex.Message));
return new List<Vector3>();
}
}
private List<Vector3> GetBoxColliderCorners(BoxCollider boxCollider)
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//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_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: 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)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//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_013c: Unknown result type (might be due to invalid IL or missing references)
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
List<Vector3> list = new List<Vector3>();
if ((Object)(object)boxCollider == (Object)null)
{
return list;
}
Vector3 center = boxCollider.center;
Vector3 val = boxCollider.size * 0.5f;
Vector3[] array = (Vector3[])(object)new Vector3[8]
{
new Vector3(-1f, -1f, -1f),
new Vector3(1f, -1f, -1f),
new Vector3(-1f, 1f, -1f),
new Vector3(1f, 1f, -1f),
new Vector3(-1f, -1f, 1f),
new Vector3(1f, -1f, 1f),
new Vector3(-1f, 1f, 1f),
new Vector3(1f, 1f, 1f)
};
Vector3[] array2 = array;
foreach (Vector3 val2 in array2)
{
Vector3 item = ((Component)boxCollider).transform.TransformPoint(center + Vector3.Scale(val2, val));
list.Add(item);
}
return list;
}
private List<Vector3> GetConvexMeshColliderCorners(MeshCollider meshCollider)
{
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
List<Vector3> list = new List<Vector3>();
if ((Object)(object)meshCollider == (Object)null || (Object)(object)meshCollider.sharedMesh == (Object)null)
{
return list;
}
Mesh sharedMesh = meshCollider.sharedMesh;
Vector3[] vertices = sharedMesh.vertices;
for (int i = 0; i < vertices.Length; i++)
{
Vector3 item = ((Component)meshCollider).transform.TransformPoint(vertices[i]);
int num = 0;
for (int j = 0; j < vertices.Length; j++)
{
if (i != j && Vector3.Distance(vertices[i], vertices[j]) < cornerDetectionThreshold)
{
num++;
}
}
if (num <= 2)
{
list.Add(item);
}
}
return list;
}
private void SpawnPrefabsAtCorners(GameObject parentObject, List<Vector3> corners, List<Vector3> spawnedCorners)
{
//IL_0042: 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_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
if (cornerPrefabs == null || cornerPrefabs.Length == 0 || (Object)(object)parentObject == (Object)null)
{
return;
}
foreach (Vector3 corner in corners)
{
if (!spawnedCorners.Exists((Vector3 c) => Vector3.Distance(c, corner) < minDistanceBetweenCorners))
{
try
{
GameObject val = cornerPrefabs[Random.Range(0, cornerPrefabs.Length)];
GameObject val2 = Object.Instantiate<GameObject>(val, corner, Quaternion.identity);
val2.transform.SetParent(parentObject.transform, true);
spawnedCorners.Add(corner);
}
catch (Exception ex)
{
Debug.LogError((object)("Error spawning corner prefab: " + ex.Message));
}
}
}
}
}
[HarmonyPatch(typeof(Water))]
internal class IcyPatch
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(Water __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Icy water"].Value)
{
Collider[] colliders = __instance.colliders;
foreach (Collider val in colliders)
{
val.isTrigger = false;
((Component)val).gameObject.layer = 24;
((Component)val).gameObject.tag = "Floor";
((Component)val).gameObject.isStatic = true;
}
}
}
}
[HarmonyPatch(typeof(SeasonalHats))]
internal class ChrismasHat
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(SeasonalHats __instance)
{
__instance.christmas.SetActive(true);
}
}
[HarmonyPatch(typeof(ShopZone))]
internal class TakeCareChristmas
{
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void Awake_Postfix(ShopZone __instance)
{
if (!((Object)(object)((ScreenZone)__instance).music == (Object)null))
{
((ScreenZone)__instance).music.Stop();
((ScreenZone)__instance).music.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["TakeSnow"];
((ScreenZone)__instance).music.Play();
}
}
}
[HarmonyPatch(typeof(Punch))]
internal class Snowballs
{
[HarmonyPatch("AltHit")]
[HarmonyPostfix]
public static void Awake_Postfix(Punch __instance, Transform target)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Snowballs (Disables leaderboard)"].Value && (((Component)target).gameObject.layer == 8 || ((Component)target).gameObject.layer == 24 || ((Component)target).gameObject.layer == 25) && !__instance.holding)
{
GameObject val = Object.Instantiate<GameObject>(FUCKINGCHRISTMASMODPlugin.cachedPrefabs["Baller"]);
__instance.ForceHold(val.GetComponent<ItemIdentifier>());
}
}
}
[HarmonyPatch(typeof(PrefsManager))]
internal class PrefsManagerDontWave
{
[HarmonyPatch("GetBool")]
[HarmonyPrefix]
public static bool Awake_Postfix(ref bool __result, PrefsManager __instance, string key, bool fallback = false)
{
if (key == "level_5-2.disableWaterScrolling" || key == "level_5-2.disableWaterWaves")
{
__result = true;
return false;
}
return true;
}
}
[HarmonyPatch(typeof(MusicManager))]
internal class ChrismasMusic
{
[HarmonyPatch("StartMusic")]
[HarmonyPrefix]
public static void Awake_Postfix(MusicManager __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace Music (Most are copyrighted)"].Value)
{
AudioClip[] array = (AudioClip[])(object)new AudioClip[4]
{
FUCKINGCHRISTMASMODPlugin.cachedSounds["iwantyou"],
FUCKINGCHRISTMASMODPlugin.cachedSounds["everywhereyoulook"],
FUCKINGCHRISTMASMODPlugin.cachedSounds["merrychristmas"],
FUCKINGCHRISTMASMODPlugin.cachedSounds["jollypost status"]
};
__instance.cleanTheme.clip = array[Random.Range(0, array.Length)];
__instance.battleTheme.clip = array[Random.Range(0, array.Length)];
__instance.bossTheme.clip = array[Random.Range(0, array.Length)];
}
}
[HarmonyPatch("OnEnable")]
[HarmonyPrefix]
public static void AwakeOther_Postfix(MusicManager __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace Music (Most are copyrighted)"].Value)
{
__instance.cleanTheme.Stop();
__instance.battleTheme.Stop();
__instance.bossTheme.Stop();
AudioClip[] array = (AudioClip[])(object)new AudioClip[4]
{
FUCKINGCHRISTMASMODPlugin.cachedSounds["iwantyou"],
FUCKINGCHRISTMASMODPlugin.cachedSounds["everywhereyoulook"],
FUCKINGCHRISTMASMODPlugin.cachedSounds["merrychristmas"],
FUCKINGCHRISTMASMODPlugin.cachedSounds["jollypost status"]
};
__instance.cleanTheme.clip = array[Random.Range(0, array.Length)];
__instance.battleTheme.clip = array[Random.Range(0, array.Length)];
__instance.bossTheme.clip = array[Random.Range(0, array.Length)];
__instance.cleanTheme.Play();
__instance.battleTheme.Play();
__instance.bossTheme.Play();
}
}
}
[HarmonyPatch(typeof(PostProcessV2_Handler))]
internal class SnowInsteadOfSandEnemies
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(PostProcessV2_Handler __instance)
{
Shader.SetGlobalTexture("_SandTex", (Texture)(object)FUCKINGCHRISTMASMODPlugin.snowTextures[Random.Range(0, FUCKINGCHRISTMASMODPlugin.snowTextures.Length)]);
}
}
[HarmonyPatch(typeof(Grenade))]
internal class GrenadeRocketTHingy
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(Grenade __instance)
{
if (__instance.rocket)
{
Object.Instantiate<GameObject>(FUCKINGCHRISTMASMODPlugin.cachedPrefabs["FireWork"], ((Component)__instance).transform);
}
}
}
[HarmonyPatch(typeof(Streetcleaner))]
internal class StreetcleanerSnower
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(Streetcleaner __instance)
{
ParticleSystem component = Object.Instantiate<GameObject>(FUCKINGCHRISTMASMODPlugin.cachedPrefabs["SnowFire"], ((Component)__instance.firePart).transform.parent).GetComponent<ParticleSystem>();
Object.Destroy((Object)(object)((Component)__instance.firePart).gameObject);
__instance.firePart = component;
}
}
[HarmonyPatch(typeof(Explosion))]
internal class ExplosionExplodes
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(Explosion __instance)
{
//IL_0016: 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)
Object.Instantiate<GameObject>(FUCKINGCHRISTMASMODPlugin.cachedPrefabs["Confetti"], ((Component)__instance).transform.position, FUCKINGCHRISTMASMODPlugin.cachedPrefabs["Confetti"].transform.rotation);
}
}
[HarmonyPatch(typeof(StatueBoss))]
internal class IceCerbs
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(StatueBoss __instance)
{
//IL_0483: Unknown result type (might be due to invalid IL or missing references)
if (!FUCKINGCHRISTMASMODPlugin.Configs["Icy Cerberi"].Value)
{
return;
}
try
{
if ((Object)(object)__instance == (Object)null)
{
Debug.LogError((object)"StatueBoss instance is null.");
return;
}
Statue st = __instance.st;
if ((Object)(object)st == (Object)null)
{
Debug.LogError((object)"Statue reference is null.");
return;
}
if ((Object)(object)FUCKINGCHRISTMASMODPlugin.cachedMaterials["AngryDerbOW"] != (Object)null)
{
st.woundedEnrageMaterial = FUCKINGCHRISTMASMODPlugin.cachedMaterials["AngryDerbOW"];
}
if ((Object)(object)FUCKINGCHRISTMASMODPlugin.cachedMaterials["CerbOw"] != (Object)null)
{
st.woundedMaterial = FUCKINGCHRISTMASMODPlugin.cachedMaterials["CerbOw"];
}
EnemySimplifier[] componentsInChildren = ((Component)__instance).gameObject.GetComponentsInChildren<EnemySimplifier>(true);
if (componentsInChildren != null)
{
Debug.Log((object)$"Simplifiers length: {componentsInChildren.Length}");
EnemySimplifier[] array = componentsInChildren;
foreach (EnemySimplifier val in array)
{
if (!((Object)(object)val?.meshrenderer != (Object)null))
{
continue;
}
if ((Object)(object)FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"] != (Object)null)
{
val.meshrenderer.material = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"];
if (val.meshrenderer.materials.Length != 0)
{
val.meshrenderer.materials[0] = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"];
}
((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).sharedMaterial = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"];
if (((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).sharedMaterials.Length != 0)
{
((Renderer)((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>()).sharedMaterials[0] = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"];
}
val.materialDict[(MaterialState)0] = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"];
val.materialDict[(MaterialState)2] = FUCKINGCHRISTMASMODPlugin.cachedMaterials["AngryDerb"];
}
if ((Object)(object)FUCKINGCHRISTMASMODPlugin.cachedMaterials["AngryDerb"] != (Object)null)
{
val.enragedMaterial = FUCKINGCHRISTMASMODPlugin.cachedMaterials["AngryDerb"];
}
}
}
else
{
Debug.LogWarning((object)"Simplifiers array is null or empty.");
}
SkinnedMeshRenderer[] componentsInChildren2 = ((Component)__instance).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>(true);
if (componentsInChildren2 != null)
{
Debug.Log((object)$"Simplifiers length: {componentsInChildren2.Length}");
SkinnedMeshRenderer[] array2 = componentsInChildren2;
foreach (SkinnedMeshRenderer val2 in array2)
{
if ((Object)(object)((val2 != null) ? ((Renderer)val2).material : null) != (Object)null && (Object)(object)FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"] != (Object)null)
{
((Renderer)val2).sharedMaterial = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"];
if (((Renderer)val2).sharedMaterials.Length != 0)
{
((Renderer)val2).sharedMaterials[0] = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Cerb"];
}
}
}
}
else
{
Debug.LogWarning((object)"Simplifiers array is null or empty.");
}
Transform val3 = ((Component)__instance).transform.Find("Apple");
if ((Object)(object)val3 != (Object)null)
{
Renderer component = ((Component)val3).GetComponent<Renderer>();
if ((Object)(object)component != (Object)null && (Object)(object)FUCKINGCHRISTMASMODPlugin.cachedMaterials["Snow"] != (Object)null)
{
component.material = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Snow"];
}
}
else
{
Debug.LogWarning((object)"Transform 'Apple' not found.");
}
Transform val4 = ((Component)__instance).transform.Find("Armature/Control/Waist/Chest/UArm_R/LArm_R/Hand_R/Apple_0/Sphere_8 (1)");
if ((Object)(object)val4 != (Object)null)
{
Renderer component2 = ((Component)val4).GetComponent<Renderer>();
if ((Object)(object)component2 != (Object)null && (Object)(object)FUCKINGCHRISTMASMODPlugin.cachedMaterials["Snow"] != (Object)null)
{
component2.material = FUCKINGCHRISTMASMODPlugin.cachedMaterials["Snow"];
}
Transform val5 = val4.Find("Point Light");
if ((Object)(object)val5 != (Object)null)
{
Light component3 = ((Component)val5).GetComponent<Light>();
if ((Object)(object)component3 != (Object)null)
{
component3.color = Color.white;
}
}
else
{
Debug.LogWarning((object)"Transform 'Point Light' not found.");
}
}
else
{
Debug.LogWarning((object)"Transform 'Sphere_8 (1)' not found.");
}
}
catch (Exception arg)
{
Debug.LogError((object)$"An error occurred in IceCerbs.Awake_Postfix: {arg}");
}
}
}
[HarmonyPatch(typeof(ScaleNFade))]
internal class SnowExplosion
{
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void Awake_Postfix(ScaleNFade __instance)
{
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)((Component)__instance).transform.parent == (Object)null) && ((Object)((Component)((Component)__instance).transform.parent).gameObject).name.Contains("Explosion Sand"))
{
Object.Instantiate<GameObject>(FUCKINGCHRISTMASMODPlugin.cachedPrefabs["ExplosionSnow"], ((Component)__instance).transform.parent.position, ((Component)__instance).transform.parent.rotation);
Object.Destroy((Object)(object)((Component)((Component)__instance).transform.parent).gameObject);
}
}
}
[HarmonyPatch(typeof(HudMessage))]
internal class Huddy
{
private static Dictionary<string, string> replacingDicMsg1 = new Dictionary<string, string>
{
{ "<color=orange>GROUND SLAM</color> (<color=orange>", "<color=green>SNOWGROUND SLAM</color> (<color=orange>" },
{ "ENEMIES COVERED IN SAND WILL <color=red>NOT BLEED</color>", "ENEMIES COVERED IN SNOW WILL <color=red>NOT BLEED</color>" },
{ "Press '<color=orange>'", "Press '<color=red>'" },
{ "Hold '<color=orange>'", "Hold '<color=red>'" },
{ "Most levels have secret <color=#00ffffff>SOUL ORBS</color>.$Touch them to get a <color=orange>POINT BONUS</color>.", "Most levels have secret <color=#00ffff>SNOWFLAKE ORBS</color>. $Touch them to get a <color=red>HOLIDAY BONUS</color>." },
{ "<color=orange>JUMP</color> while near a <color=orange>WALL</color> to <color=orange>WALL JUMP</color>. (Max. 3 times)", "<color=red>JUMP</color> while near a <color=green>SNOWY WALL</color> to <color=red>HOLIDAY JUMP</color>. (Max. 3 times, like a jolly sleigh ride!)" },
{ "Deal close range damage to douse yourself in <color=red>FRESH BLOOD</color>. <color=red>THIS IS THE ONLY WAY TO REGAIN HEALTH</color>.", "Deal close range damage to douse yourself in <color=green>FRESH MISTLETOE</color>. <color=red>THIS IS THE ONLY WAY TO REGAIN HOLIDAY SPIRIT</color>." },
{ "<color=orange>PUNCH</color> a <color=orange>PROJECTILE</color> with precise timing to <color=orange>DEFLECT</color> it.", "<color=red>PUNCH</color> a <color=green>SNOWBALL</color> with precise timing to <color=red>DEFLECT</color> it." },
{ "Taking damage <color=orange>TEMPORARILY</color> reduces your <color=orange>MAXIMUM HP</color>.$\"<color=#CCCCCC>HARD DAMAGE</color>\" recovers faster when playing <color=orange>STYLISHLY</color>.", "Taking damage <color=red>TEMPORARILY</color> reduces your <color=green>MAXIMUM HOLIDAY SPIRIT</color>.$<color=#CCCCCC>HARD DAMAGE</color> recovers faster when playing <color=red>JOLLY STYLE</color>." },
{ "<color=#40E7FF>REVOLVER</color>: Hold <color=orange>", "<color=#40E7FF>SNOWBALL CANNON</color>: Hold <color=red>'</color>" },
{ "Press '<color=#00DFFF>'", "Press '<color=#00FF00>'" },
{ "You're not getting away this time.", "You're not escaping the holiday cheer this time!" },
{ "<color=green>WHIPLASH</color>: Pull <color=orange>LIGHT</color> enemies to you, pull yourself to <color=orange>HEAVY</color> enemies.", "<color=green>HOLIDAY WHIPLASH</color>: Pull <color=red>SNOWFLAKE</color> enemies to you, pull yourself to <color=green>SNOWMAN</color> enemies." },
{ "<color=orange>ALTERNATE</color> versions will change a weapon's base behavior. They can be equipped at the <color=orange>SHOP</color>.", "<color=red>HOLIDAY</color> versions will change a weapon's base behavior. They can be equipped at the <color=green>SANTA'S WORKSHOP</color>." },
{ "<color=green>WHIPLASH</color>: Builds up <color=#CCCCCC>HARD DAMAGE</color> when used on <color=orange>ENEMIES</color>.$<color=orange>CANNOT REDUCE HP</color>, but risky to use at low health.", "<color=green>HOLIDAY WHIPLASH</color>: Builds up <color=#CCCCCC>SNOW DAMAGE</color> when used on <color=red>SNOWFLAKE</color> enemies.$<color=red>CANNOT REDUCE HOLIDAY SPIRIT</color>, but risky to use at low cheer." },
{ "<color=green>WHIPLASH</color>: Hold <color=orange>", "<color=green>HOLIDAY WHIPLASH</color>: Hold <color=red>" },
{ "<color=orange>ALTERNATE NAILGUN</color>: Slower firerate.$Projectiles ricochet off surfaces.", "<color=red>HOLIDAY NAILGUN</color>: Slower firerate.$Snowball projectiles ricochet off surfaces, spreading holiday cheer!" },
{ "<color=green>INTERRUPTING SENTRIES</color>:$Knuckleblaster (Red arm) <color=orange>//</color> Railcannon <color=orange>//</color> Ground slam shockwave <color=orange>//</color> Revolver to the antenna", "<color=green>HOLIDAY SENTRIES</color>:$Snowball Blaster (Red arm) <color=orange>//</color> Candy Cane Cannon <color=orange>//</color> Snowstorm slam shockwave <color=orange>//</color> Reindeer Revolver to the antenna" },
{ "<color=#00ffffff>BLUE HOOKPOINTS</color> act as slingshots", "<color=#00ffff>SANTAS HOOKPOINTS</color> act as festive slingshots, launching holiday cheer!" },
{ "<color=green>WHIPLASH</color>: Does <color=orange>NOT</color> build up <color=#CCCCCC>HARD DAMAGE</color> while <color=orange>UNDERWATER</color>.$Go nuts, have fun.", "<color=green>HOLIDAY WHIPLASH</color>: Does <color=red>NOT</color> build up <color=#CCCCCC>SNOW DAMAGE</color> while <color=blue>IN THE WINTER WONDERLAND</color>.$Go snow crazy, have fun!" },
{ "<color=orange>ALTERNATE SHOTGUN</color>: Melee only.$Move fast to deal more damage.", "<color=red>HOLIDAY SHOTGUN</color>: Melee only.$Move like a reindeer to deal more festive damage!" },
{ "Somewhere in the depths of Limbo, a mechanism is set in motion.", "Somewhere in the snowy depths of the North Pole, a jolly mechanism is set in motion!" },
{ "The <color=orange>GUTTERMAN SHIELD</color> can be <color=orange>BROKEN</color> with the <color=red>KNUCKLEBLASTER</color>. Swap arms with '<color=orange>", "The <color=green>SANTAMAN SHIELD</color> can be <color=red>SHATTERED</color> with the <color=red>SNOWBALL BLASTER</color>. Swap arms with '<color=orange>" },
{ "<color=red>WE'RE GONNA NEED A BIGGER BOOM</color>", "<color=green>WE'RE GONNA NEED A BIGGER SNOWBALL FIGHT</color>" },
{ "Something wicked this way comes.", "Something jolly this way comes!" },
{ "<color=orange>ALTERNATE REVOLVER</color>: Higher damage.$Hammer has to pull back after each shot.", "<color=red>HOLIDAY REVOLVER</color>: Higher festive damage.$Candy cane hammer has to pull back after each shot." },
{ "Nothing happens, but you feel a strange satisfaction.$You decide to name it Hank.", "Nothing happens, but you feel a warm holiday cheer.$You decide to name it Jolly Hank." },
{ "Cycle through <color=orange>EQUIPPED</color> arms with '<color=orange>", "Cycle through <color=red>HOLIDAY</color> arms with '<color=orange>" },
{ "<color=red>SPLIT</color> <color=#00ffffff>COLOR</color> doors only require <color=red>ONE</color> <color=#00ffffff>SKULL</color> to open.$If you do not seek hardship, stay indoors.", "<color=red>SNOWY</color> <color=#00ffffff>GINGERBREAD</color> doors only require <color=red>ONE</color> <color=#00ffffff>SUGAR COOKIE</color> to open.$If you do not seek holiday cheer, stay inside with cocoa." },
{ "<color=red>THANK YOU. NOW I SHALL LAY WASTE TO THIS WORLD.</color>", "<color=red>THANK YOU. NOW I SHALL SPREAD HOLIDAY CHEER THROUGHOUT THIS LAND.</color>" },
{ "<color=red>NO. IT MUST BE INNOCENT FLESH.</color>", "<color=red>NO. IT MUST BE A SWEET HOLIDAY TREAT.</color>" },
{ "Hark! Neptune has struck them dead.", "Hark! Santa has spread festive joy to all!" },
{ "<color=#00ffffff>IDOLS</color> can only be broken with <color=orange>MELEE</color>", "<color=#00ffff>SNOWMEN</color> can only be broken with <color=orange>HOLIDAY CHEER</color>" },
{ "<color=red>I AM JAKITO. BRING ME A SACRIFICE. IT WILL GIVE ME THE POWER TO ESCAPE.</color>", "<color=red>I AM SANTITO. BRING ME A HOLIDAY TREAT. IT WILL GIVE ME THE POWER TO SPREAD JOY.</color>" },
{ "<color=orange>ITEMS</color> up with \"<color=orange>)", "<color=red>HOLIDAY TREATS</color> up with \"<color=orange>" },
{ "<color=#40E7FF>NAILGUN</color>: Use <color=orange>", "<color=#40E7FF>SNOWGUN</color>: Use <color=orange>" },
{ "A <color=#00ffffff>BLUE FLASH</color> means an attack is <color=#00ffffff>UNPARRIABLE</color>", "A <color=#00ffff>SNOWY FLASH</color> means a holiday attack is <color=#00ffff>UNBLOCKABLE</color>" },
{ "<color=orange>JUMP</color> during a <color=#00ffffff>DASH</color> for a long-distance <color=#00ffffff>DASH JUMP</color>.$Cannot be performed in air.", "<color=orange>JUMP</color> during a <color=#00ffffff>SLEIGH RIDE</color> for a long-distance <color=#00ffffff>SLEIGH JUMP</color>.$Cannot be performed in the winter air." },
{ "<color=red>KNUCKLE BLASTER</color>: <color=orange>HOLD</color> '<color=orange>", "<color=red>SANTA'S BLASTER</color>: <color=orange>HOLD</color> '<color=orange>" },
{ "Only the <color=#40E7FF>FEEDBACKER</color> (<color=#40E7FF>Blue arm</color>) can <color=orange>PARRY PROJECTILES</color>. Swap arms with '<color=orange>", "Only the <color=#40E7FF>SNOWCASTER</color> (<color=#40E7FF>Frosty arm</color>) can <color=orange>DEFLECT SNOWBALLS</color>. Swap arms with '<color=orange>" },
{ "<color=#40E7FF>RAILCANNON</color>: <color=orange>RECHARGES</color> even when <color=orange>UNEQUIPPED</color>. Switch weapons to keep fighting between shots.", "<color=#40E7FF>SNOWCANNON</color>: <color=orange>RECHARGES</color> even when <color=orange>UNWRAPPED</color>. Switch to holiday cheer to keep spreading joy between snowballs." },
{ "The water has been drained", "The holiday cheer has been spread!" },
{ "An eye opens.", "A snowflake falls." },
{ "A door opens.", "A Christmas door swings wide." },
{ "Just kidding :)", "Just spreading holiday cheer :)" },
{ "HOLD [<color=orange>", "HOLD [<color=orange>" },
{ "TOMB OF KINGS", "SLEIGH OF JOY" },
{ "Nothing happens, but you're sure Hank Jr. and his Hankcestors would appreciate it... If they weren't dead.", "Nothing happens, but you're sure Jolly Hank Jr. and his Jolly Hankcestors would appreciate it... If they weren't busy spreading holiday cheer." },
{ "<color=#40E7FF>ROCKET LAUNCHER</color>: <color=orange>DIRECT</color> hits cause <color=orange>EXPLOSIONS</color>.$Indirect hits will launch enemies.", "<color=#40E7FF>SLEIGH LAUNCHER</color>: <color=orange>DIRECT</color> hits cause <color=orange>SNOWFLURRIES</color>.$Indirect hits will send enemies flying into the holiday spirit." },
{ "<color=#40E7FF>ROCKET LAUNCHER</color>: Direct hits on <color=orange>FALLING</color> enemies will cause a <color=orange>STRONGER</color> explosion", "<color=#40E7FF>SLEIGH LAUNCHER</color>: Direct hits on <color=orange>FALLING SNOWFLAKES</color> will cause a <color=orange>BIGGER</color> holiday blast" },
{ "Soldiers <color=orange>CANNOT</color> block explosions while in the <color=orange>AIR</color>.$Shoot a rocket <color=orange>NEAR</color> them to launch them.", "Elves <color=orange>CANNOT</color> block snowball explosions while in the <color=orange>WINTER AIR</color>.$Throw a snowball <color=orange>NEAR</color> them to send them flying into the holiday season." },
{ "It's a living.", "It's a merry holiday!" },
{ "A R M B O Y ! ! !", "S A N T A C L A U S ! ! !" },
{ "YOU'RE NOT SUPPOSED TO BE HERE.", "YOU'RE NOT SUPPOSED TO BE IN THE NORTH POLE!" },
{ "<color=red>F E E D I T .</color>", "<color=red>S P R E A D T H E C H E E R .</color>" },
{ "You have found a <color=orange>SECRET MISSION</color>.", "You have found a <color=orange>HOLIDAY TREASURE</color>." }
};
private static Dictionary<string, string> replacingDicMsg2 = new Dictionary<string, string>
{
{ "</color>) deals damage on direct hit.", "</color>) deals festive damage on direct hit, spreading holiday cheer!" },
{ "</color>' in the air to <color=orange>GROUND SLAM</color>.$Hold for <color=orange>SHOCKWAVE</color>. (Consumes <color=#00DFFF>STAMINA</color>)", "</color>' in the air to <color=orange>GROUND SLAM</color>.$Hold for <color=orange>SHOCKWAVE</color>. (Consumes <color=#00DFFF>STAMINA</color>)\", \"Press '<color=red>'</color>' in the air to <color=green>HOLIDAY SLAM</color>.$Hold for <color=green>SNOWSTORM</color>. (Consumes <color=#00FF00>HOLIDAY SPIRIT</color>)" },
{ "</color>' to <color=orange>PUNCH</color>.", "</color>' to <color=green>JINGLE</color>." },
{ "</color>' to <color=orange>SLIDE</color>.", "</color>' to <color=green>SLIDE DOWN THE SLEIGH</color>." },
{ "</color> to charge a <color=orange>PIERCING</color> shot.", " to charge a <color=green>SNOWPIERCING</color> shot." },
{ "</color>' to <color=#00DFFF>DASH</color>. (Consumes <color=#00DFFF>STAMINA</color>)$Can be performed in air.", "</color>' to <color=#00FF00>SLEIGH RIDE</color>. (Consumes <color=#00FF00>HOLIDAY SPIRIT</color>)$Can be performed in the air like a flying reindeer." },
{ "</color> to throw, release to pull", "</color> to throw a snowball, release to pull a snowman!" },
{ "</color>] TO BOUNCE HIGHER", "</color>] TO JUMP FOR THE STARS!" },
{ "</color> to fire a <color=orange>NAIL MAGNET</color>. Can be attached to environment to create traps.", "</color> to fire a <color=orange>SNOWFLAKE MAGNET</color>. Can be attached to the environment to create holiday traps." },
{ "</color>' to create a <color=orange>SHOCKWAVE</color> that knocks enemies back.", "</color>' to create a <color=orange>SNOWSTORM</color> that knocks enemies into the holiday spirit." }
};
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void Start_Prefix(HudMessage __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace HUDS"].Value)
{
if (replacingDicMsg1.ContainsKey(__instance.message))
{
__instance.message = replacingDicMsg1[__instance.message];
Debug.Log((object)__instance.message);
}
if (replacingDicMsg2.ContainsKey(__instance.message2))
{
__instance.message2 = replacingDicMsg2[__instance.message2];
Debug.Log((object)__instance.message2);
}
}
}
[HarmonyPatch("PlayMessage")]
[HarmonyPrefix]
public static void PlayMessage_Prefix(HudMessage __instance)
{
if (replacingDicMsg1.ContainsKey(__instance.message))
{
__instance.message = replacingDicMsg1[__instance.message];
Debug.Log((object)__instance.message);
}
if (replacingDicMsg2.ContainsKey(__instance.message2))
{
__instance.message2 = replacingDicMsg2[__instance.message2];
Debug.Log((object)__instance.message2);
}
}
}
[HarmonyPatch(typeof(SubtitledAudioSource), "OnEnable")]
public class IntroOrOutroChange
{
public static void Prefix(SubtitledAudioSource __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace voicelines"].Value)
{
if (((Object)((Component)__instance).gameObject).name == "Voice" && SceneHelper.CurrentScene == "Level P-1")
{
Debug.Log((object)"Pinos");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["minos intro"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "Outro" && SceneHelper.CurrentScene == "Level P-1")
{
Debug.Log((object)"Pinos");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["minos outro"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "Useless" && SceneHelper.CurrentScene == "Level P-1")
{
Debug.Log((object)"Pinos");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["PRESENTLESS"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "Voice" && SceneHelper.CurrentScene == "Level P-2" && ((Object)__instance.audioSource.clip).name == "sp_intro")
{
Debug.Log((object)"Pisyphus");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_intro"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "Voice" && SceneHelper.CurrentScene == "Level P-2" && ((Object)__instance.audioSource.clip).name == "sp_thisprison")
{
Debug.Log((object)"Pisyphus");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_thisprison"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "Outro" && SceneHelper.CurrentScene == "Level P-2")
{
Debug.Log((object)"Pisyphus");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_outro"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "KeepThemComing" && SceneHelper.CurrentScene == "Level P-2")
{
Debug.Log((object)"Pisyphus");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_keepemcomin"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "gab_Intro1" && SceneHelper.CurrentScene == "Level 3-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_intro"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "gab_Intro2" && SceneHelper.CurrentScene == "Level 3-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_intro2"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "gab_Intro5" && SceneHelper.CurrentScene == "Level 3-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["woes"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "gab_Intro4" && SceneHelper.CurrentScene == "Level 3-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["naughtyfuckingboy"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "Intro" && SceneHelper.CurrentScene == "Level 6-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_intro2"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "OutroVoice" && SceneHelper.CurrentScene == "Level 6-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_outro"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "Speech" && SceneHelper.CurrentScene == "Level 6-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_intro1"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "gab_Intro5" && SceneHelper.CurrentScene == "Level 6-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_Woes"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "gab_Intro3" && SceneHelper.CurrentScene == "Level 3-2")
{
Debug.Log((object)"Gabe");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_intro3"];
__instance.audioSource.Play();
}
if (((Object)((Component)__instance).gameObject).name == "IntroLine" && SceneHelper.CurrentScene == "Level 4-3")
{
Debug.Log((object)"Haha Funnies");
__instance.audioSource.Stop();
__instance.audioSource.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["waitingpuzzle2_mandy"];
AudioSource component = ((Component)((Component)__instance).transform.parent.Find("Mandalore (Skeleton)/Armature.001/Base/Hips/Chest/Shammy")).gameObject.GetComponent<AudioSource>();
component.Stop();
component.clip = FUCKINGCHRISTMASMODPlugin.cachedSounds["waitingpuzzle_shammy"];
__instance.subtitles.lines[1].time = 1.8f;
__instance.subtitles.lines[1].subtitle = "<color=#9EE6FF>This not festive!</color>";
__instance.subtitles.lines[0].subtitle = "<color=#FFC49E>I have come unfrozen!</color>";
__instance.audioSource.Play();
}
}
}
}
[HarmonyPatch(typeof(SubtitleController))]
internal class SubtitleChanger
{
private static Dictionary<string, string> replacingDic = new Dictionary<string, string>
{
{ "O Gabriel", "O Santa" },
{ "Now dawns thy reckoning", "Now dawns thy merry reckoning" },
{ "and thy gore shall glisten before the temples of man", "and thy glittering garlands shall adorn the halls of man" },
{ "My gratitude upon thee for my freedom", "My jolly gratitude upon thee for my freedom" },
{ "but the crimes thy kind have committed against humanity", "but the naughty deeds thy kind have committed against humanity" },
{ "is DEATH", "is a lump of COAL!" },
{ "Die!", "Claus!" },
{ "WEAK", "MERRY" },
{ "Prepare thyself!", "Prepare thy stocking!" },
{ "WEAK!", "MERRY!" },
{ "Judgement!", "Jinglement!" },
{ "Crush!", "Claus!" },
{ "Thy end is now!", "Thy holiday's over!" },
{ "Useless", "PRESENTLESS" },
{ "Forgive me my children", "Forgive me my elves" },
{ "for I have failed to bring you salvation", "for I have failed to bring you presents" },
{ "from this cold, dark world", "from this cold, dark pole" },
{ "This prison...", "This naughtly list..." },
{ "To hold", "To hold" },
{ "ME?", "MY NAME?" },
{ "Hmm... Indeed, I have slept long enough.", "Ho,ho ho, indeed.. I have slumbered long enough." },
{ "The kingdom of heaven has long since forgotten my name", "The jolly kingdom of christmas has long forgotten to put my name on gifts" },
{ "And I am EAGER to make them remember", "and I’m merry as to where to make them remember" },
{ "The blood of Minos stains your hands, and I must admit...", "Minos’ gift wrappers stain your hands, and I must admit..." },
{ "I'm curious about your skills, Weapon.", "I’m curious about your gift wrapping skills, Weapon." },
{ "And so, before I tear down the cities and CRUSH the armies of heaven...", "And so, before I tear down the Christmas trees and crush the jolly decorations..." },
{ "Come forth, Child of Man...", "Come forth, Child of Christmas…" },
{ "And DIE.", "and BE MERRY." },
{ "So concludes the life and times of King Sisyphus", "So concludes the holiday spirit of King Sisyphus" },
{ "A fitting end to an existence defined by futile struggle,", "A fitting end to an existence defined by giving gifts," },
{ "Doomed from the very start...", "On the naughtylist from the very start" },
{ "And I don't regret a SECOND of it!", "But I don't regret a SECOND of it!" },
{ "YES! That's it!", "YES! That's Christmas spirit!" },
{ "Nice try!", "Hohohoho!" },
{ "DESTROY!", "GIFT FOR YOU" },
{ "You can't escape!", "You can't gift!" },
{ "BE GONE!", "BE JOLLY!" },
{ "This will hurt.", "This will be merry." },
{ "Full auto", "Merry Christmas" },
{ "Fuller auto", "Merrier Christmas" },
{ "<color=#9EE6FF>Oh great, now we lost the fight, fantastic</color>", "<color=#FFC49E>Im dying nooooo merry christmas</color>" },
{ "The layers of this palace are not for your kind", "The layers of this jolly palace are not for your kind" },
{ "Turn back or you will be crossing the will of God", "Turn back, or you will be crossing the will of Claus." },
{ "As the righteous hand of the father", "As the righteous hand of the Santa" },
{ "And you will become inanimate once more", "And you will be wrapped into a present once more" },
{ "BEHOLD! THE POWER OF AN ANGEL", "BEHOLD! THE POWER OF THE CHRISTMAS SPIRIT" },
{ "You insignificant FUCK!", "You NAUGHTY FUCKING BOY" },
{ "THIS IS NOT OVER!", "CHRISTMAS IS NOT YET OVER" },
{ "May your woes be many", "May your coals be many" },
{ "and your days few", "and your gifts few" },
{ "All gone...", "No longer jolly..." },
{ "Your kind know nothing but hunger", "Your kind know nothing but broken candy canes" },
{ "Purged all life on the upper layers", "Purged all jollyness on the upper layers" },
{ "HATRED", "FESTIVENESS" },
{ "I will cut you down", "I will gift you coal" },
{ "Break you apart", "Coat you in eggnog" },
{ "Splay the gore of your profane form across the STARS!", "Put your head onto the top of my christmas tree on the EVE!" },
{ "I will grind you down until the very SPARKS CRY FOR MERCY!", "I will wrap you into a box and gift you to the fucking GRINCH himself!" },
{ "My hands shall RELISH ENDING YOU...", "my hands shall GET TO PACKING YOU" },
{ "Beaten by an object... Twice!", "Beaten by this naughty fucker... Twice!" },
{ "I've only known the taste of victory,", "I've only known the taste of merry christmas," },
{ "Is this my blood?", "Is this cold chocolate?" },
{ "Such... relief..?", "Such... jolly relief..?" },
{ "We will meet again, machine", "Until the next christmas we meet, machine" }
};
[HarmonyPatch("DisplaySubtitle", new Type[]
{
typeof(string),
typeof(AudioSource),
typeof(bool)
})]
[HarmonyPrefix]
public static void Awake_Postfix(SubtitleController __instance, ref string caption)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace voicelines"].Value && replacingDic.ContainsKey(caption))
{
caption = replacingDic[caption];
}
}
}
[HarmonyPatch(typeof(BossBarManager))]
internal class NameChanger
{
private static Dictionary<string, string> replacingDic = new Dictionary<string, string>
{
{ "MALICIOUS FACE", "MERRY FACE" },
{ "SWORDSMACHINE", "SNOWSMACHINE" },
{ "CERBERUS", "THROWER OF ORNAMENTS" },
{ "CERBERUS, GUARDIAN OF HELL", "THROWER OF ORNAMENTS, GUARDIAN OF THE NORTHPOLE" },
{ "HIDEOUS MASS", "HOLLY MASS" },
{ "V2", "VCLAUS" },
{ "THE CORPSE OF KING MINOS", "THE SNOWMAN OF KING MINOS" },
{ "FILTH", "JOLLY FILTH" },
{ "SCHISM", "JOLLY SCHISM" },
{ "STRAY", "JOLLY STRAY" },
{ "SOLDIER", "JOLLY SOLDIER" },
{ "STALKER", "SNOWER" },
{ "SISYPHEAN INSURRECTIONIST", "INSURSNOWIST" },
{ "FERRYMAN", "JOLLYMAN" },
{ "DRONE", "JOLLY DRONE" },
{ "STREETCLEANER", "SNOWCLEANER" },
{ "MINDFLAYER", "SNOWFLAYER" },
{ "SENTRY", "JOLLY SENTRY" },
{ "GUTTERMAN", "JOLLYMAN" },
{ "GUTTERTANK", "JOLLYTANK" },
{ "1000-THR \"EARTHMOVER\"", "2512-JOLLY \"SNOWMAKER\"" },
{ "IDOL", "SNOWMAN" },
{ "MANNEQUIN", "SNOWQUIN" },
{ "<S>MINOTAUR", "<s>SNOWOTAUR" },
{ "GABRIEL, JUDGE OF HELL", "GABRIEL, JUDGE OF CHRISTMAS" },
{ "GABRIEL, THE APOSTATE OF HATE", "GABRIEL, THE APOSTATE OF CHRISTMAS" },
{ "VIRTUE", "JOLLY VIRTUE" },
{ "CANCEROUS RODENT", "JOLLYNESS RODENT" },
{ "VERY CANCEROUS RODENT", "VERY JOLLY RODENT" },
{ "MYSTERIOUS DRUID KNIGHT (& OWL)", "JOLLY DRUID KNIGHT (& ELF)" },
{ "BIG JOHNINATOR", "JOLLY SNOWINATOR" },
{ "PUPPER", "JOLLY PUPPET" },
{ "FLESH PRISON", "NICE LIST" },
{ "FLESH PANOPTICON", "NAUGHTY LIST" },
{ "MINOS PRIME", "JOLLY PRIME" },
{ "SISYPHUS PRIME", "NAUGHTY PRIME" },
{ "LEVIATHAN", "JOLLY LEVIATHAN" }
};
[HarmonyPatch("CreateBossBar")]
[HarmonyPrefix]
public static void Awake_Postfix(ref BossHealthBar bossBar, BossBarManager __instance)
{
if (replacingDic.ContainsKey(bossBar.bossName.ToUpper()))
{
bossBar.bossName = replacingDic[bossBar.bossName.ToUpper()];
}
}
}
[HarmonyPatch(typeof(TimeOfDayChanger))]
public static class TimeOfDayChangerPatch
{
public static Light mainLight;
public static Color ambientLightColor = new Color(0.1f, 0.1f, 0.2f);
public static Color mainLightColor = new Color(1f, 0.8f, 0.6f);
public static float mainLightIntensity = 0.8f;
public static int numberOfChristmasLights = 50;
public static Color skyboxColor = new Color(0f, 0f, 0.1f);
public static bool enableFog = true;
public static Color fogColor = new Color(0.15f, 0.15f, 0.2f);
public static float fogDensity = 0.02f;
[HarmonyPrefix]
[HarmonyPatch("Activate")]
private static void ActivatePostfix(TimeOfDayChanger __instance)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: 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)
__instance.fogColor = fogColor;
__instance.skyboxColor = skyboxColor;
if ((Object)(object)__instance.newSky != (Object)null)
{
__instance.newSky.SetColor("_Tint", skyboxColor);
}
Light[] newLights = __instance.newLights;
foreach (Light val in newLights)
{
val.color = mainLightColor;
val.intensity = mainLightIntensity;
}
}
}
[HarmonyPatch(typeof(HurtZone))]
internal class SnowDoesntHurt
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
public static void Awake_Postfix(HurtZone __instance)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Invalid comparison between Unknown and I4
if ((int)__instance.damageType == 3)
{
Object.Destroy((Object)(object)__instance);
}
}
}
[HarmonyPatch]
public class JollyMandalore
{
[HarmonyPatch(typeof(Mandalore))]
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static bool ChangeTaunt(Mandalore __instance)
{
if (!FUCKINGCHRISTMASMODPlugin.Configs["Replace voicelines"].Value)
{
return true;
}
__instance.voiceFull = FUCKINGCHRISTMASMODPlugin.cachedSounds["fullauto"];
__instance.voiceFuller = FUCKINGCHRISTMASMODPlugin.cachedSounds["fullerauto"];
MandaloreVoice[] voices = __instance.voices;
MandaloreVoice[] array = voices;
foreach (MandaloreVoice val in array)
{
if (((Object)((Component)val).gameObject).name == "Shammy")
{
val.taunts[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["taunt1_shammy"];
val.taunts[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["taunt2_mandy"];
val.taunts[2] = FUCKINGCHRISTMASMODPlugin.cachedSounds["taunt3_shammy"];
val.death = FUCKINGCHRISTMASMODPlugin.cachedSounds["death_shammy"];
}
else
{
val.taunts[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["taunt1_mandy"];
val.taunts[2] = FUCKINGCHRISTMASMODPlugin.cachedSounds["taunt3_mandy"];
val.taunts[3] = FUCKINGCHRISTMASMODPlugin.cachedSounds["taunt4_mandy"];
val.death = FUCKINGCHRISTMASMODPlugin.cachedSounds["death_mandy"];
}
}
if (__instance.taunt)
{
int num = Random.Range(0, __instance.voices[0].taunts.Length);
MandaloreVoice[] voices2 = __instance.voices;
for (int j = 0; j < voices2.Length; j++)
{
voices2[j].Taunt(num);
}
switch (num)
{
case 0:
MonoSingleton<SubtitleController>.Instance.DisplaySubtitle("<color=#FFC49E>Is ice wet?</color>", (AudioSource)null, false);
MonoSingleton<SubtitleController>.Instance.DisplaySubtitle("<color=#9EE6FF>Get this guy some coal</color>", 1.2f, ((Component)__instance).gameObject);
return false;
case 1:
MonoSingleton<SubtitleController>.Instance.DisplaySubtitle("<color=#9EE6FF>Your list doesn't star with An</color>", (AudioSource)null, false);
return false;
case 2:
MonoSingleton<SubtitleController>.Instance.DisplaySubtitle("<color=#9EE6FF>I saw this in a movie once</color>", (AudioSource)null, false);
MonoSingleton<SubtitleController>.Instance.DisplaySubtitle("<color=#FFC49E>Yo this milk rotting</color>", 1.15f, ((Component)__instance).gameObject);
return false;
case 3:
break;
default:
return false;
}
MonoSingleton<SubtitleController>.Instance.DisplaySubtitle("<color=#FFC49E>THIS IS NOT FESTIVE</color>", (AudioSource)null, false);
}
return false;
}
[HarmonyPatch(typeof(MandaloreVoice))]
[HarmonyPatch("Death")]
[HarmonyPostfix]
public static void ChangeDeath(MandaloreVoice __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace voicelines"].Value)
{
MonoSingleton<SubtitleController>.Instance.DisplaySubtitle("<color=#FFC49E>Yo who put coal in my sock?</color>", 3f, ((Component)__instance).gameObject);
}
}
}
[HarmonyPatch(typeof(MinosPrime))]
public class JollyMinosPrime
{
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void ChangeTaunt(MinosPrime __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace voicelines"].Value)
{
Debug.Log((object)"Changing voices");
__instance.dropkickVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["Jinglement"];
__instance.dropkickVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["Jinglement2"];
__instance.dropAttackVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["Claus"];
__instance.riderKickVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["Claus2"];
__instance.riderKickVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["Claus"];
__instance.comboVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["Preparethystocking"];
__instance.comboVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["PrepareThyStocking2"];
__instance.boxingVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["ThyHolidayIsOver"];
__instance.boxingVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["ThyHolidayIsOver2"];
__instance.phaseChangeVoice = FUCKINGCHRISTMASMODPlugin.cachedSounds["MERRY"];
AudioSource aud = __instance.aud;
aud.maxDistance *= 4f;
AudioSource aud2 = __instance.aud;
aud2.volume *= 4f;
Debug.Log((object)"Voices changed");
}
}
}
[HarmonyPatch(typeof(GabrielVoice))]
public class JollyGabe
{
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void ChangeTaunt(GabrielVoice __instance)
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Invalid comparison between Unknown and I4
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace voicelines"].Value)
{
Debug.Log((object)"Changing voices");
if ((int)((Component)__instance).gameObject.GetComponent<EnemyIdentifier>().enemyType == 16)
{
ChangeGabeFirst(__instance);
}
else
{
ChangeGabeSecond(__instance);
}
Debug.Log((object)"Voices changed");
}
}
private static void ChangeGabeFirst(GabrielVoice __instance)
{
__instance.phaseChange = FUCKINGCHRISTMASMODPlugin.cachedSounds["Enough"];
__instance.phaseChangeSubtitle = "Christmas!";
__instance.taunt[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt1"];
__instance.taunts[0] = "You defy the spirit";
__instance.taunt[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt2"];
__instance.taunts[1] = "A mere lump";
__instance.taunt[2] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt3"];
__instance.taunts[2] = "There can be only Christ";
__instance.taunt[3] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt4"];
__instance.taunts[3] = "Merryness machine, merryness";
__instance.taunt[4] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt5"];
__instance.taunts[4] = "A grinch to be cleansed";
__instance.taunt[5] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt6"];
__instance.taunts[5] = "Not even merry";
__instance.taunt[6] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt7"];
__instance.taunts[6] = "This coal is rotting";
__instance.taunt[7] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt8"];
__instance.taunts[7] = "You're a cheer to be chanted";
__instance.taunt[8] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt9"];
__instance.taunts[8] = "The year is enchanting";
__instance.taunt[9] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt10"];
__instance.taunts[9] = "You are outbought";
__instance.taunt[10] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt11"];
__instance.taunts[10] = "Your crime is jollyness";
__instance.taunt[11] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab_Taunt12"];
__instance.taunts[11] = "You make even the devil jolly";
}
private static void ChangeGabeSecond(GabrielVoice __instance)
{
__instance.phaseChange = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_phaseChange2"];
__instance.phaseChangeSubtitle = "Is that how merry you can be?";
__instance.taunt[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntAngry1"];
__instance.taunts[0] = "IS THIS WHAT I CAROLED TO?";
__instance.taunt[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntAngry2"];
__instance.taunts[1] = "YOU'RE GETTING JOLLY MACHINE";
__instance.taunt[2] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntAngry3"];
__instance.taunts[2] = "LETS CAROL THIS";
__instance.taunt[3] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntAngry4"];
__instance.taunts[3] = "NOTHING BUT COAL";
__instance.taunt[4] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntAngry5"];
__instance.taunts[4] = "ILL SHOW YOU MERRY CHRISTMAS";
__instance.taunt[5] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntAngry6"];
__instance.taunts[5] = "TIME TO DECK MY HALLS";
__instance.taunt[6] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntAngry7"];
__instance.taunts[6] = "YOU NEED MORE SPIRIT";
__instance.tauntSecondPhase[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntEcstatic1"];
__instance.tauntsSecondPhase[0] = "I've never had a night like this before";
__instance.tauntSecondPhase[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntEcstatic2"];
__instance.tauntsSecondPhase[1] = "Show me what you're slave for";
__instance.tauntSecondPhase[2] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntEcstatic3"];
__instance.tauntsSecondPhase[2] = "ho ho ho";
__instance.tauntSecondPhase[3] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntEcstatic5"];
__instance.tauntsSecondPhase[3] = "What is this greeting?";
__instance.tauntSecondPhase[4] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntEcstatic6"];
__instance.tauntsSecondPhase[4] = "Merry";
__instance.tauntSecondPhase[5] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntEcstatic7"];
__instance.tauntsSecondPhase[5] = "So this is what you see in christmas";
__instance.tauntSecondPhase[6] = FUCKINGCHRISTMASMODPlugin.cachedSounds["gab2nd_TauntEcstatic8"];
__instance.tauntsSecondPhase[6] = "I will show you true spirit";
}
}
[HarmonyPatch(typeof(SisyphusPrime))]
public class JollySisyphussPrime
{
[HarmonyPatch("Start")]
[HarmonyPrefix]
public static void ChangeTaunt(SisyphusPrime __instance)
{
if (FUCKINGCHRISTMASMODPlugin.Configs["Replace voicelines"].Value)
{
Debug.Log((object)"Changing voices");
__instance.clapVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_begone"];
__instance.clapVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_begone"];
__instance.tauntVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_nicetry"];
__instance.tauntVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_nicetry"];
__instance.explosionVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_thiswillhurt"];
__instance.hurtVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_grunt"];
__instance.stompComboVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_youcantescape"];
__instance.stompComboVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_youcantescape"];
__instance.uppercutComboVoice[0] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_destroy"];
__instance.uppercutComboVoice[1] = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_destroy"];
__instance.phaseChangeVoice = FUCKINGCHRISTMASMODPlugin.cachedSounds["dp_yesthatsit"];
AudioSource aud = __instance.aud;
aud.maxDistance *= 4f;
AudioSource aud2 = __instance.aud;
aud2.volume *= 4f;
Debug.Log((object)"Voices changed");
}
}
}
[HarmonyPatch(typeof(TimeController))]
public class JollyParries
{
[HarmonyPatch("ParryFlash")]
public static void ParrySound()
{
}
}