Decompiled source of TsundereCompany v0.0.0

TsundereProject.dll

Decompiled 6 months ago
using System;
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.Logging;
using HarmonyLib;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("TsundereProject")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("TakuDev")]
[assembly: AssemblyProduct("TsundereProject")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("518962a4-1cf9-40c3-8f6b-171607d4b289")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace TsundereProject;

[BepInPlugin("TakuDev.TsundereMod", "Tsundere Mod", "0.0.0.1")]
public class TsundereClass : BaseUnityPlugin
{
	private const string modGUID = "TakuDev.TsundereMod";

	private const string modName = "Tsundere Mod";

	private const string modVersion = "0.0.0.1";

	private readonly Harmony harmony = new Harmony("TakuDev.TsundereMod");

	public static TsundereClass Instance;

	public static ManualLogSource mls;

	public static Texture2D mainLogo;

	public static Texture2D newMainBackground;

	public static AudioClip newMenuMusic;

	public static AudioClip newOpenMenuSound;

	public static AudioClip[] newHoarderBugSFX;

	public static AudioClip[] newHoarderBugSFXAngry;

	public static AudioClip newMouthDogSFX;

	public static AudioClip newMouthDogScreamSFX;

	public static AudioClip newTurretDetectPlayerSFX;

	public static AudioClip newTurretFiringSFX;

	public static AudioClip[] newShovelSFX;

	public static AudioClip[] newNoisemakerSFX;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		mls = Logger.CreateLogSource("TakuDev.TsundereMod");
		mls.LogInfo((object)"Tsundere mod awaken. Welcome LunaHyu");
		mls.LogInfo((object)"Applying Assets");
		Assets.PopulateAssets();
		harmony.PatchAll();
		LoadAssets();
	}

	private static void LoadAssets()
	{
		mainLogo = Assets.MainAssetBundle.LoadAsset<Texture2D>("assets/TsundereCompany.png");
		newMainBackground = Assets.MainAssetBundle.LoadAsset<Texture2D>("assets/OverlayLethalCompany.png");
		newMenuMusic = Assets.MainAssetBundle.LoadAsset<AudioClip>("assets/greedygreedy.mp3");
		newOpenMenuSound = Assets.MainAssetBundle.LoadAsset<AudioClip>("assets/rizz.mp3");
		newHoarderBugSFX = Assets.MainAssetBundle.LoadAssetWithSubAssets<AudioClip>("assets/potatochips.mp3");
		newHoarderBugSFXAngry = Assets.MainAssetBundle.LoadAssetWithSubAssets<AudioClip>("assets/gneugneu.mp3");
		newMouthDogSFX = Assets.MainAssetBundle.LoadAsset<AudioClip>("assets/wanwan.mp3");
		newMouthDogScreamSFX = Assets.MainAssetBundle.LoadAsset<AudioClip>("assets/agrouagrou.mp3");
		newTurretDetectPlayerSFX = Assets.MainAssetBundle.LoadAsset<AudioClip>("assets/coucoumissjirachi.mp3");
		newTurretFiringSFX = Assets.MainAssetBundle.LoadAsset<AudioClip>("assets/TATATATA.mp3");
		newShovelSFX = Assets.MainAssetBundle.LoadAssetWithSubAssets<AudioClip>("assets/squeakytoy.mp3");
		newNoisemakerSFX = Assets.MainAssetBundle.LoadAssetWithSubAssets<AudioClip>("assets/rubber_chicken.mp3");
	}
}
[HarmonyPatch(typeof(PreInitSceneScript))]
public static class PreInitSceneScriptPatch
{
	public static GameObject gameObject;

