Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of MegaSurvivorPack v1.0.1
MegaSurvivorPack.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using HG.BlendableTypes; using On.RoR2; using R2API; using RoR2; using UnityEngine; [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.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("MegaSurvivorPack")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("MegaSurvivorPack")] [assembly: AssemblyTitle("MegaSurvivorPack")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace MegaSurvivorPack; [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Quacker.MegaSurvivorPack", "MegaSurvivorPack", "1.0.1")] public class SurvivorPlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Build <>9__5_0; internal void <Awake>b__5_0(orig_Build orig, CharacterSelectBarController self) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) self.iconContainerGrid.cellSize = new Vector2(64f, 64f); self.iconContainerGrid.constraintCount = 17; orig.Invoke(self); } } public const string PluginGUID = "Quacker.MegaSurvivorPack"; public const string PluginAuthor = "Quacker"; public const string PluginName = "MegaSurvivorPack"; public const string PluginVersion = "1.0.1"; public const bool resize = false; public void Awake() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown ((BaseUnityPlugin)this).Logger.LogWarning((object)"MegaSurvivorPack is loading..."); object obj = <>c.<>9__5_0; if (obj == null) { hook_Build val = delegate(orig_Build orig, CharacterSelectBarController self) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) self.iconContainerGrid.cellSize = new Vector2(64f, 64f); self.iconContainerGrid.constraintCount = 17; orig.Invoke(self); }; <>c.<>9__5_0 = val; obj = (object)val; } CharacterSelectBarController.Build += (hook_Build)obj; ((BaseUnityPlugin)this).Logger.LogWarning((object)"MegaSurvivorPack : CharacterSelectBar eddited"); List<survivorinfo> survivorlist = new List<survivorinfo> { new survivorinfo { name = "paladin", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "golem", dlcIdentifier = false, flyer = false, modelsize = 0.805f, CapY = -2f, camV = 1.4f }, new survivorinfo { name = "hand", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "beetleGuard", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "magmaWorm", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "electricWorm", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "impBoss", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "titangold", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "beetle", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "bison", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "megaDrone", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "drone1", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "MissileDrone", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "BackupDrone", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "greaterWisp", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "imp", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "lemurianBruiser", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "titan", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "bell", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "clayBruiser", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "vulture", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "archWisp", dlcIdentifier = false, flyer = true }, new survivorinfo { name = "nullifier", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "scav", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "gravekeeper", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "parent", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "Heretic", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "minimushroom", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "Brother", dlcIdentifier = false, flyer = false, modelsize = 3.105f, CapY = -3.8f, camV = -7f }, new survivorinfo { name = "BrotherGlass", dlcIdentifier = false, flyer = false }, new survivorinfo { name = "BrotherHurt", dlcIdentifier = false, flyer = false } }; addsurvivors(survivorlist); ((BaseUnityPlugin)this).Logger.LogWarning((object)"MegaSurvivorPack is loaded!"); } public void addsurvivors(List<survivorinfo> survivorlist) { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) foreach (survivorinfo item in survivorlist) { GameObject val = PrefabAPI.InstantiateClone(Resources.Load<GameObject>("prefabs/characterbodies/" + item.name + "Body"), item.name); GameObject gameObject = ((Component)val.GetComponent<ModelLocator>().modelTransform).gameObject; if (item.flyer) { } if (!item.flyer) { bool flag = false; } Interactor component = val.GetComponent<Interactor>(); component.maxInteractionDistance = 6f; CameraTargetParams component2 = val.GetComponent<CameraTargetParams>(); component2.cameraParams = ScriptableObject.CreateInstance<CharacterCameraParams>(); CharacterCameraParams cameraParams = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponent<CameraTargetParams>().cameraParams; component2.cameraParams.data.pivotVerticalOffset = BlendableFloat.op_Implicit(0f); ((Object)component2.cameraParams).name = "quackcam " + item.name; component2.cameraParams.data.maxPitch = cameraParams.data.maxPitch; component2.cameraParams.data.minPitch = cameraParams.data.minPitch; component2.cameraParams.data.wallCushion = cameraParams.data.wallCushion; component2.cameraParams.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, item.camV, -10f)); component2.cameraPivotTransform = null; component2.recoil = Vector2.zero; component2.dontRaycastToPivot = false; SurvivorDef val2 = ScriptableObject.CreateInstance<SurvivorDef>(); val2.bodyPrefab = val; val2.bodyPrefab.GetComponent<CharacterBody>().preferredPodPrefab = Resources.Load<GameObject>("Prefabs/NetworkedObjects/SurvivorPod"); val2.descriptionToken = item.name + ": MegaSurvivorPack \n"; val2.displayPrefab = gameObject; val2.cachedName = item.name; val2.primaryColor = new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f)); ((BaseUnityPlugin)this).Logger.LogMessage((object)(item.name + " added ")); ContentAddition.AddBody(val2.bodyPrefab); ContentAddition.AddSurvivorDef(val2); } } } public class survivorinfo { public string name = "quack"; public bool dlcIdentifier = false; public bool flyer = false; public float modelsize = 0f; public float CapR = 0f; public float CapH = 0f; public float CapY = 0f; public float camV = 0f; }