using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using LethalLib.Modules; using Microsoft.CodeAnalysis; using On; using UnityEngine; using bcs_PeterGriffonGiant.NetcodePatcher; [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("bcs4313")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Adds a suspicious looking pill that is very good for you")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+cd9e2c801759e115bb3ab98ef537ed8ed3634744")] [assembly: AssemblyProduct("BrianGriffonDog")] [assembly: AssemblyTitle("bcs_PeterGriffonGiant")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace PeterGriffonGiant.src { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("PeterGriffonGiant", "Peter The Giant", "1.0.0")] public class Plugin : BaseUnityPlugin { public static class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); try { IEnumerable types = Assembly.GetExecutingAssembly().GetTypes(); } catch (ReflectionTypeLoadException ex) { IEnumerable types = ex.Types.Where((Type t) => t != null); } MainAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "bcs_petergriffon")); if ((Object)(object)MainAssetBundle == (Object)null) { Logger.LogError((object)"Failed to load custom assets."); } } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Awake <>9__11_0; internal void b__11_0(orig_Awake orig, MenuManager self) { orig.Invoke(self); bool flag = false; Debug.Log((object)"Searching for Peter Griffon Replacements :3"); try { EnemyType[] array = Resources.FindObjectsOfTypeAll(); EnemyType[] array2 = array; foreach (EnemyType val in array2) { if (val.enemyName.ToLower().Contains("forest") && val.enemyName.ToLower().Contains("giant")) { val.enemyPrefab = PeterGriffonMEGA; PeterGriffonMEGA.GetComponent().enemyType = val; Debug.Log((object)"Brian The Dog: Replaced Giant prefab with Peter Griffon"); flag = true; } } if (!flag) { Debug.Log((object)"Peter The Giant: Couldn't find Peter Griffon! Check all the enemy names here!"); EnemyType[] array3 = array; foreach (EnemyType val2 in array3) { Debug.Log((object)val2.enemyName); } } } catch (Exception ex) { Debug.Log((object)("Peter The Giant Error: " + ex)); } } } public static Harmony _harmony; public static ManualLogSource Logger; public static Random rnd = new Random(); public static List storedBrians; public static GameObject PeterGriffonMEGA; private float currentPower = -1f; private int pick = 1; public static AudioClip BrianLungeAwoooo; public static AudioClip BrianLungeBork; private static bool mimicTriggeredLastFrame = false; public static void LogDebug(string text) { Logger.LogInfo((object)text); } public static void LogProduction(string text) { Logger.LogInfo((object)text); } private void Awake() { //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; Assets.PopulateAssets(); bindVars(); Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } Random.InitState((int)DateTime.Now.Ticks); Debug.Log((object)("PETERGRIFFON ENEMY BUNDLE: " + ((object)Assets.MainAssetBundle).ToString())); PeterGriffonMEGA = Assets.MainAssetBundle.LoadAsset("PeterGriffonMEGA"); NetworkPrefabs.RegisterNetworkPrefab(PeterGriffonMEGA); object obj = <>c.<>9__11_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, MenuManager self) { orig.Invoke(self); bool flag = false; Debug.Log((object)"Searching for Peter Griffon Replacements :3"); try { EnemyType[] array3 = Resources.FindObjectsOfTypeAll(); EnemyType[] array4 = array3; foreach (EnemyType val2 in array4) { if (val2.enemyName.ToLower().Contains("forest") && val2.enemyName.ToLower().Contains("giant")) { val2.enemyPrefab = PeterGriffonMEGA; PeterGriffonMEGA.GetComponent().enemyType = val2; Debug.Log((object)"Brian The Dog: Replaced Giant prefab with Peter Griffon"); flag = true; } } if (!flag) { Debug.Log((object)"Peter The Giant: Couldn't find Peter Griffon! Check all the enemy names here!"); EnemyType[] array5 = array3; foreach (EnemyType val3 in array5) { Debug.Log((object)val3.enemyName); } } } catch (Exception ex) { Debug.Log((object)("Peter The Giant Error: " + ex)); } }; <>c.<>9__11_0 = val; obj = (object)val; } MenuManager.Awake += (hook_Awake)obj; Logger.LogInfo((object)"Plugin Peter The Giant is loaded!"); } public void bindVars() { } } } namespace EasterIsland { internal class ConfigModel { public static ConfigEntry moaiGlobalSize; public static ConfigEntry moaiGlobalMusicVol; public static ConfigEntry moaiGlobalRarity; public static ConfigEntry moaiGlobalSpeed; public static void setupConfig() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0028: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //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_003e: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0050: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0078: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a0: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown ConfigEntry obj = moaiGlobalSize; FloatSliderOptions val = new FloatSliderOptions(); ((BaseRangeOptions)val).Min = 0.05f; ((BaseRangeOptions)val).Max = 5f; FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val); ConfigEntry obj2 = moaiGlobalMusicVol; FloatSliderOptions val3 = new FloatSliderOptions(); ((BaseRangeOptions)val3).Min = 0f; ((BaseRangeOptions)val3).Max = 2f; FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3); ConfigEntry obj3 = moaiGlobalRarity; FloatSliderOptions val5 = new FloatSliderOptions(); ((BaseRangeOptions)val5).Min = 0f; ((BaseRangeOptions)val5).Max = 10f; FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5); ConfigEntry obj4 = moaiGlobalSpeed; FloatSliderOptions val7 = new FloatSliderOptions(); ((BaseRangeOptions)val7).Min = 0f; ((BaseRangeOptions)val7).Max = 5f; FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7); } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace bcs_PeterGriffonGiant.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }