Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of Fuuka Chef Kart v1.0.3
FuukaCart.dll
Decompiled 2 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using MonoMod.RuntimeDetour.HookGen; using RoR2; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] namespace FuukaCart; [BepInPlugin("com.acanthi.FuukaCart", "FuukaCart", "1.0.0")] public class FuukaCartPlugin : BaseUnityPlugin { private class FieldException : Exception { public FieldException(string message, Exception innerException) : base(message, innerException) { } } private static AssetBundle assetBundle; private static readonly List<Material> materialsWithRoRShader = new List<Material>(); internal static FuukaCartPlugin Instance { get; private set; } internal static ManualLogSource InstanceLogger { get { FuukaCartPlugin instance = Instance; return (instance != null) ? ((BaseUnityPlugin)instance).Logger : null; } } private void Start() { Instance = this; using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("FuukaCart.acanthifuukacart")) { assetBundle = AssetBundle.LoadFromStream(stream); } ((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)BodyCatalogInit); HookEndpointManager.Add((MethodBase)typeof(Language).GetMethod("LoadStrings"), (Delegate)new Action<Action<Language>, Language>(LanguageLoadStrings)); ReplaceShaders(); } private static void ReplaceShaders() { LoadMaterialsWithReplacedShader("RoR2/Base/Shaders/HGStandard.shader", "Assets/FuukaChef/FuukaMat.mat"); } private static void LoadMaterialsWithReplacedShader(string shaderPath, params string[] materialPaths) { //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) Shader shader = Addressables.LoadAssetAsync<Shader>((object)shaderPath).WaitForCompletion(); foreach (string text in materialPaths) { Material val = assetBundle.LoadAsset<Material>(text); val.shader = shader; materialsWithRoRShader.Add(val); } } private static void LanguageLoadStrings(Action<Language> orig, Language self) { orig(self); self.SetStringByToken("ACANTHI_SKIN_FUUKACARTDEF_NAME", "Fuuka Scooter"); } private static void Nothing(Action<SkinDef> orig, SkinDef self) { } private static void BodyCatalogInit() { MethodInfo method = typeof(SkinDef).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic); HookEndpointManager.Add((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing)); AddChefBodyFuukaCartDefSkin(); HookEndpointManager.Remove((MethodBase)method, (Delegate)new Action<Action<SkinDef>, SkinDef>(Nothing)); } private static void AddChefBodyFuukaCartDefSkin() { //IL_0273: Unknown result type (might be due to invalid IL or missing references) string text = "ChefBody"; string text2 = "FuukaCartDef"; try { GameObject val = BodyCatalog.FindBodyPrefab(text); if (!Object.op_Implicit((Object)(object)val)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin because \"" + text + "\" doesn't exist")); return; } ModelLocator component = val.GetComponent<ModelLocator>(); if (!Object.op_Implicit((Object)(object)component)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelLocator\" component")); return; } GameObject gameObject = ((Component)component.modelTransform).gameObject; ModelSkinController skinController = (Object.op_Implicit((Object)(object)gameObject) ? gameObject.GetComponent<ModelSkinController>() : null); if (!Object.op_Implicit((Object)(object)skinController)) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\" because it doesn't have \"ModelSkinController\" component")); return; } Renderer[] renderers = gameObject.GetComponentsInChildren<Renderer>(true); SkinDef skin = ScriptableObject.CreateInstance<SkinDef>(); TryCatchThrow("Icon", delegate { skin.icon = assetBundle.LoadAsset<Sprite>("Assets\\SkinMods\\FuukaCart\\Icons\\FuukaCartDefIcon.png"); }); ((Object)skin).name = text2; skin.nameToken = "ACANTHI_SKIN_FUUKACARTDEF_NAME"; skin.rootObject = gameObject; TryCatchThrow("Base Skins", delegate { skin.baseSkins = (SkinDef[])(object)new SkinDef[1] { skinController.skins[0] }; }); TryCatchThrow("Unlockable Name", delegate { skin.unlockableDef = null; }); TryCatchThrow("Game Object Activations", delegate { //IL_0011: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00b8: Unknown result type (might be due to invalid IL or missing references) skin.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[4] { new GameObjectActivation { gameObject = ((Component)renderers[1]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)renderers[2]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)renderers[3]).gameObject, shouldActivate = false }, new GameObjectActivation { gameObject = ((Component)renderers[4]).gameObject, shouldActivate = false } }; }); TryCatchThrow("Renderer Infos", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) skin.rendererInfos = (RendererInfo[])(object)new RendererInfo[1] { new RendererInfo { defaultMaterial = assetBundle.LoadAsset<Material>("Assets/FuukaChef/FuukaMat.mat"), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false, renderer = renderers[0] } }; }); TryCatchThrow("Mesh Replacements", delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) skin.meshReplacements = (MeshReplacement[])(object)new MeshReplacement[1] { new MeshReplacement { mesh = assetBundle.LoadAsset<Mesh>("Assets\\SkinMods\\FuukaCart\\Meshes\\0004_Fuuka_Original_Body.mesh"), renderer = renderers[0] } }; }); TryCatchThrow("Minion Skin Replacements", delegate { skin.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); }); TryCatchThrow("Projectile Ghost Replacements", delegate { skin.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); }); Array.Resize(ref skinController.skins, skinController.skins.Length + 1); skinController.skins[skinController.skins.Length - 1] = skin; BodyCatalog.skins[BodyCatalog.FindBodyIndex(val)] = skinController.skins; } catch (FieldException ex) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogWarning((object)("Field causing issue: " + ex.Message)); InstanceLogger.LogError((object)ex.InnerException); } catch (Exception ex2) { InstanceLogger.LogWarning((object)("Failed to add \"" + text2 + "\" skin to \"" + text + "\"")); InstanceLogger.LogError((object)ex2); } } private static void TryCatchThrow(string message, Action action) { try { action?.Invoke(); } catch (Exception innerException) { throw new FieldException(message, innerException); } } }
FuukaChef.dll
Decompiled 2 weeks agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BaseVoiceoverLib; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using FuukaChef.Components; using FuukaChef.Modules; using Microsoft.CodeAnalysis; using R2API; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.ContentManagement; using UnityEngine; using UnityEngine.AddressableAssets; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("FuukaChef")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+caaec09c83b153578d6051a577b25409e0071331")] [assembly: AssemblyProduct("FuukaChef")] [assembly: AssemblyTitle("FuukaChef")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace FuukaChef { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Schale.FuukaChefVoiceover", "FuukaChefVoiceover", "1.0.3")] public class FuukaChefVoiceoverPlugin : BaseUnityPlugin { public class NSEInfo { public NetworkSoundEventDef nse; public uint akId = 0u; public string eventName = string.Empty; public NSEInfo(NetworkSoundEventDef source) { nse = source; akId = source.akId; eventName = source.eventName; } private void DisableSound() { nse.akId = 0u; nse.eventName = string.Empty; } private void EnableSound() { nse.akId = akId; nse.eventName = eventName; } public void ValidateParams() { if (akId == 0) { akId = nse.akId; } if (eventName == string.Empty) { eventName = nse.eventName; } if (!enableVoicelines.Value) { DisableSound(); } else { EnableSound(); } } } public static ConfigEntry<bool> enableVoicelines; public static ConfigEntry<KeyboardShortcut> btnNyCafe1; public static ConfigEntry<KeyboardShortcut> btnThanks; public static ConfigEntry<KeyboardShortcut> btnTitle; public static ConfigEntry<KeyboardShortcut> btnEx1; public static ConfigEntry<KeyboardShortcut> btnEx2; public static ConfigEntry<KeyboardShortcut> btnEx3; public static ConfigEntry<KeyboardShortcut> btnExLv1; public static ConfigEntry<KeyboardShortcut> btnExLv2; public static ConfigEntry<KeyboardShortcut> btnExLv3; public static ConfigEntry<KeyboardShortcut> btnNYEx1; public static ConfigEntry<KeyboardShortcut> btnNYEx2; public static ConfigEntry<KeyboardShortcut> btnNYEx3; public static ConfigEntry<KeyboardShortcut> btnNYExLv1; public static ConfigEntry<KeyboardShortcut> btnNYExLv2; public static ConfigEntry<KeyboardShortcut> btnNYExLv3; public static ConfigEntry<KeyboardShortcut> btnDoushimashou; public static bool playedSeasonalVoiceline = false; public static AssetBundle assetBundle; public static SurvivorDef survivorDef = Addressables.LoadAssetAsync<SurvivorDef>((object)"RoR2/DLC2/Chef/Chef.asset").WaitForCompletion(); public static List<NSEInfo> nseList = new List<NSEInfo>(); public void Awake() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_0099: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Expected O, but got Unknown //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Expected O, but got Unknown //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Expected O, but got Unknown Files.PluginInfo = ((BaseUnityPlugin)this).Info; RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); new Content().Initialize(); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("FuukaChef.fuukachefvoiceoverbundle")) { assetBundle = AssetBundle.LoadFromStream(stream); } SoundBanks.Init(); InitNSE(); enableVoicelines = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Settings", "Enable Voicelines"), true, new ConfigDescription("Enable voicelines when using the FuukaChef Skin.", (AcceptableValueBase)null, Array.Empty<object>())); enableVoicelines.SettingChanged += EnableVoicelines_SettingChanged; btnTitle = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Blue Archive"), KeyboardShortcut.Empty, (ConfigDescription)null); btnEx1 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 1"), KeyboardShortcut.Empty, (ConfigDescription)null); btnEx2 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 2"), KeyboardShortcut.Empty, (ConfigDescription)null); btnEx3 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 3"), KeyboardShortcut.Empty, (ConfigDescription)null); btnExLv1 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX Lv 1"), KeyboardShortcut.Empty, (ConfigDescription)null); btnExLv2 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX Lv 2"), KeyboardShortcut.Empty, (ConfigDescription)null); btnExLv3 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX Lv 3"), KeyboardShortcut.Empty, (ConfigDescription)null); btnNYEx1 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 1 (NY)"), KeyboardShortcut.Empty, (ConfigDescription)null); btnNYEx2 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 2 (NY)"), KeyboardShortcut.Empty, (ConfigDescription)null); btnNYEx3 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 3 (NY)"), KeyboardShortcut.Empty, (ConfigDescription)null); btnNYExLv1 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX Lv 1 (NY)"), KeyboardShortcut.Empty, (ConfigDescription)null); btnNYExLv2 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX Lv 2 (NY)"), KeyboardShortcut.Empty, (ConfigDescription)null); btnNYExLv3 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX Lv 3 (NY)"), KeyboardShortcut.Empty, (ConfigDescription)null); btnDoushimashou = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Doushimashou"), KeyboardShortcut.Empty, (ConfigDescription)null); btnThanks = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Thanks"), KeyboardShortcut.Empty, (ConfigDescription)null); btnNyCafe1 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Cafe 1 (NY)"), KeyboardShortcut.Empty, (ConfigDescription)null); if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions")) { RiskOfOptionsCompat(); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void RiskOfOptionsCompat() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown ModSettingsManager.SetModIcon(assetBundle.LoadAsset<Sprite>("fuuka")); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(enableVoicelines)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnTitle)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnEx1)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnEx2)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnEx3)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnExLv1)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnExLv2)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnExLv3)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnNYEx1)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnNYEx2)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnNYEx3)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnNYExLv1)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnNYExLv2)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnNYExLv3)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnDoushimashou)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnThanks)); ModSettingsManager.AddOption((BaseOption)new KeyBindOption(btnNyCafe1)); } private void FuukaSelect(GameObject mannequinObject) { if (!enableVoicelines.Value) { return; } bool flag = false; if (!playedSeasonalVoiceline) { if ((DateTime.Today.Month == 1 && DateTime.Today.Day == 1) || (DateTime.Today.Month == 12 && DateTime.Today.Day == 31)) { Util.PlaySound("Play_FuukaChef_Lobby_Newyear", mannequinObject); flag = true; } else if (DateTime.Today.Month == 4 && DateTime.Today.Day == 30) { Util.PlaySound("Play_FuukaChef_Lobby_bday", mannequinObject); flag = true; } else if (DateTime.Today.Month == 10 && DateTime.Today.Day == 31) { Util.PlaySound("Play_FuukaChef_Lobby_Halloween", mannequinObject); flag = true; } else if (DateTime.Today.Month == 12 && (DateTime.Today.Day == 25 || DateTime.Today.Day == 24)) { Util.PlaySound("Play_FuukaChef_Lobby_xmas", mannequinObject); flag = true; } if (flag) { playedSeasonalVoiceline = true; } } if (!flag) { if (Util.CheckRoll(5f, 0f, (CharacterMaster)null)) { Util.PlaySound("Play_FuukaChef_Title", mannequinObject); } else { Util.PlaySound("Play_FuukaChef_Lobby", mannequinObject); } } } private void OnLoad() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown SkinDef val = null; SkinDef[] array = SkinCatalog.FindSkinsForBody(BodyCatalog.FindBodyIndex("ChefBody")); SkinDef[] array2 = array; foreach (SkinDef val2 in array2) { if (((Object)val2).name == "FuukaCartDef") { val = val2; break; } } if (!Object.op_Implicit((Object)(object)val)) { Debug.LogError((object)"FuukaChefVoiceover: Chef Fuuka SkinDef not found. Voicelines will not work!"); } else { VoiceoverInfo val3 = new VoiceoverInfo(typeof(FuukaChefVoiceoverComponent), val, "ChefBody"); val3.selectActions = (LobbySelectActions)Delegate.Combine((Delegate?)(object)val3.selectActions, (Delegate?)new LobbySelectActions(FuukaSelect)); } RefreshNSE(); PopulateFoodList(); } private void PopulateFoodList() { AddEquipmentIfValid("Fruit"); AddEquipmentIfValid("HealAndRevive"); AddEquipmentIfValid("HealAndReviveConsumed"); AddEggItemIfValid("ParentEgg"); AddEggItemIfValid("HopooEgg"); AddEggEquipmentIfValid("FireBallDash"); } private void AddEquipmentIfValid(string equipmentName) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) EquipmentIndex val = EquipmentCatalog.FindEquipmentIndex(equipmentName); if ((int)val != -1) { FuukaChefVoiceoverComponent.foodEquipment.Add(val); } } private void AddEggItemIfValid(string itemName) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) ItemIndex val = ItemCatalog.FindItemIndex(itemName); if ((int)val != -1) { FuukaChefVoiceoverComponent.eggItems.Add(val); } } private void AddEggEquipmentIfValid(string equipmentName) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) EquipmentIndex val = EquipmentCatalog.FindEquipmentIndex(equipmentName); if ((int)val != -1) { FuukaChefVoiceoverComponent.eggEquipment.Add(val); } } private void EnableVoicelines_SettingChanged(object sender, EventArgs e) { RefreshNSE(); } private NetworkSoundEventDef RegisterNSE(string eventName) { NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>(); val.eventName = eventName; Content.networkSoundEventDefs.Add(val); nseList.Add(new NSEInfo(val)); return val; } public void RefreshNSE() { foreach (NSEInfo nse in nseList) { nse.ValidateParams(); } } private void InitNSE() { FuukaChefVoiceoverComponent.nseDoushimashou = RegisterNSE("Play_FuukaChef_Doushimashou"); FuukaChefVoiceoverComponent.nseNYCommon = RegisterNSE("Play_FuukaChef_NY_Common"); FuukaChefVoiceoverComponent.nseTitle = RegisterNSE("Play_FuukaChef_Title"); FuukaChefVoiceoverComponent.nseNYEx1 = RegisterNSE("Play_FuukaChef_NY_Ex1"); FuukaChefVoiceoverComponent.nseNYEx2 = RegisterNSE("Play_FuukaChef_NY_Ex2"); FuukaChefVoiceoverComponent.nseNYEx3 = RegisterNSE("Play_FuukaChef_NY_Ex3"); FuukaChefVoiceoverComponent.nseNYExLv1 = RegisterNSE("Play_FuukaChef_NY_Ex_Lv1"); FuukaChefVoiceoverComponent.nseNYExLv2 = RegisterNSE("Play_FuukaChef_NY_Ex_Lv2"); FuukaChefVoiceoverComponent.nseNYExLv3 = RegisterNSE("Play_FuukaChef_NY_Ex_Lv3"); FuukaChefVoiceoverComponent.nseEx1 = RegisterNSE("Play_FuukaChef_Ex1"); FuukaChefVoiceoverComponent.nseEx2 = RegisterNSE("Play_FuukaChef_Ex2"); FuukaChefVoiceoverComponent.nseEx3 = RegisterNSE("Play_FuukaChef_Ex3"); FuukaChefVoiceoverComponent.nseExLv1 = RegisterNSE("Play_FuukaChef_Ex_Lv1"); FuukaChefVoiceoverComponent.nseExLv2 = RegisterNSE("Play_FuukaChef_Ex_Lv2"); FuukaChefVoiceoverComponent.nseExLv3 = RegisterNSE("Play_FuukaChef_Ex_Lv3"); FuukaChefVoiceoverComponent.nseNYCafe1 = RegisterNSE("Play_FuukaChef_NY_Cafe_1"); } } } namespace FuukaChef.Modules { public class Content : IContentPackProvider { [CompilerGenerated] private sealed class <FinalizeAsync>d__8 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FinalizeAsyncArgs args; public Content <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FinalizeAsync>d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GenerateContentPackAsync>d__7 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GetContentPackAsyncArgs args; public Content <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GenerateContentPackAsync>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; ContentPack.Copy(<>4__this.contentPack, args.output); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <LoadStaticContentAsync>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LoadStaticContentAsyncArgs args; public Content <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LoadStaticContentAsync>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>4__this.contentPack.identifier = <>4__this.identifier; <>4__this.contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray()); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal ContentPack contentPack = new ContentPack(); public static List<NetworkSoundEventDef> networkSoundEventDefs = new List<NetworkSoundEventDef>(); public string identifier => "com.Schale.FuukaChefVoiceover"; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } [IteratorStateMachine(typeof(<LoadStaticContentAsync>d__6))] public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadStaticContentAsync>d__6(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<GenerateContentPackAsync>d__7))] public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GenerateContentPackAsync>d__7(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<FinalizeAsync>d__8))] public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FinalizeAsync>d__8(0) { <>4__this = this, args = args }; } } public static class Files { public static PluginInfo PluginInfo; internal static string assemblyDir => Path.GetDirectoryName(PluginInfo.Location); internal static void Init(PluginInfo info) { PluginInfo = info; } internal static string GetPathToFile(string folderName, string fileName) { return Path.Combine(assemblyDir, folderName, fileName); } } public static class SoundBanks { private static bool initialized; public static string SoundBankDirectory => Files.assemblyDir; public static void Init() { if (initialized) { return; } initialized = true; using Stream stream = new FileStream(SoundBankDirectory + "\\FuukaChefSoundbank.bnk", FileMode.Open); byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); SoundBanks.Add(array); } } } namespace FuukaChef.Components { public class FuukaChefVoiceoverComponent : BaseVoiceoverComponent { private bool acquiredScepter = false; private float specialCooldown = 0f; private float utilityCooldown = 0f; private float secondaryCooldown = 0f; private float levelCooldown = 0f; private float shrineFailCooldown = 0f; private float lowHealthCooldown = 0f; private float foodCommentCooldown = 0f; public static NetworkSoundEventDef nseNYCafe1; public static NetworkSoundEventDef nseThanks; public static NetworkSoundEventDef nseDoushimashou; public static NetworkSoundEventDef nseNYCommon; public static NetworkSoundEventDef nseNYEx1; public static NetworkSoundEventDef nseNYEx2; public static NetworkSoundEventDef nseNYEx3; public static NetworkSoundEventDef nseNYExLv1; public static NetworkSoundEventDef nseNYExLv2; public static NetworkSoundEventDef nseNYExLv3; public static NetworkSoundEventDef nseEx1; public static NetworkSoundEventDef nseEx2; public static NetworkSoundEventDef nseEx3; public static NetworkSoundEventDef nseExLv1; public static NetworkSoundEventDef nseExLv2; public static NetworkSoundEventDef nseExLv3; public static NetworkSoundEventDef nseTitle; public static HashSet<ItemIndex> eggItems = new HashSet<ItemIndex>(); public static HashSet<EquipmentIndex> foodEquipment = new HashSet<EquipmentIndex>(); public static HashSet<EquipmentIndex> eggEquipment = new HashSet<EquipmentIndex>(); protected override void Start() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((BaseVoiceoverComponent)this).Start(); if (Object.op_Implicit((Object)(object)base.inventory) && base.inventory.GetItemCount(BaseVoiceoverComponent.scepterIndex) > 0) { acquiredScepter = true; } } protected override void FixedUpdate() { ((BaseVoiceoverComponent)this).FixedUpdate(); if (specialCooldown > 0f) { specialCooldown -= Time.fixedDeltaTime; } if (utilityCooldown > 0f) { utilityCooldown -= Time.fixedDeltaTime; } if (secondaryCooldown > 0f) { secondaryCooldown -= Time.fixedDeltaTime; } if (levelCooldown > 0f) { levelCooldown -= Time.fixedDeltaTime; } if (lowHealthCooldown > 0f) { lowHealthCooldown -= Time.fixedDeltaTime; } if (shrineFailCooldown > 0f) { shrineFailCooldown -= Time.fixedDeltaTime; } if (foodCommentCooldown > 0f) { foodCommentCooldown -= Time.fixedDeltaTime; } } public override void PlayLevelUp() { if (!(levelCooldown > 0f) && ((!Util.CheckRoll(50f, 0f, (CharacterMaster)null)) ? ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_LevelUp_Long", 3.3f, false) : ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_LevelUp_Short", 2.1f, false))) { levelCooldown = 60f; } } protected override void Inventory_onEquipmentChangedClient(EquipmentIndex equipmentIndex, uint equipmentSlot) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) ((BaseVoiceoverComponent)this).Inventory_onEquipmentChangedClient(equipmentIndex, equipmentSlot); if (eggEquipment.Contains(equipmentIndex)) { PlayEggGet(); } else if (foodEquipment.Contains(equipmentIndex)) { PlayFoodGet(); } } protected override void Inventory_onItemAddedClient(ItemIndex itemIndex) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Invalid comparison between Unknown and I4 //IL_005b: Unknown result type (might be due to invalid IL or missing references) ((BaseVoiceoverComponent)this).Inventory_onItemAddedClient(itemIndex); if ((int)BaseVoiceoverComponent.scepterIndex != -1 && itemIndex == BaseVoiceoverComponent.scepterIndex) { PlayAcquireScepter(); return; } ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex); if (Object.op_Implicit((Object)(object)itemDef) && (int)itemDef.tier == 2) { PlayAcquireLegendary(); } else if (eggItems.Contains(itemIndex)) { PlayEggGet(); } else if (itemDef.ContainsTag((ItemTag)28)) { PlayFoodGet(); } } public void PlayAcquireScepter() { if (!acquiredScepter) { ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_AcquireScepter", 8f, true); acquiredScepter = true; } } public void PlayEggGet() { if (!(foodCommentCooldown > 0f) && ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Egg", 7f, true)) { foodCommentCooldown = 30f; } } public void PlayFoodGet() { if (!(foodCommentCooldown > 0f)) { bool flag = false; if (Random.Range(1, 6) switch { 1 => ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Lobby_2", 4f, false), 2 => ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Lobby_5", 7f, false), 3 => ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Cafe_1", 2.1f, false), 4 => ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Cafe_3", 2.6f, false), _ => ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_NY_Cafe_1", 3.5f, false), }) { foodCommentCooldown = 30f; } } } public void PlayAcquireLegendary() { switch (Random.Range(1, 5)) { case 1: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Relationship_1", 4f, false); break; case 2: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Relationship_2", 3.1f, false); break; case 3: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Relationship_3", 3.3f, false); break; default: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Relationship_4", 6.25f, false); break; } } public override void PlayLowHealth() { if (!(lowHealthCooldown > 0f) && ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Lobby_3", 4.2f, false)) { lowHealthCooldown = 60f; } } public override void PlaySpawn() { switch (Random.Range(1, 6)) { case 1: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Battle_In_1", 2.3f, true); break; case 2: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Battle_TSA_1", 4.3f, true); break; case 3: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Battle_TSA_2", 2.7f, true); break; case 4: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Cafe_Act_2", 1.45f, true); break; default: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_CookingSkills", 4.7f, true); break; } } public override void PlayTeleporterStart() { switch (Random.Range(1, 6)) { case 1: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Battle_In_1", 2.3f, false); break; case 2: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Battle_TSA_1", 4.3f, false); break; case 3: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Battle_TSA_2", 2.7f, true); break; case 4: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Cafe_Act_2", 1.45f, false); break; default: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_CookingSkills", 4.7f, false); break; } } public override void PlayTeleporterFinish() { switch (Random.Range(1, 5)) { case 1: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_EventEnd", 7.5f, false); break; case 2: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_CommonSkill", 1.5f, false); break; case 3: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Ex2", 1.55f, false); break; default: ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Ex3", 2.3f, false); break; } } public override void PlayVictory() { ((BaseVoiceoverComponent)this).TryPlaySound("Play_FuukaChef_Memorial5", 17f, true); } public override void PlayShrineOfChanceFailServer() { if (!(shrineFailCooldown > 0f) && Util.CheckRoll(15f, 0f, (CharacterMaster)null) && ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseDoushimashou, 1.5f, false)) { shrineFailCooldown = 60f; } } public override void PlaySecondaryAuthority(GenericSkill skill) { if (!(secondaryCooldown > 0f)) { bool flag = false; switch (Random.Range(1, 5)) { case 1: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseEx1, 1f, false); break; case 2: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLv1, 1.7f, false); break; case 3: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLv2, 1.5f, false); break; default: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLv3, 1.65f, false); break; } if (flag) { secondaryCooldown = 12f; } } } public override void PlayUtilityAuthority(GenericSkill skill) { if (!(utilityCooldown > 0f)) { bool flag = false; switch (Random.Range(1, 4)) { case 1: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYCommon, 1.3f, false); break; case 2: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYEx1, 1.5f, false); break; default: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYEx3, 1f, false); break; } if (flag) { utilityCooldown = 30f; } } } public override void PlaySpecialAuthority(GenericSkill skill) { if (!(specialCooldown > 0f)) { bool flag = false; switch (Random.Range(1, 4)) { case 1: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYEx2, 1.65f, false); break; case 2: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYExLv2, 1.45f, false); break; default: ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYExLv3, 2.05f, false); break; } if (flag) { specialCooldown = 12f; } } } protected override void CheckInputs() { if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnTitle)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseTitle, 1.7f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnEx1)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseEx1, 1f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnEx2)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseEx2, 1.55f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnEx3)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseEx3, 2.3f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnExLv1)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLv1, 1.7f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnExLv2)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLv2, 1.5f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnExLv3)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLv3, 1.65f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnNYEx1)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYEx1, 1.5f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnNYEx2)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYEx2, 1.65f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnNYEx3)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYEx3, 1f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnNYExLv1)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYExLv1, 1.85f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnNYExLv2)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYExLv2, 1.45f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnNYExLv3)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYExLv3, 2.05f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnDoushimashou)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseDoushimashou, 1.2f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnThanks)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseThanks, 1.2f, false); } else if (Utils.GetKeyPressed(FuukaChefVoiceoverPlugin.btnNyCafe1)) { ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseNYCafe1, 3.5f, false); } } } }