	[HarmonyPatch("Awake")]
	[HarmonyPostfix]
	public static void Postfix(PreInitSceneScript __instance)
	{
		//IL_010d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_015f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0273: Unknown result type (might be due to invalid IL or missing references)
		//IL_029c: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
		try
		{
			TsundereClass.mls.LogInfo((object)"ALLO ALLLO");
			try
			{
				gameObject = ((Component)Object.FindAnyObjectByType<Canvas>()).gameObject;
				((TMP_Text)((Component)gameObject.transform.Find("GameObject").Find("Header")).GetComponent<TextMeshProUGUI>()).text = "LANCEMENT DE BALLON";
				TsundereClass.mls.LogInfo((object)((Object)gameObject.transform.Find("GameObject").Find("Header")).name);
				GameObject obj = ((Component)gameObject.transform.Find("GameObject").Find("LANOrOnline")).gameObject;
				GameObject obj2 = ((Component)obj.transform.Find("OnlineButton")).gameObject;
				((TMP_Text)((Component)obj2.transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).text = "> Avec les hoshii";
				((TMP_Text)((Component)obj2.transform.Find("Text (TMP) (1)")).GetComponent<TextMeshProUGUI>()).text = "Avec les hoshii";
				((Component)obj2.transform.Find("Text (TMP)")).GetComponent<RectTransform>().sizeDelta = new Vector2(150f, 0f);
				((Component)obj2.transform.Find("Text (TMP) (1)")).GetComponent<RectTransform>().sizeDelta = new Vector2(200f, 0f);
				((Component)obj2.transform.Find("Text (TMP)")).GetComponent<RectTransform>().offsetMin = new Vector2(0f, 0f);
				((Component)obj2.transform.Find("Text (TMP) (1)")).GetComponent<RectTransform>().offsetMin = new Vector2(5f, 0f);
				((TMP_Text)((Component)obj2.transform.Find("recommendedText")).GetComponent<TextMeshProUGUI>()).text = "(Recommandé pour les ballons)";
				((Component)obj2.transform.Find("recommendedText")).GetComponent<RectTransform>().sizeDelta = new Vector2(500f, 5f);
				((Component)obj2.transform.Find("recommendedText")).GetComponent<RectTransform>().offsetMin = new Vector2(225f, -2.5f);
				GameObject obj3 = ((Component)obj.transform.Find("LANButton")).gameObject;
				((TMP_Text)((Component)obj3.transform.Find("Text (TMP)")).GetComponent<TextMeshProUGUI>()).text = "> Sans les hoshii";
				((TMP_Text)((Component)obj3.transform.Find("Text (TMP) (1)")).GetComponent<TextMeshProUGUI>()).text = "Sans les hoshii";
				((Component)obj3.transform.Find("Text (TMP)")).GetComponent<RectTransform>().sizeDelta = new Vector2(150f, 0f);
				((Component)obj3.transform.Find("Text (TMP) (1)")).GetComponent<RectTransform>().sizeDelta = new Vector2(200f, 0f);
				((Component)obj3.transform.Find("Text (TMP)")).GetComponent<RectTransform>().offsetMin = new Vector2(0f, 0f);
				((Component)obj3.transform.Find("Text (TMP) (1)")).GetComponent<RectTransform>().offsetMin = new Vector2(5f, 0f);
				TsundereClass.mls.LogInfo((object)"[TSUNDEREPROJECT] SETTING AUDIO LAUNCH MODE MUSIC");
				gameObject.AddComponent<AudioSource>().PlayOneShot(TsundereClass.newOpenMenuSound);
			}
			catch (Exception ex)
			{
				TsundereClass.mls.LogInfo((object)"[TSUNDEREPROJECT] SOMETHING WRONG !");
				TsundereClass.mls.LogInfo((object)ex.Message);
			}
		}
		catch (Exception ex2)
		{
			TsundereClass.mls.LogInfo((object)"[TSUNDEREPROJECT] ALED !");
			TsundereClass.mls.LogInfo((object)ex2.StackTrace);
		}
	}

	[HarmonyPatch("SkipToFinalSetting")]
	[HarmonyPostfix]
	public static void SkipToFinalSettingPatch()
	{
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		try
		{
			TsundereClass.mls.LogInfo((object)"[TSUNDERE CLASS] Patch final settings... (Header text)");
			((TMP_Text)((Component)gameObject.transform.Find("GameObject").Find("Header")).GetComponent<TextMeshProUGUI>()).text = "LANCEMENT DE BALLON ★";
			((Component)gameObject.transform.Find("GameObject").Find("Header")).GetComponent<RectTransform>().sizeDelta = new Vector2(500f, ((Component)gameObject.transform.Find("GameObject").Find("Header")).GetComponent<RectTransform>().sizeDelta.y);
		}
		catch (Exception ex)
		{
			TsundereClass.mls.LogInfo((object)"[TSUNDEREPROJECT] SOMETHING WRONG !");
			TsundereClass.mls.LogInfo((object)ex.Message);
		}
	}
}
[HarmonyPatch(typeof(MenuManager), "Awake")]
public static class MenuManagerLogoOverridePatch
{
	public static void Postfix(MenuManager __instance)
	{
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: 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_0117: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01df: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0204: Unknown result type (might be due to invalid IL or missing references)
		//IL_022a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0234: Unknown result type (might be due to invalid IL or missing references)
		//IL_0262: Unknown result type (might be due to invalid IL or missing references)
		//IL_027d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0287: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02da: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_031d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0327: Unknown result type (might be due to invalid IL or missing references)
		//IL_0356: Unknown result type (might be due to invalid IL or missing references)
		//IL_036e: Unknown result type (might be due to invalid IL or missing references)
		//IL_037d: Unknown result type (might be due to invalid IL or missing references)
		//IL_039a: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0409: Unknown result type (might be due to invalid IL or missing references)
		//IL_0413: Unknown result type (might be due to invalid IL or missing references)
		//IL_043a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0444: Unknown result type (might be due to invalid IL or missing references)
		//IL_0473: Unknown result type (might be due to invalid IL or missing references)
		//IL_048b: Unknown result type (might be due to invalid IL or missing references)
		//IL_049a: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_050f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0514: Unknown result type (might be due to invalid IL or missing references)
		//IL_0526: Unknown result type (might be due to invalid IL or missing references)
		//IL_0530: Unknown result type (might be due to invalid IL or missing references)
		//IL_0557: Unknown result type (might be due to invalid IL or missing references)
		//IL_0561: Unknown result type (might be due to invalid IL or missing references)
		//IL_0590: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_05de: Unknown result type (might be due to invalid IL or missing references)
		//IL_062b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0630: Unknown result type (might be due to invalid IL or missing references)
		//IL_0642: Unknown result type (might be due to invalid IL or missing references)
		//IL_064c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0673: Unknown result type (might be due to invalid IL or missing references)
		//IL_067d: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_06d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_06fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0752: Unknown result type (might be due to invalid IL or missing references)
		//IL_0761: Unknown result type (might be due to invalid IL or missing references)
		//IL_07b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_07f9: Unknown result type (might be due to invalid IL or missing references)
		try
		{
			TsundereClass.mls.LogDebug((object)"Applying New Logo");
			GameObject gameObject = ((Component)((Component)__instance).transform.parent).gameObject;
			GameObject gameObject2 = ((Component)gameObject.transform.Find("MenuContainer").Find("LoadingScreen").Find("Image")).gameObject;
			GameObject gameObject3 = ((Component)gameObject.transform.Find("MenuContainer").Find("LoadingScreen").Find("LoadingTextContainer")
				.Find("LoadingText")).gameObject;
			gameObject3.GetComponent<RectTransform>().sizeDelta = new Vector2(170f, 36.178f);
			((TMP_Text)gameObject3.GetComponent<TextMeshProUGUI>()).text = "Ça charge UwU...";
			((Graphic)gameObject3.GetComponent<TextMeshProUGUI>()).color = new Color(0f, 0.753f, 0.98f);
			GameObject gameObject4 = ((Component)gameObject.transform.Find("MenuContainer").Find("MainButtons")).gameObject;
			Sprite sprite = Sprite.Create(TsundereClass.newMainBackground, new Rect(0f, 0f, (float)((Texture)TsundereClass.newMainBackground).width, (float)((Texture)TsundereClass.newMainBackground).height), new Vector2(0.5f, 0.5f), 100f);
			gameObject4.GetComponent<Image>().sprite = sprite;
			((Graphic)gameObject4.GetComponent<Image>()).color = new Color(1f, 1f, 1f);
			GameObject gameObject5 = ((Component)gameObject4.transform.Find("HostButton")).gameObject;
			TextMeshProUGUI component = ((Component)gameObject5.transform.Find("Text (TMP)")).gameObject.GetComponent<TextMeshProUGUI>();
			((TMP_Text)component).text = "<color=#0ca5eb>> Démarrer une ballonnerie en équipe</color>";
			((Graphic)component).color = new Color(0f, 0.753f, 0.98f);
			Button component2 = gameObject5.GetComponent<Button>();
			ColorBlock colors = ((Selectable)component2).colors;
			((ColorBlock)(ref colors)).highlightedColor = new Color(0f, 0.753f, 0.98f);
			((ColorBlock)(ref colors)).normalColor = new Color(0f, 0.753f, 0.98f);
			((ColorBlock)(ref colors)).selectedColor = new Color(0f, 0.753f, 0.98f);
			((Selectable)component2).colors = colors;
			RectTransform component3 = ((Component)gameObject5.transform.Find("SelectionHighlight")).GetComponent<RectTransform>();
			component3.offsetMax = new Vector2(360f, component3.offsetMax.y);
			((Graphic)((Component)gameObject5.transform.Find("SelectionHighlight")).GetComponent<Image>()).color = new Color(0.259f, 0.271f, 0.286f);
			gameObject5.GetComponent<RectTransform>().offsetMax = new Vector2(440f, gameObject5.GetComponent<RectTransform>().offsetMax.y);
			GameObject gameObject6 = ((Component)gameObject4.transform.Find("JoinACrew")).gameObject;
			((TMP_Text)((Component)gameObject6.transform.Find("Text (TMP)")).gameObject.GetComponent<TextMeshProUGUI>()).text = "<color=#0ca5eb>> Rejoindre les ballons hoshii";
			Button component4 = gameObject6.GetComponent<Button>();
			colors = ((Selectable)component4).colors;
			((ColorBlock)(ref colors)).selectedColor = new Color(0f, 0.753f, 0.98f);
			((Selectable)component4).colors = colors;
			component3 = ((Component)gameObject6.transform.Find("SelectionHighlight")).GetComponent<RectTransform>();
			component3.offsetMax = new Vector2(300f, component3.offsetMax.y);
			((Graphic)((Component)gameObject6.transform.Find("SelectionHighlight")).GetComponent<Image>()).color = new Color(0.259f, 0.271f, 0.286f);
			gameObject6.GetComponent<RectTransform>().anchoredPosition = new Vector2(gameObject6.GetComponent<RectTransform>().anchoredPosition.x, 165f);
			gameObject6.GetComponent<RectTransform>().offsetMax = new Vector2(350f, gameObject6.GetComponent<RectTransform>().offsetMax.y);
			GameObject gameObject7 = ((Component)gameObject4.transform.Find("SettingsButton")).gameObject;
			((TMP_Text)((Component)gameObject7.transform.Find("Text (TMP)")).gameObject.GetComponent<TextMeshProUGUI>()).text = "<color=#0ca5eb>> Régler son étoile (on est pas dans kirby)";
			Button component5 = gameObject7.GetComponent<Button>();
			colors = ((Selectable)component5).colors;
			((ColorBlock)(ref colors)).selectedColor = new Color(0f, 0.753f, 0.98f);
			((Selectable)component5).colors = colors;
			component3 = ((Component)gameObject7.transform.Find("SelectionHighlight")).GetComponent<RectTransform>();
			component3.offsetMax = new Vector2(450f, component3.offsetMax.y);
			((Graphic)((Component)gameObject7.transform.Find("SelectionHighlight")).GetComponent<Image>()).color = new Color(0.259f, 0.271f, 0.286f);
			gameObject7.GetComponent<RectTransform>().anchoredPosition = new Vector2(gameObject7.GetComponent<RectTransform>().anchoredPosition.x, 135f);
			gameObject7.GetComponent<RectTransform>().offsetMax = new Vector2(490f, gameObject7.GetComponent<RectTransform>().offsetMax.y);
			GameObject gameObject8 = ((Component)gameObject4.transform.Find("Credits")).gameObject;
			((TMP_Text)((Component)gameObject8.transform.Find("Text (TMP)")).gameObject.GetComponent<TextMeshProUGUI>()).text = "<color=#0ca5eb>> Shoutout comme twitch (Crédits)";
			Button component6 = gameObject8.GetComponent<Button>();
			colors = ((Selectable)component6).colors;
			((ColorBlock)(ref colors)).selectedColor = new Color(0f, 0.753f, 0.98f);
			((Selectable)component6).colors = colors;
			component3 = ((Component)gameObject8.transform.Find("SelectionHighlight")).GetComponent<RectTransform>();
			component3.offsetMax = new Vector2(450f, component3.offsetMax.y);
			((Graphic)((Component)gameObject8.transform.Find("SelectionHighlight")).GetComponent<Image>()).color = new Color(0.259f, 0.271f, 0.286f);
			gameObject8.GetComponent<RectTransform>().anchoredPosition = new Vector2(gameObject8.GetComponent<RectTransform>().anchoredPosition.x, 105f);
			gameObject8.GetComponent<RectTransform>().offsetMax = new Vector2(380f, gameObject8.GetComponent<RectTransform>().offsetMax.y);
			GameObject gameObject9 = ((Component)gameObject4.transform.Find("QuitButton")).gameObject;
			((TMP_Text)((Component)gameObject9.transform.Find("Text (TMP)")).gameObject.GetComponent<TextMeshProUGUI>()).text = "<color=#0ca5eb>> Quitter les ballons mais rester une tsundere";
			Button component7 = gameObject9.GetComponent<Button>();
			colors = ((Selectable)component7).colors;
			((ColorBlock)(ref colors)).selectedColor = new Color(0f, 0.753f, 0.98f);
			((Selectable)component7).colors = colors;
			component3 = ((Component)gameObject9.transform.Find("SelectionHighlight")).GetComponent<RectTransform>();
			component3.offsetMax = new Vector2(450f, component3.offsetMax.y);
			((Graphic)((Component)gameObject9.transform.Find("SelectionHighlight")).GetComponent<Image>()).color = new Color(0.259f, 0.271f, 0.286f);
			gameObject9.GetComponent<RectTransform>().anchoredPosition = new Vector2(gameObject9.GetComponent<RectTransform>().anchoredPosition.x, 75f);
			gameObject9.GetComponent<RectTransform>().offsetMax = new Vector2(520f, gameObject9.GetComponent<RectTransform>().offsetMax.y);
			GameObject gameObject10 = ((Component)gameObject.transform.Find("MenuContainer").Find("MainButtons").Find("HeaderImage")).gameObject;
			Sprite sprite2 = Sprite.Create(TsundereClass.mainLogo, new Rect(0f, 0f, (float)((Texture)TsundereClass.mainLogo).width, (float)((Texture)TsundereClass.mainLogo).height), new Vector2(0.5f, 0.5f));
			gameObject10.GetComponent<Image>().sprite = sprite2;
			gameObject2.GetComponent<Image>().sprite = sprite2;
			GameObject gameObject11 = ((Component)gameObject.transform.Find("MenuContainer").Find("VersionNum")).gameObject;
			gameObject11.GetComponent<RectTransform>().sizeDelta = new Vector2(500f, 100f);
			((TMP_Text)gameObject11.GetComponent<TextMeshProUGUI>()).text = ((TMP_Text)gameObject11.GetComponent<TextMeshProUGUI>()).text + " | Tsundere Edition by TakuDev";
			((Graphic)gameObject11.GetComponent<TextMeshProUGUI>()).color = new Color(1f, 1f, 1f);
			MenuManager obj = Object.FindObjectOfType<MenuManager>();
			TsundereClass.mls.LogInfo((object)"[TSUNDEREPROJECT] SETTING AUDIO BG MUSIC");
			obj.menuMusic = TsundereClass.newMenuMusic;
		}
		catch (Exception ex)
		{
			TsundereClass.mls.LogInfo((object)"[TSUNDEREPROJECT] SOMETHING WRONG !");
			TsundereClass.mls.LogInfo((object)ex.StackTrace);
		}
	}

	public static void Prefix(MenuManager __instance)
	{
		TsundereClass.mls.LogDebug((object)"Applying Menu colors");
	}
}
public static class Assets
{
	public static string mainAssetBundleName = "tsunderemod.assets";

	public static AssetBundle MainAssetBundle = null;

	private static string GetAssemblyName()
	{
		return Assembly.GetExecutingAssembly().FullName.Split(new char[1] { ',' })[0];
	}

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName))
			{
				MainAssetBundle = AssetBundle.LoadFromStream(stream);
			}
		}
	}
}
[HarmonyPatch(typeof(HoarderBugAI))]
public class HoarderBugPatch
{
	[HarmonyPatch("Start")]
	[HarmonyPostfix]
	public static void hoarderBugAudioPatch(ref AudioClip[] ___chitterSFX, ref AudioClip[] ___angryScreechSFX)
	{
		AudioClip[] newHoarderBugSFX = TsundereClass.newHoarderBugSFX;
		___chitterSFX = newHoarderBugSFX;
		newHoarderBugSFX = TsundereClass.newHoarderBugSFXAngry;
		___angryScreechSFX = newHoarderBugSFX;
	}
}
[HarmonyPatch(typeof(MouthDogAI))]
internal class MouthDogPatch
{
	[HarmonyPatch("Start")]
	[HarmonyPostfix]
	private static void soundPatch(ref AudioClip ___breathingSFX, ref AudioClip ___screamSFX)
	{
		AudioClip newMouthDogSFX = TsundereClass.newMouthDogSFX;
		___breathingSFX = newMouthDogSFX;
		newMouthDogSFX = TsundereClass.newMouthDogScreamSFX;
		___screamSFX = newMouthDogSFX;
	}
}
[HarmonyPatch(typeof(Turret))]
internal class TurretPatch
{
	[HarmonyPatch("Start")]
	[HarmonyPostfix]
	private static void soundPatch(ref AudioClip ___detectPlayerSFX, ref AudioClip ___firingSFX)
	{
		AudioClip newTurretDetectPlayerSFX = TsundereClass.newTurretDetectPlayerSFX;
		___detectPlayerSFX = newTurretDetectPlayerSFX;
		newTurretDetectPlayerSFX = TsundereClass.newTurretFiringSFX;
		___firingSFX = newTurretDetectPlayerSFX;
	}
}
[HarmonyPatch(typeof(Shovel))]
internal class HitSFXPatch
{
	[HarmonyPatch("HitShovelClientRpc")]
	[HarmonyPatch("HitShovel")]
	[HarmonyPrefix]
	public static void hitSFXPatch(ref AudioClip[] ___hitSFX)
	{
		AudioClip[] newShovelSFX = TsundereClass.newShovelSFX;
		___hitSFX = newShovelSFX;
	}
}
[HarmonyPatch(typeof(GrabbableObject))]
internal class NoisemakerPatch
{
	[HarmonyPatch("Start")]
	[HarmonyPostfix]
	private static void AudioPatch(GrabbableObject __instance)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Expected O, but got Unknown
		if ((Object)__instance != (Object)null && (Object)((Component)__instance).GetComponent<NoisemakerProp>() != (Object)null && ((Object)__instance.itemProperties).name != "Airhorn")
		{
			TsundereClass.mls.LogMessage((object)"We found other than Airhorn!!");
			AudioClip[] newNoisemakerSFX = TsundereClass.newNoisemakerSFX;
			((Component)__instance).GetComponent<NoisemakerProp>().noiseSFX = newNoisemakerSFX;
		}
	}
}