Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Impossible pack 2 v1.4.4
plugins/AncientScepter.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; 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 AncientScepter.Buffs; using AncientScepter.ScepterSkills; using AncientScepter.ScepterSkillsMonster; using BTP.RoR2Plugin; using BTP.RoR2Plugin.Language; using BTP.RoR2Plugin.Messages; using BTP.RoR2Plugin.Utils; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Bandit2.Weapon; using EntityStates.Captain.Weapon; using EntityStates.Commando.CommandoWeapon; using EntityStates.Huntress; using EntityStates.Huntress.Weapon; using EntityStates.Loader; using EntityStates.Mage; using EntityStates.Mage.Weapon; using EntityStates.Merc; using EntityStates.Merc.Weapon; using EntityStates.Railgunner.Backpack; using EntityStates.Railgunner.Weapon; using EntityStates.TitanMonster; using EntityStates.Toolbot; using EntityStates.Treebot.TreebotFlower; using EntityStates.VoidSurvivor.CorruptMode; using EntityStates.VoidSurvivor.Weapon; using EntityStates.Vulture.Weapon; using FRCSharp; using GuestUnion; using HG.GeneralSerializer; using HG.Reflection; using IL.EntityStates.Captain.Weapon; using IL.EntityStates.Loader; using IL.EntityStates.Mage.Weapon; using IL.EntityStates.Merc; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.Bandit2.Weapon; using On.EntityStates.Captain.Weapon; using On.EntityStates.Commando.CommandoWeapon; using On.EntityStates.Huntress; using On.EntityStates.Huntress.Weapon; using On.EntityStates.Loader; using On.EntityStates.Mage; using On.EntityStates.Mage.Weapon; using On.EntityStates.Merc; using On.EntityStates.Merc.Weapon; using On.EntityStates.Railgunner.Backpack; using On.EntityStates.Railgunner.Weapon; using On.EntityStates.TitanMonster; using On.EntityStates.Toolbot; using On.EntityStates.Treebot.TreebotFlower; using On.EntityStates.VoidSurvivor.CorruptMode; using On.EntityStates.VoidSurvivor.Weapon; using On.EntityStates.Vulture.Weapon; using On.RoR2; using On.RoR2.Orbs; using R2API; using R2API.AddressReferencedAssets; using R2API.Networking; using RoR2; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("AncientScepter")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("AncientScepter")] [assembly: AssemblyTitle("AncientScepter")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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 AncientScepter { public class AncientScepterItem : ItemBase<AncientScepterItem> { public enum StridesInteractionMode { HeresyTakesPrecedence, ScepterTakesPrecedence, ScepterRerolls } private class ScepterReplacer { public SkillDef upgradeDef; public string bodyName; public SkillSlot slotIndex; public SkillDef targetDef; public int variantIndex; } public static bool altModel; public static bool artiFlamePerformanceMode; public static bool captainNukeFriendlyFire; public static bool enableMonsterSkills; public static bool enableSOTVTransforms; public static bool removeClassicItemsScepterFromPool; public static bool turretBlacklist; public static GameObject ancientWispPrefab; public static Material purpleFireMaterial; public static StridesInteractionMode stridesInteractionMode; internal List<ScepterSkill> skills = new List<ScepterSkill>(); private readonly Dictionary<SkillSlot, SkillDef> heresyDefs = new Dictionary<SkillSlot, SkillDef>(); private readonly List<ScepterReplacer> scepterReplacers = new List<ScepterReplacer>(); private GameObject _itemDisplay; private GameObject _itemModel; private bool handlingInventory; private bool handlingOverride; public override GameObject ItemDisplayPrefab { get { if (!Object.op_Implicit((Object)(object)_itemDisplay)) { return _itemDisplay = Assets.mainAssetBundle.LoadAsset<GameObject>("mdl" + AssetName + "Display"); } return _itemDisplay; } } public override string ItemFullDescription => StringExtensions.ToGold("原始力量:来自原始传送器。") + "\n升级你的<style=cIsUtility>技能</style>。使特殊技能冷却时间减少" + StringExtensions.ToUtil<string>(StringExtensions.ToBaseAndStkPct<float>(0.25f, "(每层+_)")) + "。"; public override Sprite ItemIcon => Assets.mainAssetBundle.LoadAsset<Sprite>("tex" + AssetName + "Icon"); public override string ItemLangTokenName => "ANCIENT_SCEPTER"; public override string ItemLore => "Perfected energies. <He> holds it before us. The crystal of foreign elements is not attached physically, yet it does not falter from the staff's structure.\n\nOverwhelming strength. We watch as <His> might splits the ground asunder with a single strike.\n\nWondrous possibilities. <His> knowledge unlocks further pathways of development. We are enlightened by <Him>.\n\nExcellent results. From <His> hands, [Nanga] takes hold. It is as <He> said: The weak are culled.\n\nRisking everything. The crystal destabilizies. [Nanga] is gone, and <He> is forced to wield it once again.\n\nPower comes at a cost. <He> is willing to pay."; public override GameObject ItemModel { get { if (!Object.op_Implicit((Object)(object)_itemModel)) { return _itemModel = Assets.mainAssetBundle.LoadAsset<GameObject>("mdl" + AssetName + "Pickup"); } return _itemModel; } } public override string ItemName => "Ancient Scepter"; public override string ItemPickupDesc => "升级你的<style=cIsUtility>技能</style>。"; public override ItemTag[] ItemTags { get { ItemTag[] array = new ItemTag[5]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); array[0] = (ItemTag)(AIBlacklisted ? 4 : 0); return (ItemTag[])(object)array; } } public override ItemTier Tier => (ItemTier)2; public override bool TILER2_MimicBlacklisted => true; private string AssetName { get { if (!altModel) { return "AncientScepter"; } return "AghanimScepter"; } } public AncientScepterItem() { skills.Add(new ArtificerFlamethrower2()); skills.Add(new ArtificerFlyUp2()); skills.Add(new Bandit2ResetRevolver2()); skills.Add(new Bandit2SkullRevolver2()); skills.Add(new CaptainAirstrike2()); skills.Add(new CaptainAirstrikeAlt2()); skills.Add(new CommandoBarrage2()); skills.Add(new CommandoGrenade2()); skills.Add(new CrocoDisease2()); skills.Add(new EngiTurret2()); skills.Add(new EngiWalker2()); skills.Add(new HuntressBallista2()); skills.Add(new HuntressRain2()); skills.Add(new LoaderChargeFist2()); skills.Add(new LoaderChargeZapFist2()); skills.Add(new MercEvis2()); skills.Add(new MercEvisProjectile2()); skills.Add(new ToolbotDash2()); skills.Add(new TreebotFlower2_2()); skills.Add(new TreebotFireFruitSeed2()); skills.Add(new RailgunnerSuper2()); skills.Add(new RailgunnerCryo2()); skills.Add(new VoidFiendCrush()); if (enableMonsterSkills) { skills.Add(new AurelioniteEyeLaser2()); skills.Add(new VultureWindblade2()); } } public override void CreateConfig(ConfigFile config) { string text = "Item: " + ItemName; turretBlacklist = config.Bind<bool>("Engineer", "Blacklist Turrets", false, "If true, turrets will be blacklisted from getting the Ancient Scepter.\nIf false, they will get the scepter and will get rerolled depending on the reroll mode.").Value; artiFlamePerformanceMode = config.Bind<bool>("Artificer", "ArtiFlamePerformance", false, "If true, Dragon's Breath will use significantly lighter particle effects and no dynamic lighting.").Value; captainNukeFriendlyFire = config.Bind<bool>("Captain", "Captain Nuke Friendly Fire", false, "If true, then Captain's Scepter Nuke will also inflict blight on allies.").Value; stridesInteractionMode = config.Bind<StridesInteractionMode>(text, "Strides pickup mode", StridesInteractionMode.ScepterRerolls, "Changes what happens when a character whose skill is affected by Ancient Scepter has both Ancient Scepter and the corresponding heretic skill replacements (Visions/Hooks/Strides/Essence) at the same time.").Value; enableMonsterSkills = config.Bind<bool>(text, "Enable skills for monsters", true, "If true, certain monsters get the effects of the Ancient Scepter.").Value; altModel = config.Bind<bool>(text, "Alt Model", false, "Changes the model as a reference to a certain other scepter that upgrades abilities.").Value; removeClassicItemsScepterFromPool = config.Bind<bool>(text, "CLASSICITEMS: Remove Classic Items Ancient Scepter From Droplist If Installed", true, "If true, then the Ancient Scepter from Classic Items will be removed from the drop pool to prevent complications.").Value; enableSOTVTransforms = config.Bind<bool>(text, "Transformation Notification", true, "If true, then when scepters are re-rolled, then it will be accompanied by a transformation notification like other items.").Value; } public override ItemDisplayRuleDict CreateDisplayRules() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0100: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: 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_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: 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) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_040e: 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_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042e: 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_0449: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: 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_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0622: 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_065a: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06f5: 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_06ff: Unknown result type (might be due to invalid IL or missing references) //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_075e: Unknown result type (might be due to invalid IL or missing references) //IL_0763: Unknown result type (might be due to invalid IL or missing references) //IL_077d: Unknown result type (might be due to invalid IL or missing references) //IL_07ad: Unknown result type (might be due to invalid IL or missing references) //IL_07b2: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Unknown result type (might be due to invalid IL or missing references) //IL_0838: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_0853: Unknown result type (might be due to invalid IL or missing references) //IL_0858: Unknown result type (might be due to invalid IL or missing references) //IL_086e: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_0879: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Unknown result type (might be due to invalid IL or missing references) //IL_08c8: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_08f9: Unknown result type (might be due to invalid IL or missing references) //IL_08fe: Unknown result type (might be due to invalid IL or missing references) //IL_0903: Unknown result type (might be due to invalid IL or missing references) //IL_0904: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Unknown result type (might be due to invalid IL or missing references) //IL_094e: Unknown result type (might be due to invalid IL or missing references) //IL_0953: Unknown result type (might be due to invalid IL or missing references) //IL_0969: Unknown result type (might be due to invalid IL or missing references) //IL_096e: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Unknown result type (might be due to invalid IL or missing references) //IL_0989: Unknown result type (might be due to invalid IL or missing references) //IL_098e: Unknown result type (might be due to invalid IL or missing references) //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: Unknown result type (might be due to invalid IL or missing references) //IL_09de: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) SetupMaterials(ItemModel); ItemModel.AddComponent<ItemDisplay>().rendererInfos = Assets.SetupRendererInfos(ItemModel); ItemBase.displayPrefab = ItemDisplayPrefab; SetupMaterials(ItemDisplayPrefab); ItemDisplayPrefab.AddComponent<ItemDisplay>().rendererInfos = Assets.SetupRendererInfos(ItemDisplayPrefab); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.1473f, -0.073f, -0.0935f), localAngles = new Vector3(333.2843f, 198.8161f, 165.1177f), localScale = new Vector3(0.2235f, 0.2235f, 0.2235f) } }); val.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0f, 0.0638f, 0.0973f), localAngles = new Vector3(76.6907f, 0f, 0f), localScale = new Vector3(0.2812f, 0.2812f, 0.2812f) } }); val.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "HandR", localPos = new Vector3(-0.0021f, 0.1183f, 0.063f), localAngles = new Vector3(0f, 34.1f, 90f), localScale = new Vector3(0.4416f, 0.4416f, 0.4416f) } }); val.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "CannonHeadR", localPos = new Vector3(0.0186f, 0.3435f, 0.2246f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.5614f, 0.5614f, 0.5614f) } }); val.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.1712f, 0f, 0f), localAngles = new Vector3(69.8111f, 180f, 180f), localScale = new Vector3(0.2679f, 0.2679f, 0.2679f) } }); val.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "MechLowerArmR", localPos = new Vector3(0.0813f, 0.4165f, -0.0212f), localAngles = new Vector3(0f, 180f, 180f), localScale = new Vector3(0.4063f, 0.4063f, 0.4063f) } }); val.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.0046f, 0.0099f, -0.286f), localAngles = new Vector3(10.4706f, 1.6895f, 24.8468f), localScale = new Vector3(0.4928f, 0.4928f, 0.4928f) } }); val.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "Chest", localPos = new Vector3(1.1191f, 0.358f, -1.6717f), localAngles = new Vector3(0f, 0f, 270f), localScale = new Vector3(2.4696f, 2.4696f, 2.4696f) } }); val.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "CalfFrontL", localPos = new Vector3(0f, 0.8376f, -0.1766f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.8037f, 0.8037f, 0.8037f) } }); val.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "MouthMuzzle", localPos = new Vector3(0f, 2.1215f, 2.9939f), localAngles = new Vector3(0f, 0f, 270f), localScale = new Vector3(5.2969f, 5.2969f, 5.2969f) } }); val.Add("mdlBandit", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.1152f, -0.1278f, 0.2056f), localAngles = new Vector3(20f, 285f, 10f), localScale = new Vector3(0.2235f, 0.2235f, 0.2235f) } }); val.Add("mdlEnforcer", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { ItemHelpers.CreateDisplayRule(ItemDisplayPrefab, "Pelvis", new Vector3(-0.08448f, 0.00357f, -0.35566f), new Vector3(43.57039f, 347.6845f, 69.64303f), new Vector3(0.31291f, 0.31291f, 0.31291f)) }); val.Add("mdlNemforcer", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { ItemHelpers.CreateDisplayRule(ItemDisplayPrefab, "Minigun", new Vector3(0.00287f, -0.00305f, -0.03029f), new Vector3(358.9499f, 89.5545f, 180.8908f), new Vector3(0.00837f, 0.00837f, 0.00837f)) }); val.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { childName = "Hand", followerPrefab = ItemDisplayPrefab, localPos = new Vector3(-0.02335f, 0.11837f, 0.11306f), localAngles = new Vector3(55.42191f, 299.1461f, 266.1845f), localScale = new Vector3(0.56092f, 0.56276f, 0.56092f) } }); val.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { childName = "ThighR", followerPrefab = ItemDisplayPrefab, localPos = new Vector3(-0.11836f, 0.17205f, 0.0282f), localAngles = new Vector3(353.4687f, 184.4017f, 177.4758f), localScale = new Vector3(0.2235f, 0.2235f, 0.2235f) } }); val.Add("mdlNemmando", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { childName = "Sword", followerPrefab = ItemDisplayPrefab, localPos = new Vector3(-5.576489E-05f, 0.001674413f, -2.617424E-05f), localAngles = new Vector3(1.114511f, 204.2958f, 177.8329f), localScale = new Vector3(0.0026f, 0.0026f, 0.0026f) } }); val.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { childName = "ThighL", followerPrefab = ItemDisplayPrefab, localPos = new Vector3(0.49264f, -0.16267f, -0.14486f), localAngles = new Vector3(9.97009f, 351.3801f, 100.2498f), localScale = new Vector3(0.5f, 0.5f, 0.5f) } }); val.Add("mdlBrother", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { childName = "HandL", followerPrefab = ItemDisplayPrefab, localPos = new Vector3(-0.05066f, 0.13436f, 0.0282f), localAngles = new Vector3(79.95749f, 180f, 230.595f), localScale = new Vector3(0.4f, 0.4f, 0.4f) } }); return val; } public override void Hooks() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown base.Hooks(); CharacterBody.onBodyInventoryChangedGlobal += OnBodyInventoryChangedGlobal; CharacterMaster.GetDeployableSameSlotLimit += new hook_GetDeployableSameSlotLimit(OnGetDeployableSameSlotLimit); GenericSkill.SetSkillOverride += new hook_SetSkillOverride(OnSetSkillOverride); MainMenuController.OnMainMenuInitialised += OnMainMenuInitialised; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); Run.onRunStartGlobal += On_RunStartGlobal_UseOnce; TeleporterInteraction.onTeleporterChargedGlobal += OnTeleporterChargedGlobal; } public override void Init(ConfigFile config) { ancientWispPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/AncientWispBody"); CreateConfig(config); CreateItem(); CreateLang(); Hooks(); RegisterScepterSkills(); } public void InstallSkills() { skills.ForEach(delegate(ScepterSkill s) { s.LoadBehavior(); }); MiscUtil.AliveList().ForEach(delegate(CharacterMaster master) { CharacterBody body = master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { HandleScepterSkill(body); } }); } public void InstallSkillsLanguage() { skills.ForEach(delegate(ScepterSkill skill) { if (!Utility.IsNullOrWhiteSpace(skill.oldDescToken)) { languageOverlays.Add(LanguageAPI.AddOverlay(skill.newDescToken, Language.GetString(skill.oldDescToken) + skill.scepterSkillDesc)); } }); } public bool RegisterScepterSkill(SkillDef replacingDef, string targetBodyName, SkillSlot targetSlot, int targetVariant) { //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) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) if (targetVariant < 0) { AncientScepterMain._logger.LogError((object)"Can't register a scepter skill to negative variant index"); return false; } ScepterReplacer scepterReplacer = scepterReplacers.FirstOrDefault((ScepterReplacer x) => x.bodyName == targetBodyName && x.slotIndex == targetSlot && x.variantIndex == targetVariant); if (scepterReplacer != null) { AncientScepterMain._logger.LogMessage((object)("Replacing scepter skill for \"" + targetBodyName + "\" (" + scepterReplacer.upgradeDef.skillName + ") with (" + replacingDef.skillName + ")")); scepterReplacers.Remove(scepterReplacer); } AncientScepterMain._logger.LogMessage((object)("Adding scepter skill for \"" + targetBodyName + "\" (" + replacingDef.skillName + ")")); scepterReplacers.Add(new ScepterReplacer { bodyName = targetBodyName, slotIndex = targetSlot, variantIndex = targetVariant, upgradeDef = replacingDef }); return true; } public bool RegisterScepterSkill(SkillDef replacingDef, string targetBodyName, SkillDef targetDef) { //IL_00e9: Unknown result type (might be due to invalid IL or missing references) ScepterReplacer scepterReplacer = scepterReplacers.FirstOrDefault((ScepterReplacer x) => x.bodyName == targetBodyName && (Object)(object)x.targetDef == (Object)(object)targetDef); if (scepterReplacer != null) { AncientScepterMain._logger.LogMessage((object)("Replacing scepter skill for \"" + targetBodyName + "\" (" + scepterReplacer.upgradeDef.skillName + ") with (" + replacingDef.skillName + ")")); scepterReplacers.Remove(scepterReplacer); } AncientScepterMain._logger.LogMessage((object)("Adding scepter skill for \"" + targetBodyName + "\" (" + replacingDef.skillName + ")")); scepterReplacers.Add(new ScepterReplacer { bodyName = targetBodyName, slotIndex = (SkillSlot)(-1), variantIndex = -1, upgradeDef = replacingDef, targetDef = targetDef }); return true; } public void RegisterScepterSkills() { //IL_0041: 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) skills.ForEach(delegate(ScepterSkill skill) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) skill.SetupAttributes(); RegisterScepterSkill(skill.scepterSkillDef, skill.targetBody, skill.targetSlot, skill.targetVariantIndex); }); HereticNevermore2 hereticNevermore = new HereticNevermore2(); hereticNevermore.SetupAttributes(); skills.Add(hereticNevermore); RegisterScepterSkill(hereticNevermore.scepterSkillDef, hereticNevermore.targetBody, Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Heretic/HereticDefaultAbility.asset").WaitForCompletion()); InstallSkills(); } protected override void SetupMaterials(GameObject modelPrefab) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) purpleFireMaterial = ((Renderer)((Component)ancientWispPrefab.transform.Find("Model Base?/mdlAncientWisp/AncientWispArmature/chest/Fire, Main")).GetComponent<ParticleSystemRenderer>()).material; modelPrefab.GetComponentInChildren<Renderer>().material = Assets.CreateMaterial("mat" + AssetName, 1f, Color.white, 1f); ParticleSystemRenderer[] componentsInChildren = modelPrefab.GetComponentsInChildren<ParticleSystemRenderer>(); for (int i = 0; i < componentsInChildren.Length; i++) { ((Renderer)componentsInChildren[i]).material = purpleFireMaterial; } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)sender.inventory)) { args.specialCooldownMultAdd -= 1f - Mathf.Pow(0.75f, (float)sender.inventory.GetItemCount(base.ItemDef.itemIndex)); } } private void OnMainMenuInitialised() { MainMenuController.OnMainMenuInitialised -= OnMainMenuInitialised; InstallSkillsLanguage(); } private void CleanScepter(CharacterBody self, GenericSkill slot = null, bool force = false) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) string bodyName = BodyCatalog.GetBodyName(self.bodyIndex); List<ScepterReplacer> source = scepterReplacers.FindAll((ScepterReplacer x) => x.bodyName == bodyName); if ((Object)(object)slot != (Object)null) { if (source.Any((ScepterReplacer r) => (Object)(object)r.upgradeDef == (Object)(object)slot.skillDef && (force || ((Object)(object)slot.baseSkill != (Object)(object)r.targetDef && !slot.skillOverrides.Any((SkillOverride s) => (Object)(object)r.targetDef == (Object)(object)s.skillDef))))) { slot.UnsetSkillOverride((object)self, slot.skillDef, (SkillOverridePriority)2); } return; } GenericSkill[] allSkills = self.skillLocator.allSkills; foreach (GenericSkill val in allSkills) { if (source.Any((ScepterReplacer r) => (Object)(object)r.upgradeDef == (Object)(object)slot.skillDef && (force || ((Object)(object)slot.baseSkill != (Object)(object)r.targetDef && !slot.skillOverrides.Any((SkillOverride s) => (Object)(object)r.targetDef == (Object)(object)s.skillDef))))) { val.UnsetSkillOverride((object)self, val.skillDef, (SkillOverridePriority)2); } } } private bool HandleScepterSkill(CharacterBody self, bool forceOff = false) { //IL_0057: 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_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Invalid comparison between Unknown and I4 //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) ScepterReplacer replVar; if (Object.op_Implicit((Object)(object)self.skillLocator) && self.master?.loadout != null) { string bodyName = BodyCatalog.GetBodyName(self.bodyIndex); List<ScepterReplacer> list = scepterReplacers.FindAll((ScepterReplacer x) => x.bodyName == bodyName); if (list.Count > 0) { if (list.Select((ScepterReplacer x) => x.upgradeDef).Intersect(self.skillLocator.allSkills.Select((GenericSkill x) => x.skillDef)).Any() && GetCount(self) > 0) { return true; } GenericSkill val = null; SkillSlot val2 = (SkillSlot)(-1); replVar = null; bool flag = false; foreach (ScepterReplacer replacement in list) { foreach (GenericSkill item in self.skillLocator.allSkills.Reverse().ToList().FindAll((GenericSkill s) => (Object)(object)s.skillDef == (Object)(object)replacement.targetDef || (Object)(object)s.baseSkill == (Object)(object)replacement.targetDef)) { val = item; val2 = (((int)replacement.slotIndex == -1) ? self.skillLocator.FindSkillSlot(val) : replacement.slotIndex); if ((stridesInteractionMode != StridesInteractionMode.ScepterTakesPrecedence || bodyName == "HereticBody") && hasHeresyForSlot(val2) && (Object)(object)replacement.targetDef != (Object)(object)heresyDefs[val2]) { flag = true; continue; } replVar = replacement; break; } if (replVar != null && Object.op_Implicit((Object)(object)val) && (Object)(object)replVar.targetDef == (Object)(object)val.skillDef) { break; } } if (replVar == null) { if (flag) { return stridesInteractionMode != StridesInteractionMode.ScepterRerolls; } return false; } bool flag2 = handlingOverride; handlingOverride = true; if (!forceOff && GetCount(self) > 0) { if (stridesInteractionMode == StridesInteractionMode.ScepterTakesPrecedence && hasHeresyForSlot(val2)) { self.skillLocator.GetSkill(val2).UnsetSkillOverride((object)self, heresyDefs[val2], (SkillOverridePriority)3); } val.SetSkillOverride((object)self, replVar.upgradeDef, (SkillOverridePriority)2); val.onSkillChanged += UnsetOverrideLater; } else { val.UnsetSkillOverride((object)self, replVar.upgradeDef, (SkillOverridePriority)2); if (stridesInteractionMode == StridesInteractionMode.ScepterTakesPrecedence && hasHeresyForSlot(val2)) { self.skillLocator.GetSkill(val2).SetSkillOverride((object)self, heresyDefs[val2], (SkillOverridePriority)3); } } handlingOverride = flag2; return true; } } return false; void UnsetOverrideLater(GenericSkill skill) { skill.onSkillChanged -= UnsetOverrideLater; skill.UnsetSkillOverride((object)self, replVar.upgradeDef, (SkillOverridePriority)2); } bool hasHeresyForSlot(SkillSlot skillSlot) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected I4, but got Unknown return (int)skillSlot switch { 0 => self.inventory.GetItemCount(Items.LunarPrimaryReplacement) > 0, 1 => self.inventory.GetItemCount(Items.LunarSecondaryReplacement) > 0, 2 => self.inventory.GetItemCount(Items.LunarUtilityReplacement) > 0, 3 => self.inventory.GetItemCount(Items.LunarSpecialReplacement) > 0, _ => false, }; } } private void OnBodyInventoryChangedGlobal(CharacterBody body) { if (!handlingInventory) { handlingInventory = true; HandleScepterSkill(body); handlingInventory = false; } } private int OnGetDeployableSameSlotLimit(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if ((int)slot == 1) { CharacterBody body = self.GetBody(); if ((Object)(object)body != (Object)null) { return orig.Invoke(self, slot) + body.skillLocator.special.skillDef.baseMaxStock - 2; } } return orig.Invoke(self, slot); } private void OnSetSkillOverride(orig_SetSkillOverride orig, GenericSkill self, object source, SkillDef skillDef, SkillOverridePriority priority) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, source, skillDef, priority); if (!handlingOverride && Object.op_Implicit((Object)(object)self.characterBody)) { handlingOverride = true; CleanScepter(self.characterBody, self); HandleScepterSkill(self.characterBody); handlingOverride = false; } } private void On_RunStartGlobal_UseOnce(Run run) { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Invalid comparison between Unknown and I4 //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) heresyDefs.Add((SkillSlot)0, CommonAssets.lunarPrimaryReplacementSkillDef); heresyDefs.Add((SkillSlot)1, CommonAssets.lunarSecondaryReplacementSkillDef); heresyDefs.Add((SkillSlot)2, CommonAssets.lunarUtilityReplacementSkillDef); heresyDefs.Add((SkillSlot)3, CommonAssets.lunarSpecialReplacementSkillDef); foreach (ScepterReplacer item in scepterReplacers.Where((ScepterReplacer x) => (Object)(object)x.targetDef == (Object)null)) { GameObject obj = BodyCatalog.FindBodyPrefab(item.bodyName); SkillLocator val = ((obj != null) ? obj.GetComponent<SkillLocator>() : null); if (Object.op_Implicit((Object)(object)val) && (int)item.slotIndex != -1 && item.variantIndex >= 0) { Variant[] variants = val.GetSkill(item.slotIndex).skillFamily.variants; if (variants.Length <= item.variantIndex) { AncientScepterMain._logger.LogError((object)$"Invalid Scepter Replacement for body:{item.bodyName},slot:{item.slotIndex},with skill:{item.upgradeDef.skillNameToken}"); item.targetDef = null; } else { item.targetDef = variants[item.variantIndex].skillDef; } } } Run.onRunStartGlobal -= On_RunStartGlobal_UseOnce; } private void OnTeleporterChargedGlobal(TeleporterInteraction teleporter) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_00a2: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_00b1: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && ((Object)teleporter).name.StartsWith("LunarTeleporter")) { int participatingPlayerCount = Run.instance.participatingPlayerCount; PickupIndex val = PickupCatalog.FindPickupIndex(base.ItemDef.itemIndex); Vector3 position = teleporter.bossGroup.dropPosition.position; Vector3 val2 = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.up) * (Vector3.up * 40f + Vector3.forward * 2.5f); Quaternion val3 = Quaternion.AngleAxis(360f / (float)participatingPlayerCount, Vector3.up); while (participatingPlayerCount-- > 0) { PickupDropletController.CreatePickupDroplet(val, position, val2); val2 = val3 * val2; } } } } public abstract class ScepterSkill { public abstract SkillDef scepterSkillDef { get; protected set; } public abstract string newDescToken { get; protected set; } public abstract string oldDescToken { get; protected set; } public abstract string scepterSkillDesc { get; } public abstract string targetBody { get; } public abstract SkillSlot targetSlot { get; } public abstract int targetVariantIndex { get; } internal virtual void LoadBehavior() { } internal abstract void SetupAttributes(); internal virtual void UnloadBehavior() { } protected bool IsScepterSkill(SkillLocator skillLocator) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)skillLocator)) { return false; } GenericSkill skill = skillLocator.GetSkill(targetSlot); if (!Object.op_Implicit((Object)(object)skill)) { return false; } return skill.skillDef.skillIndex == scepterSkillDef.skillIndex; } protected bool IsScepterSkill(GenericSkill genericSkill) { if (!Object.op_Implicit((Object)(object)genericSkill)) { return false; } return genericSkill.skillDef.skillIndex == scepterSkillDef.skillIndex; } } [BepInPlugin("com.DestroyedClone.AncientScepter", "StandaloneAncientScepter", "10.0.1")] [BepInDependency("com.bepis.r2api", "5.1.5")] public class AncientScepterMain : BaseUnityPlugin { public const string ModVer = "10.0.1"; public const string ModName = "StandaloneAncientScepter"; public const string ModGuid = "com.DestroyedClone.AncientScepter"; internal static ManualLogSource _logger = null; internal static ConfigFile _config = null; public List<ItemBase> Items = new List<ItemBase>(); public static readonly Dictionary<ItemBase, bool> ItemStatusDictionary = new Dictionary<ItemBase, bool>(); private void Awake() { _logger = ((BaseUnityPlugin)this).Logger; _config = ((BaseUnityPlugin)this).Config; ModCompat.Init(); CustomDamageTypes.SetupDamageTypes(); PerishSong.SetUp(); Assets.PopulateAssets(); Assets.SpriteAssets.InitializeAssets(); foreach (Type item in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type) { ItemBase itemBase = (ItemBase)Activator.CreateInstance(item); if (ValidateItem(itemBase, Items)) { itemBase.Init(((BaseUnityPlugin)this).Config); } } Run.onRunStartGlobal += Run_onRunStartGlobal; } private void Run_onRunStartGlobal(Run run) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown ItemBase<AncientScepterItem>.instance.rng = new Xoroshiro128Plus(run.runRNG.nextUlong); } private bool ValidateItem(ItemBase item, List<ItemBase> itemList) { item.AIBlacklisted = ((BaseUnityPlugin)this).Config.Bind<bool>("Item: " + item.ItemName, "Blacklist Item from AI Use?", false, "Should the AI not be able to obtain this item?").Value; ItemStatusDictionary.Add(item, ((Behaviour)this).enabled); itemList.Add(item); return ((Behaviour)this).enabled; } } public static class Assets { public static class SpriteAssets { public static Sprite ArtificerFlameThrower2; public static Sprite ArtificerFlyUp2; public static Sprite Bandit2ResetRevolver2; public static Sprite Bandit2SkullRevolver2; public static Sprite CaptainAirstrike2; public static Sprite CaptainAirstrikeAlt2; public static Sprite CommandoBarrage2; public static Sprite CommandoGrenade2; public static Sprite CrocoDisease2; public static Sprite EngiTurret2; public static Sprite EngiWalker2; public static Sprite HereticNevermore2; public static Sprite HuntressBallista2; public static Sprite HuntressRain2; public static Sprite LoaderChargeFist2; public static Sprite LoaderChargeZapFist2; public static Sprite MercEvis2; public static Sprite MercEvis2Projectile; public static Sprite ToolbotDash2; public static Sprite TreebotFireFruitSeed2; public static Sprite TreebotFlower2_2; public static Sprite RailgunnerSupercharge2; public static Sprite RailgunnerFireSupercharge2; public static Sprite RailgunnerCryocharge2; public static Sprite RailgunnerFireCryocharge2; public static Sprite VoidFiendSuppress2; public static Sprite VoidFiendCorruptedSuppress2; public static void InitializeAssets() { ArtificerFlameThrower2 = mainAssetBundle.LoadAsset<Sprite>("texArtiR1"); ArtificerFlyUp2 = mainAssetBundle.LoadAsset<Sprite>("texArtiR2"); Bandit2ResetRevolver2 = mainAssetBundle.LoadAsset<Sprite>("texBanditR1"); Bandit2SkullRevolver2 = mainAssetBundle.LoadAsset<Sprite>("texBanditR2"); CaptainAirstrike2 = mainAssetBundle.LoadAsset<Sprite>("texCapU1"); CaptainAirstrikeAlt2 = mainAssetBundle.LoadAsset<Sprite>("texCapU2"); CommandoBarrage2 = mainAssetBundle.LoadAsset<Sprite>("texCommandoR1"); CommandoGrenade2 = mainAssetBundle.LoadAsset<Sprite>("texCommandoR2"); CrocoDisease2 = mainAssetBundle.LoadAsset<Sprite>("texAcridR1"); EngiTurret2 = mainAssetBundle.LoadAsset<Sprite>("texEngiR1"); EngiWalker2 = mainAssetBundle.LoadAsset<Sprite>("texEngiR2"); HereticNevermore2 = mainAssetBundle.LoadAsset<Sprite>("texHereticR2"); HuntressBallista2 = mainAssetBundle.LoadAsset<Sprite>("texHuntressR2"); HuntressRain2 = mainAssetBundle.LoadAsset<Sprite>("texHuntressR1"); LoaderChargeFist2 = mainAssetBundle.LoadAsset<Sprite>("texLoaderU1"); LoaderChargeZapFist2 = mainAssetBundle.LoadAsset<Sprite>("texLoaderU2"); MercEvis2 = mainAssetBundle.LoadAsset<Sprite>("texMercR1"); MercEvis2Projectile = mainAssetBundle.LoadAsset<Sprite>("texMercR2"); ToolbotDash2 = mainAssetBundle.LoadAsset<Sprite>("texMultU1"); TreebotFireFruitSeed2 = mainAssetBundle.LoadAsset<Sprite>("texRexR2"); TreebotFlower2_2 = mainAssetBundle.LoadAsset<Sprite>("texRexR1"); RailgunnerSupercharge2 = mainAssetBundle.LoadAsset<Sprite>("texRailgunnerR1"); RailgunnerFireSupercharge2 = mainAssetBundle.LoadAsset<Sprite>("texRailgunnerP1"); RailgunnerCryocharge2 = mainAssetBundle.LoadAsset<Sprite>("texRailgunnerR2"); RailgunnerFireCryocharge2 = mainAssetBundle.LoadAsset<Sprite>("texRailgunnerP2"); VoidFiendSuppress2 = mainAssetBundle.LoadAsset<Sprite>("texVoidFiendR1"); VoidFiendCorruptedSuppress2 = mainAssetBundle.LoadAsset<Sprite>("texVoidFiendR1C"); } } internal static AssetBundle mainAssetBundle; public static Shader hotpoo = Resources.Load<Shader>("Shaders/Deferred/HGStandard"); public static Material commandoMat; public static void PopulateAssets() { if ((Object)(object)mainAssetBundle == (Object)null) { using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("AncientScepter.ancientscepter")) { mainAssetBundle = AssetBundle.LoadFromStream(stream); } } } public static Material CreateMaterial(string materialName, float emission, Color emissionColor, float normalStrength) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)commandoMat)) { commandoMat = Resources.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren<CharacterModel>().baseRendererInfos[0].defaultMaterial; } Material val = Object.Instantiate<Material>(commandoMat); Material val2 = mainAssetBundle.LoadAsset<Material>(materialName); if (!Object.op_Implicit((Object)(object)val2)) { return commandoMat; } ((Object)val).name = materialName; val.SetColor("_Color", val2.GetColor("_Color")); val.SetTexture("_MainTex", val2.GetTexture("_MainTex")); val.SetColor("_EmColor", emissionColor); val.SetFloat("_EmPower", emission); val.SetTexture("_EmTex", val2.GetTexture("_EmissionMap")); val.SetFloat("_NormalStrength", normalStrength); return val; } public static Material CreateMaterial(string materialName) { return CreateMaterial(materialName, 0f); } public static Material CreateMaterial(string materialName, float emission) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return CreateMaterial(materialName, emission, Color.black); } public static Material CreateMaterial(string materialName, float emission, Color emissionColor) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return CreateMaterial(materialName, emission, emissionColor, 0f); } public static RendererInfo[] SetupRendererInfos(GameObject obj) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0048: Unknown result type (might be due to invalid IL or missing references) Renderer[] componentsInChildren = obj.GetComponentsInChildren<Renderer>(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { array[i] = new RendererInfo { defaultMaterial = componentsInChildren[i].material, renderer = componentsInChildren[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } } public class BanditRicochetOrb : Orb { public delegate void HitCallback(BanditRicochetOrb orb); public const float DamageCoefficientPerBounce = 0.9f; public const float BaseRicochetChance = 25f; public const float StackRicochetChance = 0.1f; public const float Range = 25f; public const int Bounces = 5; public bool isCrit; public bool resetBouncedObjectsPerBounce; public CharacterBody attackerBody; public DamageColorIndex damageColorIndex; public DamageType damageType; public float damageValue; public float procCoefficient = 1f; public float range; public float speed = 60f; public GameObject hitEffectPrefab; public GameObject inflictor; public GameObject tracerEffectPrefab; public HitCallback hitCallback; public int bouncesRemaining; public List<HealthComponent> bouncedObjects; public ProcChainMask procChainMask; public string hitSoundString; public TeamIndex teamIndex; private static readonly BullseyeSearch _search = new BullseyeSearch { sortMode = (SortMode)1, filterByLoS = false, searchDirection = Vector3.zero }; public static bool RollNextRicochet(CharacterBody characterBody, float chanceCoefficient = 1f) { if (!Object.op_Implicit((Object)(object)characterBody)) { return false; } int buffCount = characterBody.GetBuffCount(Buffs.BanditSkull); return Util.CheckRoll((25f + 0.1f * (float)buffCount) * chanceCoefficient, 0f, (CharacterMaster)null); } public override void OnArrival() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_019a: Unknown result type (might be due to invalid IL or missing references) ((Orb)this).OnArrival(); if (Object.op_Implicit((Object)(object)base.target)) { HealthComponent healthComponent = base.target.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { DamageInfo val = new DamageInfo { damage = damageValue, attacker = (Object.op_Implicit((Object)(object)attackerBody) ? ((Component)attackerBody).gameObject : null), inflictor = inflictor, force = Vector3.zero, crit = isCrit, procChainMask = procChainMask, procCoefficient = procCoefficient, position = ((Component)base.target).transform.position, damageColorIndex = damageColorIndex, damageType = DamageTypeCombo.op_Implicit(damageType) }; healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); if (Object.op_Implicit((Object)(object)tracerEffectPrefab)) { EffectManager.SpawnEffect(tracerEffectPrefab, new EffectData { origin = ((Component)base.target).transform.position, start = base.origin }, true); } } hitCallback?.Invoke(this); if (bouncesRemaining > 0 && RollNextRicochet(attackerBody)) { if (resetBouncedObjectsPerBounce) { bouncedObjects.Clear(); bouncedObjects.Add(base.target.healthComponent); } if (Object.op_Implicit((Object)(object)(base.target = PickNextTarget(((Component)base.target).transform.position)))) { bouncesRemaining--; OrbManager.instance.AddOrb((Orb)(object)this); return; } } } bouncedObjects.Clear(); } public override void Begin() { ((Orb)this).Begin(); ((Orb)this).duration = ((Orb)this).distanceToTarget / speed; } public HurtBox PickNextTarget(Vector3 position) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) _search.searchOrigin = position; _search.teamMaskFilter = TeamMask.GetEnemyTeams(teamIndex); _search.maxDistanceFilter = range; _search.RefreshCandidates(); HurtBox val = (from h in _search.GetResults() where !bouncedObjects.Contains(h.healthComponent) select h).FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { bouncedObjects.Add(val.healthComponent); } return val; } } internal static class CustomDamageTypes { internal static ModdedDamageType BanditRicochetOnHit; internal static ModdedDamageType ScepterCaptainNukeDT; internal static ModdedDamageType ScepterDestroy20ArmorDT; internal static ModdedDamageType IceBlastOnHit; internal static ModdedDamageType ScepterFruitDT; internal static void SetupDamageTypes() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) BanditRicochetOnHit = DamageAPI.ReserveDamageType(); ScepterCaptainNukeDT = DamageAPI.ReserveDamageType(); ScepterDestroy20ArmorDT = DamageAPI.ReserveDamageType(); IceBlastOnHit = DamageAPI.ReserveDamageType(); ScepterFruitDT = DamageAPI.ReserveDamageType(); } } public abstract class ItemBase<T> : ItemBase where T : ItemBase<T> { public static T instance { get; private set; } public ItemBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ItemBoilerplate/Item was instantiated twice"); } instance = this as T; } } public abstract class ItemBase { public static GameObject displayPrefab; protected readonly List<LanguageOverlay> languageOverlays = new List<LanguageOverlay>(); public virtual bool AIBlacklisted { get; set; } public virtual bool CanRemove { get; } = true; public ItemDef ItemDef { get; private set; } public abstract GameObject ItemDisplayPrefab { get; } public abstract string ItemFullDescription { get; } public abstract Sprite ItemIcon { get; } public abstract string ItemLangTokenName { get; } public abstract string ItemLore { get; } public abstract GameObject ItemModel { get; } public abstract string ItemName { get; } public abstract string ItemPickupDesc { get; } public abstract ItemTag[] ItemTags { get; } public bool languageInstalled { get; private set; } public Xoroshiro128Plus rng { get; internal set; } public abstract ItemTier Tier { get; } public virtual bool TILER2_MimicBlacklisted { get; set; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void TILER2_BlacklistItem(ItemDef itemDef) { } public virtual void CreateConfig(ConfigFile config) { } public virtual ItemDisplayRuleDict CreateDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); } public int GetCount(CharacterBody body) { Inventory val = (Object.op_Implicit((Object)(object)body) ? body.inventory : null); if (!Object.op_Implicit((Object)(object)val)) { return 0; } return val.GetItemCount(ItemDef); } public int GetCount(CharacterMaster master) { Inventory val = (Object.op_Implicit((Object)(object)master) ? master.inventory : null); if (!Object.op_Implicit((Object)(object)val)) { return 0; } return val.GetItemCount(ItemDef); } public int GetCountSpecific(CharacterBody body, ItemDef itemDef) { Inventory val = (Object.op_Implicit((Object)(object)body) ? body.inventory : null); if (!Object.op_Implicit((Object)(object)val)) { return 0; } return val.GetItemCount(itemDef); } public virtual void Hooks() { } public abstract void Init(ConfigFile config); protected void CreateItem() { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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_0152: Expected O, but got Unknown ItemDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)ItemDef).name = "ITEM_" + ItemLangTokenName; ItemDef.nameToken = "ITEM_" + ItemLangTokenName + "_NAME"; ItemDef.pickupToken = "ITEM_" + ItemLangTokenName + "_PICKUP"; ItemDef.descriptionToken = "ITEM_" + ItemLangTokenName + "_DESCRIPTION"; ItemDef.loreToken = "ITEM_" + ItemLangTokenName + "_LORE"; ItemDef.pickupModelPrefab = ItemModel; ItemDef.pickupIconSprite = ItemIcon; ItemDef.hidden = false; ItemDef.tags = ItemTags; ItemDef.canRemove = CanRemove; ItemDef.tier = Tier; ItemDef.deprecatedTier = Tier; if (TILER2_MimicBlacklisted && Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.TILER2")) { TILER2_BlacklistItem(ItemDef); } ItemAPI.Add(new CustomItem(ItemDef, CreateDisplayRules())); } protected void CreateLang() { if (!languageInstalled) { LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_NAME", ItemName); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_PICKUP", ItemPickupDesc); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_DESCRIPTION", ItemFullDescription); LanguageAPI.Add("ITEM_" + ItemLangTokenName + "_LORE", ItemLore); languageInstalled = true; } } protected virtual void SetupMaterials(GameObject modelPrefab) { Renderer[] componentsInChildren = modelPrefab.GetComponentsInChildren<Renderer>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].material.shader = Assets.hotpoo; } } } internal class ItemHelpers { public static RendererInfo[] ItemDisplaySetup(GameObject obj) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0048: Unknown result type (might be due to invalid IL or missing references) MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { array[i] = new RendererInfo { defaultMaterial = ((Renderer)componentsInChildren[i]).material, renderer = (Renderer)(object)componentsInChildren[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } public static KeyAssetRuleGroup CreateGenericDisplayRuleGroup(Object keyAsset_, GameObject itemPrefab, string childName, Vector3 position, Vector3 rotation, Vector3 scale) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRule val = CreateDisplayRule(itemPrefab, childName, position, rotation, scale); return CreateDisplayRuleGroupWithRules(keyAsset_, val); } public static ItemDisplayRule CreateDisplayRule(GameObject itemPrefab, string childName, Vector3 position, Vector3 rotation, Vector3 scale) { //IL_0002: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0032: 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_003a: 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_0041: Unknown result type (might be due to invalid IL or missing references) ItemDisplayRule result = default(ItemDisplayRule); result.ruleType = (ItemDisplayRuleType)0; result.childName = childName; result.followerPrefab = itemPrefab; result.limbMask = (LimbFlags)0; result.localPos = position; result.localAngles = rotation; result.localScale = scale; return result; } public static KeyAssetRuleGroup CreateDisplayRuleGroupWithRules(Object keyAsset_, params ItemDisplayRule[] rules) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) KeyAssetRuleGroup result = default(KeyAssetRuleGroup); result.keyAsset = keyAsset_; result.displayRuleGroup = new DisplayRuleGroup { rules = rules }; return result; } public static string OrderManifestLoreFormatter(string deviceName, string estimatedDelivery, string sentTo, string trackingNumber, string devicePickupDesc, string shippingMethod, string orderDetails) { string[] value = new string[19] { "<align=left>Estimated Delivery:<indent=70%>Sent To:</indent></align>", "<align=left>" + estimatedDelivery + "<indent=70%>" + sentTo + "</indent></align>", "", "<indent=1%><style=cIsDamage><size=125%><u> Shipping Details:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0</u></size></style></indent>", "", "<indent=2%>-Order: <style=cIsUtility>" + deviceName + "</style></indent>", "<indent=4%><style=cStack>Tracking Number: " + trackingNumber + "</style></indent>", "", "<indent=2%>-Order Description: " + devicePickupDesc + "</indent>", "", "<indent=2%>-Shipping Method: <style=cIsHealth>" + shippingMethod + "</style></indent>", "", "", "", "<indent=2%>-Order Details: " + orderDetails + "</indent>", "", "", "", "<style=cStack>Delivery being brought to you by the brand new </style><style=cIsUtility>Orbital Drop-Crate System (TM)</style>. <style=cStack><u>No refunds.</u></style>" }; return string.Join("\n", value); } } public static class MiscUtil { public class FilingDictionary<T> : IEnumerable<T>, IEnumerable { private readonly Dictionary<Type, T> _dict = new Dictionary<Type, T>(); public int Count => _dict.Count; public void Add(T inst) { _dict.Add(inst.GetType(), inst); } public void Add<subT>(subT inst) where subT : T { _dict.Add(typeof(subT), (T)(object)inst); } public void Set<subT>(subT inst) where subT : T { _dict[typeof(subT)] = (T)(object)inst; } public subT Get<subT>() where subT : T { return (subT)(object)_dict[typeof(subT)]; } public void Remove(T inst) { _dict.Remove(inst.GetType()); } public void RemoveWhere(Func<T, bool> predicate) { foreach (T item in _dict.Values.Where(predicate).ToList()) { _dict.Remove(item.GetType()); } } public IEnumerator<T> GetEnumerator() { return _dict.Values.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } public ReadOnlyFilingDictionary<T> AsReadOnly() { return new ReadOnlyFilingDictionary<T>(this); } } public class ReadOnlyFilingDictionary<T> : IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable { private readonly FilingDictionary<T> baseCollection; public int Count => baseCollection.Count; public ReadOnlyFilingDictionary(FilingDictionary<T> baseCollection) { this.baseCollection = baseCollection; base..ctor(); } public IEnumerator<T> GetEnumerator() { return baseCollection.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return baseCollection.GetEnumerator(); } } public static List<CharacterMaster> AliveList(bool playersOnly = false) { if (playersOnly) { return (from x in PlayerCharacterMasterController.instances where x.isConnected && Object.op_Implicit((Object)(object)x.master) && x.master.hasBody && x.master.GetBody().healthComponent.alive select x.master).ToList(); } return CharacterMaster.readOnlyInstancesList.Where((CharacterMaster x) => x.hasBody && x.GetBody().healthComponent.alive).ToList(); } public static void SpawnItemFromBody(CharacterBody src, int tier, Xoroshiro128Plus rng) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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) List<PickupIndex> list = tier switch { 0 => Run.instance.availableTier1DropList, 1 => Run.instance.availableTier2DropList, 2 => Run.instance.availableTier3DropList, 3 => Run.instance.availableLunarItemDropList, 4 => Run.instance.availableEquipmentDropList, 5 => Run.instance.availableLunarEquipmentDropList, _ => throw new ArgumentOutOfRangeException("tier", tier, "spawnItemFromBody: Item tier must be between 0 and 5 inclusive"), }; PickupDropletController.CreatePickupDroplet(list[rng.RangeInt(0, list.Count)], src.transform.position, new Vector3(Random.Range(-5f, 5f), 20f, Random.Range(-5f, 5f))); } } public class ModCompat { internal static bool compatBetterUI; public static void Init() { Chainloader.PluginInfos.ContainsKey("com.xoxfaby.BetterUI"); } public static void BetterUICompatInit() { compatBetterUI = true; } } public static class SkillUtil { public static void GlobalUpdateSkillDef(SkillDef targetDef) { MiscUtil.AliveList().ForEach(delegate(CharacterMaster cb) { if (cb.hasBody) { SkillLocator skillLocator = cb.GetBody().skillLocator; if (!((Object)(object)skillLocator == (Object)null)) { for (int i = 0; i < skillLocator.skillSlotCount; i++) { GenericSkill skillAtIndex = skillLocator.GetSkillAtIndex(i); if ((Object)(object)skillAtIndex.skillDef == (Object)(object)targetDef) { skillAtIndex.RecalculateValues(); } } } } }); } public static SkillFamily FindSkillFamilyFromBody(string bodyName, int slotIndex) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_0009: Invalid comparison between Unknown and I4 //IL_0022: 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) BodyIndex val = BodyCatalog.FindBodyIndex(bodyName); if ((int)val == -1) { AncientScepterMain._logger.LogError((object)("FindSkillFamilyFromBody: Couldn't find body with name " + bodyName)); return null; } GenericSkill[] bodyPrefabSkillSlots = BodyCatalog.GetBodyPrefabSkillSlots(val); if (slotIndex < 0 || slotIndex > bodyPrefabSkillSlots.Length) { AncientScepterMain._logger.LogError((object)$"FindSkillFamilyFromBody: Skill slot index {slotIndex} is invalid for body with name {bodyName}"); return null; } return BodyCatalog.GetBodyPrefabSkillSlots(val)[slotIndex].skillFamily; } public static SkillFamily FindSkillFamilyFromBody(string bodyName, SkillSlot slot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_0009: Invalid comparison between Unknown and I4 //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_006a: 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) BodyIndex val = BodyCatalog.FindBodyIndex(bodyName); if ((int)val == -1) { AncientScepterMain._logger.LogError((object)("FindSkillFamilyFromBody: Couldn't find body with name " + bodyName)); return null; } SkillLocator componentInChildren = BodyCatalog.GetBodyPrefab(val).GetComponentInChildren<SkillLocator>(); if (!Object.op_Implicit((Object)(object)componentInChildren)) { AncientScepterMain._logger.LogError((object)("FindSkillFamilyFromBody: Body with name " + bodyName + " has no SkillLocator")); return null; } GenericSkill[] bodyPrefabSkillSlots = BodyCatalog.GetBodyPrefabSkillSlots(val); foreach (GenericSkill val2 in bodyPrefabSkillSlots) { if (componentInChildren.FindSkillSlot(val2) == slot) { return val2.skillFamily; } } AncientScepterMain._logger.LogError((object)$"FindSkillFamilyFromBody: Body with name {bodyName} has no skill in slot {slot}"); return null; } public static void ReplaceVariant(this SkillFamily targetFamily, SkillDef origDef, SkillDef newDef) { int num = Array.FindIndex(targetFamily.variants, (Variant x) => (Object)(object)x.skillDef == (Object)(object)origDef); if (num < 0) { AncientScepterMain._logger.LogError((object)$"SkillFamily.OverrideVariant: couldn't find target skilldef {origDef} in family {targetFamily}"); } else { targetFamily.variants[num].skillDef = newDef; } } public static void ReplaceVariant(string targetBodyName, int targetSlot, SkillDef origDef, SkillDef newDef) { SkillFamily val = FindSkillFamilyFromBody(targetBodyName, targetSlot); if ((Object)(object)val != (Object)null) { val.ReplaceVariant(origDef, newDef); } else { AncientScepterMain._logger.LogError((object)"Failed to OverrideVariant for bodyname+slot (target not found)"); } } public static void ReplaceVariant(string targetBodyName, SkillSlot targetSlot, SkillDef origDef, SkillDef newDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) SkillFamily val = FindSkillFamilyFromBody(targetBodyName, targetSlot); if ((Object)(object)val != (Object)null) { val.ReplaceVariant(origDef, newDef); } else { AncientScepterMain._logger.LogError((object)"Failed to OverrideVariant for bodyname+slotname (target not found)"); } } [Obsolete] public static void AddVariant(this SkillFamily targetFamily, SkillDef newDef, string unlockableName = "") { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) Array.Resize(ref targetFamily.variants, targetFamily.variants.Length + 1); Variant[] variants = targetFamily.variants; int num = targetFamily.variants.Length - 1; Variant val = new Variant { skillDef = newDef }; ((Variant)(ref val)).viewableNode = new Node(newDef.skillNameToken, false, (Node)null); val.unlockableName = unlockableName; variants[num] = val; } public static void AddVariant(this SkillFamily targetFamily, SkillDef newDef, UnlockableDef unlockableDef = null) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) Array.Resize(ref targetFamily.variants, targetFamily.variants.Length + 1); Variant[] variants = targetFamily.variants; int num = targetFamily.variants.Length - 1; Variant val = new Variant { skillDef = newDef }; ((Variant)(ref val)).viewableNode = new Node(newDef.skillNameToken, false, (Node)null); val.unlockableDef = unlockableDef; variants[num] = val; } public static void AddVariant(string targetBodyName, int targetSlot, SkillDef newDef, string unlockableName = "") { SkillFamily val = FindSkillFamilyFromBody(targetBodyName, targetSlot); if ((Object)(object)val != (Object)null) { val.AddVariant(newDef, unlockableName); } else { AncientScepterMain._logger.LogError((object)"Failed to AddVariant for bodyname+slot (target not found)"); } } public static void AddVariant(string targetBodyName, SkillSlot targetSlot, SkillDef newDef, string unlockableName = "") { //IL_0001: Unknown result type (might be due to invalid IL or missing references) SkillFamily val = FindSkillFamilyFromBody(targetBodyName, targetSlot); if ((Object)(object)val != (Object)null) { val.AddVariant(newDef, unlockableName); } else { AncientScepterMain._logger.LogError((object)"Failed to AddVariant for bodyname+slotname (target not found)"); } } public static void RemoveVariant(this SkillFamily targetFamily, SkillDef targetDef) { List<Variant> list = new List<Variant>(targetFamily.variants); int count = list.Count; list.RemoveAll((Variant x) => (Object)(object)x.skillDef == (Object)(object)targetDef); if (list.Count - count == 0) { AncientScepterMain._logger.LogError((object)$"SkillFamily.RemoveVariant: Couldn't find SkillDef {targetDef} for removal from SkillFamily {targetFamily}"); } targetFamily.variants = list.ToArray(); } public static void RemoveVariant(string targetBodyName, int targetSlot, SkillDef targetDef) { SkillFamily val = FindSkillFamilyFromBody(targetBodyName, targetSlot); if ((Object)(object)val != (Object)null) { val.RemoveVariant(targetDef); } else { AncientScepterMain._logger.LogError((object)"Failed to RemoveVariant for bodyname+slot (target not found)"); } } public static void RemoveVariant(string targetBodyName, SkillSlot targetSlot, SkillDef targetDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) SkillFamily val = FindSkillFamilyFromBody(targetBodyName, targetSlot); if ((Object)(object)val != (Object)null) { val.RemoveVariant(targetDef); } else { AncientScepterMain._logger.LogError((object)"Failed to RemoveVariant for bodyname+slotname (target not found)"); } } public static SkillDef CloneSkillDef(SkillDef oldDef) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0054: Unknown result type (might be due to invalid IL or missing references) SkillDef obj = ScriptableObject.CreateInstance<SkillDef>(); obj.skillName = oldDef.skillName; obj.skillNameToken = oldDef.skillNameToken; obj.skillDescriptionToken = oldDef.skillDescriptionToken; obj.icon = oldDef.icon; obj.activationStateMachineName = oldDef.activationStateMachineName; obj.activationState = oldDef.activationState; obj.interruptPriority = oldDef.interruptPriority; obj.baseRechargeInterval = oldDef.baseRechargeInterval; obj.baseMaxStock = oldDef.baseMaxStock; obj.rechargeStock = oldDef.rechargeStock; obj.requiredStock = oldDef.requiredStock; obj.stockToConsume = oldDef.stockToConsume; obj.beginSkillCooldownOnSkillEnd = oldDef.beginSkillCooldownOnSkillEnd; obj.fullRestockOnAssign = oldDef.fullRestockOnAssign; obj.dontAllowPastMaxStocks = oldDef.dontAllowPastMaxStocks; obj.resetCooldownTimerOnUse = oldDef.resetCooldownTimerOnUse; obj.isCombatSkill = oldDef.isCombatSkill; obj.cancelSprintingOnActivation = oldDef.cancelSprintingOnActivation; obj.canceledFromSprinting = oldDef.canceledFromSprinting; obj.forceSprintDuringState = oldDef.forceSprintDuringState; obj.mustKeyPress = oldDef.mustKeyPress; obj.keywordTokens = oldDef.keywordTokens; return obj; } public static RailgunSkillDef CloneSkillDef(RailgunSkillDef oldDef) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0054: Unknown result type (might be due to invalid IL or missing references) RailgunSkillDef obj = ScriptableObject.CreateInstance<RailgunSkillDef>(); ((SkillDef)obj).skillName = ((SkillDef)oldDef).skillName; ((SkillDef)obj).skillNameToken = ((SkillDef)oldDef).skillNameToken; ((SkillDef)obj).skillDescriptionToken = ((SkillDef)oldDef).skillDescriptionToken; ((SkillDef)obj).icon = ((SkillDef)oldDef).icon; ((SkillDef)obj).activationStateMachineName = ((SkillDef)oldDef).activationStateMachineName; ((SkillDef)obj).activationState = ((SkillDef)oldDef).activationState; ((SkillDef)obj).interruptPriority = ((SkillDef)oldDef).interruptPriority; ((SkillDef)obj).baseRechargeInterval = ((SkillDef)oldDef).baseRechargeInterval; ((SkillDef)obj).baseMaxStock = ((SkillDef)oldDef).baseMaxStock; ((SkillDef)obj).rechargeStock = ((SkillDef)oldDef).rechargeStock; ((SkillDef)obj).requiredStock = ((SkillDef)oldDef).requiredStock; ((SkillDef)obj).stockToConsume = ((SkillDef)oldDef).stockToConsume; ((SkillDef)obj).beginSkillCooldownOnSkillEnd = ((SkillDef)oldDef).beginSkillCooldownOnSkillEnd; ((SkillDef)obj).fullRestockOnAssign = ((SkillDef)oldDef).fullRestockOnAssign; ((SkillDef)obj).dontAllowPastMaxStocks = ((SkillDef)oldDef).dontAllowPastMaxStocks; ((SkillDef)obj).resetCooldownTimerOnUse = ((SkillDef)oldDef).resetCooldownTimerOnUse; ((SkillDef)obj).isCombatSkill = ((SkillDef)oldDef).isCombatSkill; ((SkillDef)obj).cancelSprintingOnActivation = ((SkillDef)oldDef).cancelSprintingOnActivation; ((SkillDef)obj).canceledFromSprinting = ((SkillDef)oldDef).canceledFromSprinting; ((SkillDef)obj).forceSprintDuringState = ((SkillDef)oldDef).forceSprintDuringState; ((SkillDef)obj).mustKeyPress = ((SkillDef)oldDef).mustKeyPress; ((SkillDef)obj).keywordTokens = ((SkillDef)oldDef).keywordTokens; obj.restockOnReload = oldDef.restockOnReload; obj.offlineIcon = oldDef.offlineIcon; return obj; } public static VoidSurvivorSkillDef CloneSkillDef(VoidSurvivorSkillDef oldDef) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0054: Unknown result type (might be due to invalid IL or missing references) VoidSurvivorSkillDef obj = ScriptableObject.CreateInstance<VoidSurvivorSkillDef>(); ((SkillDef)obj).skillName = ((SkillDef)oldDef).skillName; ((SkillDef)obj).skillNameToken = ((SkillDef)oldDef).skillNameToken; ((SkillDef)obj).skillDescriptionToken = ((SkillDef)oldDef).skillDescriptionToken; ((SkillDef)obj).icon = ((SkillDef)oldDef).icon; ((SkillDef)obj).activationStateMachineName = ((SkillDef)oldDef).activationStateMachineName; ((SkillDef)obj).activationState = ((SkillDef)oldDef).activationState; ((SkillDef)obj).interruptPriority = ((SkillDef)oldDef).interruptPriority; ((SkillDef)obj).baseRechargeInterval = ((SkillDef)oldDef).baseRechargeInterval; ((SkillDef)obj).baseMaxStock = ((SkillDef)oldDef).baseMaxStock; ((SkillDef)obj).rechargeStock = ((SkillDef)oldDef).rechargeStock; ((SkillDef)obj).requiredStock = ((SkillDef)oldDef).requiredStock; ((SkillDef)obj).stockToConsume = ((SkillDef)oldDef).stockToConsume; ((SkillDef)obj).beginSkillCooldownOnSkillEnd = ((SkillDef)oldDef).beginSkillCooldownOnSkillEnd; ((SkillDef)obj).fullRestockOnAssign = ((SkillDef)oldDef).fullRestockOnAssign; ((SkillDef)obj).dontAllowPastMaxStocks = ((SkillDef)oldDef).dontAllowPastMaxStocks; ((SkillDef)obj).resetCooldownTimerOnUse = ((SkillDef)oldDef).resetCooldownTimerOnUse; ((SkillDef)obj).isCombatSkill = ((SkillDef)oldDef).isCombatSkill; ((SkillDef)obj).cancelSprintingOnActivation = ((SkillDef)oldDef).cancelSprintingOnActivation; ((SkillDef)obj).canceledFromSprinting = ((SkillDef)oldDef).canceledFromSprinting; ((SkillDef)obj).forceSprintDuringState = ((SkillDef)oldDef).forceSprintDuringState; ((SkillDef)obj).mustKeyPress = ((SkillDef)oldDef).mustKeyPress; ((SkillDef)obj).keywordTokens = ((SkillDef)oldDef).keywordTokens; obj.minimumCorruption = oldDef.minimumCorruption; obj.maximumCorruption = oldDef.maximumCorruption; return obj; } } } namespace AncientScepter.ScepterSkills { public class ArtificerFlamethrower2 : ScepterSkill { public const float FireCloudLifetime = 10f; public GameObject fireCloud { get; private set; } public override SkillDef scepterSkillDef { get; protected set; } public override string newDescToken { get; protected set; } public override string oldDescToken { get; protected set; } public override string scepterSkillDesc => StringExtensions.ToScepterDesc("火焰喷射距离增加" + StringExtensions.ToUtil<string>(StringExtensions.ToBaseAndStkPct<int>(1, "(每层+_)")) + ",击中时留下持续" + StringExtensions.ToUtil<float>(10f) + "秒的" + StringExtensions.ToFire("灼热火云") + ",每秒合计造成100%的伤害。"); public override string targetBody => "MageBody"; public override SkillSlot targetSlot => (SkillSlot)3; public override int targetVariantIndex => 0; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal void doBetterUI() { } internal override void LoadBehavior() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown Flamethrower.OnEnter += new hook_OnEnter(Flamethrower_OnEnter); Flamethrower.FireGauntlet += new Manipulator(IL_FlamethrowerFireGauntlet); } internal override void SetupAttributes() { //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: 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_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) SkillDef val = LegacyResourcesAPI.Load<SkillDef>("SkillDefs/MageBody/MageBodyFlamethrower"); scepterSkillDef = SkillUtil.CloneSkillDef(val); string text = "ANCIENTSCEPTER_MAGE_FLAMETHROWERNAME"; newDescToken = "ANCIENTSCEPTER_MAGE_FLAMETHROWERDESC"; oldDescToken = val.skillDescriptionToken; string text2 = "龙息"; LanguageAPI.Add(text, text2); scepterSkillDef.skillName = val.skillName + "Scepter"; ((Object)scepterSkillDef).name = scepterSkillDef.skillName; scepterSkillDef.skillNameToken = text; scepterSkillDef.skillDescriptionToken = newDescToken; scepterSkillDef.fullRestockOnAssign = false; scepterSkillDef.icon = Assets.SpriteAssets.ArtificerFlameThrower2; ContentAddition.AddSkillDef(scepterSkillDef); fireCloud = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/BeetleQueenAcid"), "AncientScepterMageFlamethrowerCloud"); ProjectileDotZone component = fireCloud.GetComponent<ProjectileDotZone>(); component.lifetime = 10f; component.impactEffect = null; component.fireFrequency = 2f; Transform val2 = fireCloud.transform.Find("FX"); Object.Destroy((Object)(object)((Component)val2.Find("Spittle")).gameObject); Object.Destroy((Object)(object)((Component)val2.Find("Decal")).gameObject); Object.Destroy((Object)(object)((Component)val2.Find("Gas")).gameObject); GameObjectExtensions.RemoveComponents<AnimateShaderAlpha>(((Component)val2).gameObject); GameObject obj = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/FireTrail").GetComponent<DamageTrail>().segmentPrefab, val2); MainModule main = obj.GetComponent<ParticleSystem>().main; ((MainModule)(ref main)).duration = 10f; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(-0.05f); MinMaxCurve startSizeX = ((MainModule)(ref main)).startSizeX; ((MinMaxCurve)(ref startSizeX)).constantMin = ((MinMaxCurve)(ref startSizeX)).constantMin * 0.75f; ((MinMaxCurve)(ref startSizeX)).constantMax = ((MinMaxCurve)(ref startSizeX)).constantMax * 0.75f; MinMaxCurve startSizeY =
plugins/BTP.RoR2Plugin.Tweaks.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Buffers; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Threading.Tasks; using BTP.RoR2Plugin.Buffs; using BTP.RoR2Plugin.Difficulities; using BTP.RoR2Plugin.Items; using BTP.RoR2Plugin.Language; using BTP.RoR2Plugin.Messages; using BTP.RoR2Plugin.Pools; using BTP.RoR2Plugin.Pools.OrbPools; using BTP.RoR2Plugin.Pools.ProjectilePools; using BTP.RoR2Plugin.RoR2Indexes; using BTP.RoR2Plugin.Skills; using BTP.RoR2Plugin.Tweaks; using BTP.RoR2Plugin.Tweaks.ItemTweaks; using BTP.RoR2Plugin.Tweaks.MithrixTweaks.MithrixEntityStates; using BTP.RoR2Plugin.Utils; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Bandit2.Weapon; using EntityStates.BeetleQueenMonster; using EntityStates.BrotherMonster; using EntityStates.BrotherMonster.Weapon; using EntityStates.Captain.Weapon; using EntityStates.CaptainSupplyDrop; using EntityStates.Commando.CommandoWeapon; using EntityStates.Croco; using EntityStates.Duplicator; using EntityStates.Engi.EngiBubbleShield; using EntityStates.Engi.EngiWeapon; using EntityStates.GlobalSkills.LunarDetonator; using EntityStates.GlobalSkills.LunarNeedle; using EntityStates.GoldGat; using EntityStates.Heretic.Weapon; using EntityStates.Huntress; using EntityStates.Huntress.HuntressWeapon; using EntityStates.ImpBossMonster; using EntityStates.LaserTurbine; using EntityStates.Loader; using EntityStates.LunarGolem; using EntityStates.Mage; using EntityStates.Mage.Weapon; using EntityStates.Merc; using EntityStates.Merc.Weapon; using EntityStates.Missions.BrotherEncounter; using EntityStates.Missions.LunarScavengerEncounter; using EntityStates.NullifierMonster; using EntityStates.Railgunner.Reload; using EntityStates.Railgunner.Scope; using EntityStates.Scrapper; using EntityStates.TeleporterHealNovaController; using EntityStates.TitanMonster; using EntityStates.Toolbot; using EntityStates.Treebot.TreebotFlower; using EntityStates.Treebot.Weapon; using EntityStates.VagrantNovaItem; using EntityStates.VoidRaidCrab; using FRCSharp; using GoldenCoastPlusRevived; using GrooveSaladSpikestripContent; using GrooveSaladSpikestripContent.Content; using GuestUnion; using GuestUnion.ObjectPool.Generic; using HG; using HG.GeneralSerializer; using IL.EntityStates.Duplicator; using IL.EntityStates.LaserTurbine; using IL.EntityStates.Loader; using IL.EntityStates.Merc; using IL.EntityStates.Railgunner.Reload; using IL.EntityStates.Railgunner.Weapon; using IL.EntityStates.TitanMonster; using IL.EntityStates.VagrantNovaItem; using IL.RoR2; using IL.RoR2.Orbs; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour.HookGen; using Newtonsoft.Json.Utilities; using On.EntityStates; using On.EntityStates.Bandit2.Weapon; using On.EntityStates.BeetleQueenMonster; using On.EntityStates.BrotherMonster; using On.EntityStates.BrotherMonster.Weapon; using On.EntityStates.Captain.Weapon; using On.EntityStates.CaptainSupplyDrop; using On.EntityStates.Croco; using On.EntityStates.Engi.EngiBubbleShield; using On.EntityStates.Engi.EngiWeapon; using On.EntityStates.GlobalSkills.LunarDetonator; using On.EntityStates.GlobalSkills.LunarNeedle; using On.EntityStates.GoldGat; using On.EntityStates.Heretic.Weapon; using On.EntityStates.Huntress.HuntressWeapon; using On.EntityStates.ImpBossMonster; using On.EntityStates.LaserTurbine; using On.EntityStates.Loader; using On.EntityStates.Mage; using On.EntityStates.Merc; using On.EntityStates.Merc.Weapon; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.Missions.LunarScavengerEncounter; using On.EntityStates.Railgunner.Reload; using On.EntityStates.Railgunner.Scope; using On.EntityStates.TeleporterHealNovaController; using On.EntityStates.Toolbot; using On.EntityStates.VagrantNovaItem; using On.EntityStates.VoidRaidCrab; using On.PlasmaCoreSpikestripContent.Content.Skills; using On.RoR2; using On.RoR2.Achievements.Captain; using On.RoR2.Artifacts; using On.RoR2.Items; using PlasmaCoreSpikestripContent.Content.Skills; using PlasmaCoreSpikestripContent.Content.Skills.States; using ProperSave; using R2API; using R2API.AddressReferencedAssets; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RedGuyMod.Content.Components; using RedGuyMod.SkillStates.Ravager; using RiskOfOptions; using RiskOfOptions.Lib; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Artifacts; using RoR2.CharacterAI; using RoR2.EntityLogic; using RoR2.Items; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI.MainMenu; using TPDespair.ZetArtifacts; using TPDespair.ZetAspects; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering.PostProcessing; using vanillaVoid.Items; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BTP.RoR2Plugin.Tweaks")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+8acb6ebb816327c4ac6211d23a840966777e64ad")] [assembly: AssemblyProduct("BTP.RoR2Plugin.Tweaks")] [assembly: AssemblyTitle("BTP.RoR2Plugin.Tweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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 BTP.RoR2Plugin { public static class AssetReferences { public static readonly AddressReferencedPrefab affixWhiteDelayEffect = AddressReferencedPrefab.op_Implicit("RoR2/Base/EliteIce/AffixWhiteDelayEffect.prefab"); public static readonly AddressReferencedPrefab affixWhiteExplosion = AddressReferencedPrefab.op_Implicit("RoR2/Base/EliteIce/AffixWhiteExplosion.prefab"); public static readonly AddressReferencedPrefab bonusMoneyPack = AddressReferencedPrefab.op_Implicit("RoR2/Base/BonusGoldPackOnKill/BonusMoneyPack.prefab"); public static readonly AddressReferencedPrefab brotherBodyPrefab = AddressReferencedPrefab.op_Implicit("RoR2/Base/Brother/BrotherBody.prefab"); public static readonly AddressReferencedPrefab brotherUltLineProjectileStatic = AddressReferencedPrefab.op_Implicit("RoR2/Base/BrotherHaunt/BrotherUltLineProjectileStatic.prefab"); public static readonly AddressReferencedPrefab critspark = AddressReferencedPrefab.op_Implicit("RoR2/Base/Common/VFX/Critspark.prefab"); public static readonly AddressReferencedPrefab critsparkHeavy = AddressReferencedPrefab.op_Implicit("RoR2/Base/Common/VFX/CritsparkHeavy.prefab"); public static readonly AddressReferencedPrefab electricOrbProjectile = AddressReferencedPrefab.op_Implicit("RoR2/Base/ElectricWorm/ElectricOrbProjectile.prefab"); public static readonly AddressReferencedPrefab elementalRingVoidBlackHole = AddressReferencedPrefab.op_Implicit("RoR2/DLC1/ElementalRingVoid/ElementalRingVoidBlackHole.prefab"); public static readonly AddressReferencedPrefab fireMeatBallProjectile = AddressReferencedPrefab.op_Implicit("RoR2/Base/FireballsOnHit/FireMeatBall.prefab"); public static readonly AddressReferencedPrefab fireTornado = AddressReferencedPrefab.op_Implicit("RoR2/Base/ElementalRings/FireTornado.prefab"); public static readonly AddressReferencedPrefab fireworkLauncher = AddressReferencedPrefab.op_Implicit("RoR2/Base/Firework/FireworkLauncher.prefab"); public static readonly AddressReferencedPrefab fireworkPrefab = AddressReferencedPrefab.op_Implicit("RoR2/Base/Firework/FireworkProjectile.prefab"); public static readonly AddressReferencedPrefab fractureImpactEffect = AddressReferencedPrefab.op_Implicit("RoR2/DLC1/BleedOnHitVoid/FractureImpactEffect.prefab"); public static readonly AddressReferencedPrefab genericDelayBlast = AddressReferencedPrefab.op_Implicit("RoR2/Base/Common/GenericDelayBlast.prefab"); public static readonly AddressReferencedPrefab helperPrefab = AddressReferencedPrefab.op_Implicit("RoR2/Base/Common/DirectorSpawnProbeHelperPrefab.prefab"); public static readonly AddressReferencedPrefab iceRingExplosion = AddressReferencedPrefab.op_Implicit("RoR2/Base/ElementalRings/IceRingExplosion.prefab"); public static readonly AddressReferencedPrefab lightningStake = AddressReferencedPrefab.op_Implicit("RoR2/Base/EliteLightning/LightningStake.prefab"); public static readonly AddressReferencedPrefab lunarMissilePrefab = AddressReferencedPrefab.op_Implicit("RoR2/Base/EliteLunar/LunarMissileProjectile.prefab"); public static readonly AddressReferencedPrefab magmaOrbProjectile = AddressReferencedPrefab.op_Implicit("RoR2/Base/MagmaWorm/MagmaOrbProjectile.prefab"); public static readonly AddressReferencedPrefab molotovClusterProjectile = AddressReferencedPrefab.op_Implicit("RoR2/DLC1/Molotov/MolotovClusterProjectile.prefab"); public static readonly AddressReferencedPrefab molotovProjectileDotZone = AddressReferencedPrefab.op_Implicit("RoR2/DLC1/Molotov/MolotovProjectileDotZone.prefab"); public static readonly AddressReferencedPrefab molotovSingleProjectile = AddressReferencedPrefab.op_Implicit("RoR2/DLC1/Molotov/MolotovSingleProjectile.prefab"); public static readonly AddressReferencedPrefab moonExitArenaOrbEffect = AddressReferencedPrefab.op_Implicit("RoR2/Base/moon/MoonExitArenaOrbEffect.prefab"); public static readonly AddressReferencedPrefab omniExplosionVFXQuick = AddressReferencedPrefab.op_Implicit("RoR2/Base/Common/VFX/OmniExplosionVFXQuick.prefab"); public static readonly AddressReferencedPrefab omniRecycleEffect = AddressReferencedPrefab.op_Implicit("RoR2/Base/Recycle/OmniRecycleEffect.prefab"); public static readonly AddressReferencedPrefab shrineUseEffect = AddressReferencedPrefab.op_Implicit("RoR2/Base/Common/VFX/ShrineUseEffect.prefab"); public static readonly AddressReferencedPrefab stickyBombProjectile = AddressReferencedPrefab.op_Implicit("RoR2/Base/StickyBomb/StickyBomb.prefab"); public static readonly AddressReferencedPrefab teamWarCryActivation = AddressReferencedPrefab.op_Implicit("RoR2/Base/TeamWarCry/TeamWarCryActivation.prefab"); public static readonly AddressReferencedPrefab coinImpact = AddressReferencedPrefab.op_Implicit("RoR2/Base/Common/VFX/CoinImpact.prefab"); public static readonly AddressReferencedPrefab titanGoldPreFistProjectile = AddressReferencedPrefab.op_Implicit("RoR2/Base/Titan/TitanGoldPreFistProjectile.prefab"); public static readonly AddressReferencedPrefab randomEquipmentTriggerProcEffect = AddressReferencedPrefab.op_Implicit("RoR2/DLC1/RandomEquipmentTrigger/RandomEquipmentTriggerProcEffect.prefab"); public static readonly Material helscourgeMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarWisp/matLunarWispFlames.mat").WaitForCompletion(); public static readonly Material moonscourgeMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/moon2/matSkyboxMoon.mat").WaitForCompletion(); public static readonly Material stormscourgeMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Mage/matMageCalibrateLightning.mat").WaitForCompletion(); public static readonly GameObject stunAndPierceBoomerang = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/StunAndPierceBoomerang"); public static void Init() { } } public static class BetterEvents { public delegate void BetterHitEnemyEventHandler(DamageInfo damageInfo, CharacterBody attackerBody, CharacterBody victimBody); public delegate void BetterHitAllEventHandler(DamageInfo damageInfo, CharacterBody attackerBody); [CompilerGenerated] private static class <>O { public static Manipulator <0>__GlobalEventManager_OnHitEnemy; public static hook_OnHitAllProcess <1>__GlobalEventManager_OnHitAll; } public static event BetterHitEnemyEventHandler OnHitEnemy; public static event BetterHitAllEventHandler OnHitAll; static BetterEvents() { Init(); } private static void Init() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown object obj = <>O.<0>__GlobalEventManager_OnHitEnemy; if (obj == null) { Manipulator val = GlobalEventManager_OnHitEnemy; <>O.<0>__GlobalEventManager_OnHitEnemy = val; obj = (object)val; } GlobalEventManager.ProcessHitEnemy += (Manipulator)obj; object obj2 = <>O.<1>__GlobalEventManager_OnHitAll; if (obj2 == null) { hook_OnHitAllProcess val2 = GlobalEventManager_OnHitAll; <>O.<1>__GlobalEventManager_OnHitAll = val2; obj2 = (object)val2; } GlobalEventManager.OnHitAllProcess += (hook_OnHitAllProcess)obj2; } private static void GlobalEventManager_OnHitAll(orig_OnHitAllProcess orig, GlobalEventManager self, DamageInfo damageInfo, GameObject hitObject) { CharacterBody val = default(CharacterBody); if (damageInfo.procCoefficient != 0f && !damageInfo.rejected && !((Object)(object)damageInfo.attacker == (Object)null) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && val.master != null) { BetterEvents.OnHitAll?.Invoke(damageInfo, val); } } private static void GlobalEventManager_OnHitEnemy(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //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) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 7), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMaster>(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 8) })) { val.Emit(OpCodes.Ldarg_1).Emit(OpCodes.Ldloc_0).Emit(OpCodes.Ldloc_1) .EmitDelegate<Action<DamageInfo, CharacterBody, CharacterBody>>((Action<DamageInfo, CharacterBody, CharacterBody>)delegate(DamageInfo damageInfo, CharacterBody attackerBody, CharacterBody victimBody) { BetterEvents.OnHitEnemy?.Invoke(damageInfo, attackerBody, victimBody); }); } else { "OnHitEnemy Hook Failed!".LogError(); } } } internal class FRCSharpFix { [CompilerGenerated] private static class <>O { public static hook_Init <0>__ItemDisplayRuleSet_Init; } [ModLoadMessageHandler] public static void Fix() { //IL_004a: 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_0055: Expected O, but got Unknown HookEndpointManager.Modify<Action<ILContext>>((MethodBase)typeof(VF2ContentPackProvider).GetMethod("Init", BindingFlags.Static | BindingFlags.NonPublic), (Delegate)(Action<ILContext>)delegate(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) new ILCursor(il) { Index = 483 }.RemoveRange(4); }); object obj = <>O.<0>__ItemDisplayRuleSet_Init; if (obj == null) { hook_Init val = ItemDisplayRuleSet_Init; <>O.<0>__ItemDisplayRuleSet_Init = val; obj = (object)val; } ItemDisplayRuleSet.Init += (hook_Init)obj; } private static IEnumerator ItemDisplayRuleSet_Init(orig_Init orig) { try { FRItemIDRS.ItemDisplayRuleSet_Init((orig_Init)null); } catch (Exception) { } return orig.Invoke(); } } internal interface IFixedTickable { void FixedTick(); } internal static class FixedTickableExtensions { public static void RegisterFixedTick(this IFixedTickable fixedTickable) { Plugin.fixedTickableSet.Add(fixedTickable); } public static void UnregisterFixedTick(this IFixedTickable fixedTickable) { Plugin.fixedTickableSet.Remove(fixedTickable); } } internal interface IModLoadMessageHandler { void Handle(); } internal interface IModUnloadMessageHandler { void Handle(); } internal interface IRoR2LoadedMessageHandler { void Handle(); } public static class LogExtensions { internal static ManualLogSource logger; public static void LogInfo<T>(this T data) { logger.LogInfo((object)data); } public static void LogWarning<T>(this T data) { logger.LogWarning((object)data); } public static void LogError<T>(this T data) { logger.LogError((object)data); } public static void LogMessage<T>(this T data) { logger.LogMessage((object)data); } public static void LogFormat<T>(this T format, LogLevel level = 0, params object[] args) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) logger.Log(level, (object)string.Format(format.ToString(), args)); } } internal abstract class ModComponent { } [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] internal class ModLoadMessageHandlerAttribute : Attribute { } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.BTP.Tweak", "BTP.Tweak", "3.0.1")] public class Plugin : BaseUnityPlugin { public const string PluginAuthor = "BTP"; public const string PluginGUID = "com.BTP.Tweak"; public const string PluginName = "BTP.Tweak"; public const string PluginVersion = "3.0.1"; internal static HashSet<IFixedTickable> fixedTickableSet = new HashSet<IFixedTickable>(); private readonly List<IModLoadMessageHandler> modLoadMessageHandlers = new List<IModLoadMessageHandler>(); private readonly List<IModUnloadMessageHandler> modUnloadMessageHandlers = new List<IModUnloadMessageHandler>(); private readonly List<IRoR2LoadedMessageHandler> ror2LoadedMessageHandlers = new List<IRoR2LoadedMessageHandler>(); private void Awake() { LogExtensions.logger = ((BaseUnityPlugin)this).Logger; Settings.Initialize(((BaseUnityPlugin)this).Config); MainMenuController.OnMainMenuInitialised += OnMainMenuFirstInitialised; AssetReferences.Init(); Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { if (!type.IsAbstract && !type.IsDefined(typeof(ObsoleteAttribute)) && type.IsSubclassOf(typeof(ModComponent))) { object? obj = Activator.CreateInstance(type); if (obj is IModLoadMessageHandler item) { modLoadMessageHandlers.Add(item); } if (obj is IModUnloadMessageHandler item2) { modUnloadMessageHandlers.Add(item2); } if (obj is IRoR2LoadedMessageHandler item3) { ror2LoadedMessageHandlers.Add(item3); } } Span<MethodInfo> span = type.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).AsSpan(); for (int j = 0; j < span.Length; j++) { MethodInfo methodInfo = span[j]; if (methodInfo.IsDefined(typeof(ModLoadMessageHandlerAttribute), inherit: true)) { try { methodInfo.Invoke(null, null); ((BaseUnityPlugin)this).Logger.LogMessage((object)(type.FullName + "." + methodInfo.Name + " has been called.")); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)ex); } } } } } private void OnEnable() { foreach (IModLoadMessageHandler modLoadMessageHandler2 in modLoadMessageHandlers) { try { IModLoadMessageHandler modLoadMessageHandler = modLoadMessageHandler2; modLoadMessageHandler.Handle(); ((BaseUnityPlugin)this).Logger.LogMessage((object)(modLoadMessageHandler.GetType().FullName + " :: Handle has been called.")); } catch (Exception ex) { Debug.LogException(ex, (Object)(object)this); } } } private void OnMainMenuFirstInitialised() { MainMenuController.OnMainMenuInitialised -= OnMainMenuFirstInitialised; foreach (IRoR2LoadedMessageHandler ror2LoadedMessageHandler in ror2LoadedMessageHandlers) { try { IRoR2LoadedMessageHandler roR2LoadedMessageHandler = ror2LoadedMessageHandler; roR2LoadedMessageHandler.Handle(); ((BaseUnityPlugin)this).Logger.LogMessage((object)(roR2LoadedMessageHandler.GetType().FullName + " :: Handle has been called.")); } catch (Exception ex) { Debug.LogException(ex, (Object)(object)this); } } } private void FixedUpdate() { IFixedTickable[] array = ArrayPool<IFixedTickable>.Shared.Rent(fixedTickableSet.Count); fixedTickableSet.CopyTo(array); Span<IFixedTickable> span = array.AsSpan(); for (int i = 0; i < span.Length; i++) { ref IFixedTickable reference = ref span[i]; if (reference == null) { break; } reference.FixedTick(); reference = null; } ArrayPool<IFixedTickable>.Shared.Return(array); } private void OnDisable() { foreach (IModUnloadMessageHandler modUnloadMessageHandler2 in modUnloadMessageHandlers) { try { IModUnloadMessageHandler modUnloadMessageHandler = modUnloadMessageHandler2; modUnloadMessageHandler.Handle(); ((BaseUnityPlugin)this).Logger.LogMessage((object)(modUnloadMessageHandler.GetType().FullName + " :: Handle has been called.")); } catch (Exception ex) { Debug.LogException(ex, (Object)(object)this); } } } } public interface ISaveData { void SaveData(); void LoadData(); } public static class ProperSaveSupport { private static readonly List<Type> _saveDataTypes = new List<Type>(); public static void AddSaveDataType(Type type) { if (_saveDataTypes.Contains(type)) { ("此类型('" + type.FullName + "')已添加!请勿重复添加!").LogError(); } else if (!TypeExtensions.ImplementInterface(type, typeof(ISaveData))) { ("此类型('" + type.FullName + "')不实现接口('" + typeof(ISaveData).FullName + "')!请实现此接口!").LogError(); } else { _saveDataTypes.Add(type); ("存档类型('" + type.FullName + "')已添加。").LogMessage(); } } public static void AddSaveDataType<T>() where T : ISaveData { Type typeFromHandle = typeof(T); if (_saveDataTypes.Contains(typeFromHandle)) { ("此类型('" + typeFromHandle.FullName + "')已添加!请勿重复添加!").LogError(); return; } _saveDataTypes.Add(typeFromHandle); ("存档类型('" + typeFromHandle.FullName + "')已添加。").LogMessage(); } [ModLoadMessageHandler] internal static void Init() { SaveFile.OnGatherSaveData += SaveFile_OnGatherSaveData; Loading.OnLoadingEnded += Loading_OnLoadingEnded; } private static void SaveFile_OnGatherSaveData(Dictionary<string, object> obj) { foreach (Type saveDataType in _saveDataTypes) { ISaveData saveData = (ISaveData)Activator.CreateInstance(saveDataType); saveData.SaveData(); obj.Add(saveDataType.FullName, saveData); ("存档类型('" + saveDataType.FullName + "')已存入。").LogMessage(); } } private static void Loading_OnLoadingEnded(SaveFile obj) { foreach (Type saveDataType in _saveDataTypes) { obj.GetModdedData<ISaveData>(saveDataType.FullName)?.LoadData(); ("存档类型('" + saveDataType.FullName + "')已载入。").LogMessage(); } } } public static class RunInfo { private struct SaveData : ISaveData { [DataMember(Name = "m")] public bool 位于月球; [DataMember(Name = "a")] public bool 位于隔间; [DataMember(Name = "v")] public bool 位于天文馆; [DataMember(Name = "t")] public bool 位于时之墓; [DataMember(Name = "b")] public bool 位于月球商店; [DataMember(Name = "c")] public bool 是否选择造物难度; [DataMember(Name = "d")] public bool 造物主的试炼; readonly void ISaveData.LoadData() { RunInfo.位于月球 = 位于月球; RunInfo.位于隔间 = 位于隔间; RunInfo.位于天文馆 = 位于天文馆; RunInfo.位于时之墓 = 位于时之墓; RunInfo.位于月球商店 = 位于月球商店; 已选择大旋风难度 = 是否选择造物难度; 第二次大旋风 = 造物主的试炼; } void ISaveData.SaveData() { 位于月球 = RunInfo.位于月球; 位于隔间 = RunInfo.位于隔间; 位于天文馆 = RunInfo.位于天文馆; 位于时之墓 = RunInfo.位于时之墓; 位于月球商店 = RunInfo.位于月球商店; 是否选择造物难度 = 已选择大旋风难度; 造物主的试炼 = 第二次大旋风; } } [CompilerGenerated] private static class <>O { public static Action<Run, RuleBook> <0>__OnRunSetRuleBookGlobal; public static Action<SceneDef> <1>__OnMostRecentSceneDefChanged; public static hook_OnEnter <2>__OnBrotherTrueDeath; } public static bool 位于月球 { get; private set; } public static bool 位于隔间 { get; private set; } public static bool 位于天文馆 { get; private set; } public static bool 位于时之墓 { get; private set; } public static bool 位于月球商店 { get; private set; } public static bool 已选择大旋风难度 { get; private set; } public static bool 第二次大旋风 { get; private set; } [ModLoadMessageHandler] internal static void Init() { //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_005b: Expected O, but got Unknown Run.onRunSetRuleBookGlobal += OnRunSetRuleBookGlobal; SceneCatalog.onMostRecentSceneDefChanged += OnMostRecentSceneDefChanged; object obj = <>O.<2>__OnBrotherTrueDeath; if (obj == null) { hook_OnEnter val = OnBrotherTrueDeath; <>O.<2>__OnBrotherTrueDeath = val; obj = (object)val; } TrueDeathState.OnEnter += (hook_OnEnter)obj; ProperSaveSupport.AddSaveDataType<SaveData>(); } private static void OnRunSetRuleBookGlobal(Run run, RuleBook ruleBook) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) 第二次大旋风 = false; 已选择大旋风难度 = run.selectedDifficulty == HarryRoadGreatWhirlwind.DifficultyIndex; } private static void OnBrotherTrueDeath(orig_OnEnter orig, TrueDeathState self) { orig.Invoke(self); if (已选择大旋风难度 && !第二次大旋风) { 第二次大旋风 = true; if (NetworkServer.active) { ChatMessage.Send("世界不再是你熟悉的那样!!!".ToDeath()); } } } private static void OnMostRecentSceneDefChanged(SceneDef mostRecentSceneDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0047: Unknown result type (might be due to invalid IL or missing references) SceneIndex sceneDefIndex = mostRecentSceneDef.sceneDefIndex; 位于月球 = sceneDefIndex == SceneIndexes.Moon || sceneDefIndex == SceneIndexes.Moon2; 位于隔间 = sceneDefIndex == SceneIndexes.Arena; 位于天文馆 = sceneDefIndex == SceneIndexes.VoidRaid; 位于时之墓 = sceneDefIndex == SceneIndexes.BulwarksHaunt_GhostWave; 位于月球商店 = sceneDefIndex == SceneIndexes.Bazaar; } } public static class Settings { public static ConfigFile Config { get; private set; } public static KeyBindOption ReloadKey { get; private set; } public static CheckBoxOption 关闭所有特效 { get; private set; } public static CheckBoxOption 开启特效生成日志 { get; private set; } public static CheckBoxOption 开启战斗日志 { get; private set; } public static ChoiceOption 开启特拉法梅 { get; private set; } public static CheckBoxOption 启用阶梯触发链 { get; private set; } public static SliderOption Boss物品掉率 { get; private set; } public static SliderOption 物品传送时间 { get; private set; } public static SliderOption 商店物品传送时间 { get; private set; } public static SliderOption 导弹发射间隔 { get; private set; } public static SliderOption 每关难度增加量 { get; private set; } public static SliderOption 喷泉喷射间隔 { get; private set; } public static SliderOption 牺牲基础掉率 { get; private set; } public static SliderOption BubbleShieldLifetime { get; internal set; } public static SliderOption BubbleShieldRaius { get; internal set; } public static StringInputFieldOption 特效_间隔 { get; private set; } public static CheckBoxOption AddCheckBoxOption(ConfigFile config, string section, string key, bool defaultValue, string description, Action<bool> onChanged = null) { //IL_0025: 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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0047: Expected O, but got Unknown //IL_0067: Expected O, but got Unknown ConfigEntry<bool> configEntry = config.Bind<bool>(section, key, defaultValue, description); CheckBoxOption val = new CheckBoxOption(configEntry); ModMetaData modMetaData = Assembly.GetCallingAssembly().GetModMetaData(); ModSettingsManager.AddOption((BaseOption)val, modMetaData.Guid, modMetaData.Name); if (onChanged != null) { configEntry.SettingChanged += delegate { onChanged(configEntry.Value); }; } return val; } public static ChoiceOption AddChoiceOption<T>(ConfigFile config, string section, string key, T defaultValue, string description, Action<T> onChanged = null) where T : Enum { //IL_0025: 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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0047: Expected O, but got Unknown //IL_0067: Expected O, but got Unknown ConfigEntry<T> configEntry = config.Bind<T>(section, key, defaultValue, description); ChoiceOption val = new ChoiceOption((ConfigEntryBase)(object)configEntry); ModMetaData modMetaData = Assembly.GetCallingAssembly().GetModMetaData(); ModSettingsManager.AddOption((BaseOption)val, modMetaData.Guid, modMetaData.Name); if (onChanged != null) { configEntry.SettingChanged += delegate { onChanged(configEntry.Value); }; } return val; } public static StepSliderOption AddStepSliderOption(ConfigFile config, string section, string key, float defaultValue, float min, float max, float step_size, string description, string formatString = "{0}", Action<float> onChanged = null) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_005a: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_008c: Expected O, but got Unknown ConfigEntry<float> configEntry = config.Bind<float>(section, key, defaultValue, description); StepSliderOption val = new StepSliderOption(configEntry, new StepSliderConfig { min = min, max = max, increment = step_size, FormatString = formatString }); ModMetaData modMetaData = Assembly.GetCallingAssembly().GetModMetaData(); ModSettingsManager.AddOption((BaseOption)val, modMetaData.Guid, modMetaData.Name); if (onChanged != null) { configEntry.SettingChanged += delegate { onChanged(configEntry.Value); }; } return val; } public static SliderOption AddSliderOption(ConfigFile config, string section, string key, float defaultValue, float min, float max, string description, string formatString = "{0}", Action<float> onChanged = null) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0042: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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: Expected O, but got Unknown //IL_0084: Expected O, but got Unknown ConfigEntry<float> configEntry = config.Bind<float>(section, key, defaultValue, description); SliderOption val = new SliderOption(configEntry, new SliderConfig { min = min, max = max, FormatString = formatString }); ModMetaData modMetaData = Assembly.GetCallingAssembly().GetModMetaData(); ModSettingsManager.AddOption((BaseOption)val, modMetaData.Guid, modMetaData.Name); if (onChanged != null) { configEntry.SettingChanged += delegate { onChanged(configEntry.Value); }; } return val; } public static KeyBindOption AddKeyBindOption(ConfigFile config, string section, string key, KeyboardShortcut defaultValue, string description, Action<KeyboardShortcut> onChanged = null) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0047: Expected O, but got Unknown //IL_0067: Expected O, but got Unknown ConfigEntry<KeyboardShortcut> configEntry = config.Bind<KeyboardShortcut>(section, key, defaultValue, description); KeyBindOption val = new KeyBindOption(configEntry); ModMetaData modMetaData = Assembly.GetCallingAssembly().GetModMetaData(); ModSettingsManager.AddOption((BaseOption)val, modMetaData.Guid, modMetaData.Name); if (onChanged != null) { configEntry.SettingChanged += delegate { //IL_000c: Unknown result type (might be due to invalid IL or missing references) onChanged(configEntry.Value); }; } return val; } public static StringInputFieldOption AddStringInputFieldOption(ConfigFile config, string section, string key, string defaultValue, string description, SubmitEnum submitOn = 6, Action<string> onChanged = null) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0032: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0074: Expected O, but got Unknown ConfigEntry<string> configEntry = config.Bind<string>(section, key, defaultValue, description); StringInputFieldOption val = new StringInputFieldOption(configEntry, new InputFieldConfig { submitOn = submitOn }); ModMetaData modMetaData = Assembly.GetCallingAssembly().GetModMetaData(); ModSettingsManager.AddOption((BaseOption)val, modMetaData.Guid, modMetaData.Name); if (onChanged != null) { configEntry.SettingChanged += delegate { onChanged(configEntry.Value); }; } return val; } public static ModMetaData GetModMetaData(this Assembly assembly) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) ModMetaData result = default(ModMetaData); Type[] exportedTypes = assembly.GetExportedTypes(); for (int i = 0; i < exportedTypes.Length; i++) { BepInPlugin customAttribute = ((MemberInfo)exportedTypes[i]).GetCustomAttribute<BepInPlugin>(); if (customAttribute != null) { result.Guid = customAttribute.GUID; result.Name = customAttribute.Name; } } return result; } internal static void Initialize(ConfigFile config) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) Config = config; ModSettingsManager.SetModIcon("RoR2/DLC1/VoidCoin/texVoidCoinIcon.png".Load<Sprite>(), "com.BTP.Tweak", "BTP.Tweak"); ModSettingsManager.SetModDescription("这里是关于BTP的整合包的内部的Mod设置", "com.BTP.Tweak", "BTP.Tweak"); Boss物品掉率 = AddSliderOption(config, "测试", "Boss物品掉率", 2f, 0f, 100f, "任意模式下,具有特殊奖励的敌人死亡时,掉落该物品的概率,不受运气影响。", "{0}%"); ReloadKey = AddKeyBindOption(config, "按键", "磁轨炮手上弹按键", new KeyboardShortcut((KeyCode)98, Array.Empty<KeyCode>()), "按此按键进入上弹模式。"); 物品传送时间 = AddSliderOption(config, "物品", "一般情况下,物品在经过此时间后会传送到最近的安全地带。(单位:秒)", 0f, 1f, 60f, ""); 商店物品传送时间 = AddSliderOption(config, "物品", "在月球商店中,物品在经过此时间后会传送到最近的安全地带。(单位:秒)", 0f, 0f, 90f, ""); 导弹发射间隔 = AddSliderOption(config, "物品", "导弹池发射间隔(单位:秒)(弃用)", 1f, 0f, 10f, "每隔~发射一发导弹,间隔内添加的相同触发链的导弹将会整合为一枚。"); 关闭所有特效 = AddCheckBoxOption(config, "特效-间隔", "开启时禁用所有特效", defaultValue: false, "用于后期防止卡顿。"); 开启特效生成日志 = AddCheckBoxOption(config, "日志", "是否开启特效生成日志", defaultValue: false, "用于获取特效的ID。"); 开启战斗日志 = AddCheckBoxOption(config, "日志", "是否开启战斗日志", defaultValue: false, "原版默认不开启,仅供测试用。", delegate(bool newValue) { CombatDirector.cvDirectorCombatEnableInternalLogs.value = newValue; }); 每关难度增加量 = AddSliderOption(config, "难度", "造物难度下,每完成一关增加的难度", 25f, 0f, 100000000f, "开始时难度为50%。难度计算公式:开始难度 + 当前关卡数 x ~", "{0}%", delegate { if (Object.op_Implicit((Object)(object)Run.instance)) { Run.instance.RecalculateDifficultyCoefficent(); } }); 喷泉喷射间隔 = AddSliderOption(config, "物品", "发射池喷射间隔(单位:秒)(弃用)", 1f, 0f, 10f, "每隔~喷射一次投射物,间隔内添加的相同触发链的投射物将会整合为一枚。"); 启用阶梯触发链 = AddCheckBoxOption(config, "测试", "启用阶梯触发链", defaultValue: false, "开启后,某些物品的触发方向将受到限制,未列出的物品不受影响。目前受影响的物品:完美巨兽 <= 黏弹 <= Atg-MK1导弹 = 等离子虾 = 尤克里里 = 聚合鲁特琴 = 冰火双环 <= 感应肉钩 <= 雷火双钻。('<'左边的不能触发右边的,'='左右的可以互相触发)"); 特效_间隔 = AddStringInputFieldOption(config, "特效-间隔", "通过特效ID指定某些特效的生成间隔", "", "默认已含有某些会导致游戏卡顿的特效。\neg:假如共生蝎的特效ID为1,我想让其有0.1秒的生成间隔,那么应该填入:1:0.1,如果间隔为负数则表示取消间隔。\n每个设置之间用“;”隔开,所有标点均用英文标点!", (SubmitEnum)6, EffectTweak.EffectSpawnLimit.AddAddLimitToEffects); 牺牲基础掉率 = AddSliderOption(config, "牺牲神器", "牺牲基础掉率", 5f, 0f, 100f, "基础掉率,非最终掉率。最终掉率与敌人种类和等级等属性相关。Boss基础掉率x150%,精英基础掉率x125%。\n在同一关卡中,每次击杀敌人后,如果未掉落物品,则临时增加掉率,掉落后重置;如果掉落物品,则临时降低掉率,过关后重置。", "{0}%"); } } } namespace BTP.RoR2Plugin.Utils { public static class Texture2DPaths { public const string texAttackSpeedIcon = "RoR2/Base/Achievements/texAttackSpeedIcon.png"; public const string texAutomationActivationIcon = "RoR2/Base/Achievements/texAutomationActivationIcon.png"; public const string texAutomationActivationIconNew = "RoR2/Base/Achievements/texAutomationActivationIcon_New.png"; public const string texBandit2ClearGameMonsoonIcon = "RoR2/Base/Achievements/texBandit2ClearGameMonsoonIcon.png"; public const string texBandit2ConsecutiveResetIcon = "RoR2/Base/Achievements/texBandit2ConsecutiveResetIcon.png"; public const string texBandit2RevolverFinaleIcon = "RoR2/Base/Achievements/texBandit2RevolverFinaleIcon.png"; public const string texBandit2StackSuperBleedIcon = "RoR2/Base/Achievements/texBandit2StackSuperBleedIcon.png"; public const string texBeatArenaIcon = "RoR2/Base/Achievements/texBeatArenaIcon.png"; public const string texBurnToDeathIcon = "RoR2/Base/Achievements/texBurnToDeathIcon.png"; public const string texCaptainBuyMegaDroneIcon = "RoR2/Base/Achievements/texCaptainBuyMegaDroneIcon.png"; public const string texCaptainClearGameMonsoonIcon = "RoR2/Base/Achievements/texCaptainClearGameMonsoonIcon.png"; public const string texCaptainSupplyDropFinaleIcon = "RoR2/Base/Achievements/texCaptainSupplyDropFinaleIcon.png"; public const string texCaptainVisitSeveralStagesIcon = "RoR2/Base/Achievements/texCaptainVisitSeveralStagesIcon.png"; public const string texCarryLunarItemsIcon = "RoR2/Base/Achievements/texCarryLunarItemsIcon.png"; public const string texChargeTeleporterWhileNearDeathIcon = "RoR2/Base/Achievements/texChargeTeleporterWhileNearDeathIcon.png"; public const string texCleanupDutyIcon = "RoR2/Base/Achievements/texCleanupDutyIcon.png"; public const string texCommandoClearGameMonsoonIcon = "RoR2/Base/Achievements/texCommandoClearGameMonsoonIcon.png"; public const string texCommandoFastFirstStageClearIcon = "RoR2/Base/Achievements/texCommandoFastFirstStageClearIcon.png"; public const string texCommandoKillOverloadingWormIcon = "RoR2/Base/Achievements/texCommandoKillOverloadingWormIcon.png"; public const string texCommandoNonLunarEnduranceIcon = "RoR2/Base/Achievements/texCommandoNonLunarEnduranceIcon.png"; public const string texComplete20StagesIcon = "RoR2/Base/Achievements/texComplete20StagesIcon.png"; public const string texComplete30StagesCareerIcon = "RoR2/Base/Achievements/texComplete30StagesCareerIcon.png"; public const string texCompleteMainEndingHardIcon = "RoR2/Base/Achievements/texCompleteMainEndingHardIcon.png"; public const string texCompleteMainEndingIcon = "RoR2/Base/Achievements/texCompleteMainEndingIcon.png"; public const string texCompleteMultiBossShrineIcon = "RoR2/Base/Achievements/texCompleteMultiBossShrineIcon.png"; public const string texCompletePrismaticTrialIcon = "RoR2/Base/Achievements/texCompletePrismaticTrialIcon.png"; public const string texCompleteTeleporterIcon = "RoR2/Base/Achievements/texCompleteTeleporterIcon.png"; public const string texCompleteTeleporterWithoutInjuryIcon = "RoR2/Base/Achievements/texCompleteTeleporterWithoutInjuryIcon.png"; public const string texCompleteThreeStagesIcon = "RoR2/Base/Achievements/texCompleteThreeStagesIcon.png"; public const string texCompleteThreeStagesIconOLD = "RoR2/Base/Achievements/texCompleteThreeStagesIconOLD.png"; public const string texCompleteThreeStagesWithoutHealingIcon = "RoR2/Base/Achievements/texCompleteThreeStagesWithoutHealingIcon.png"; public const string texCompleteUnknownEndingIcon = "RoR2/Base/Achievements/texCompleteUnknownEndingIcon.png"; public const string texCrocoClearGameMonsoonIcon = "RoR2/Base/Achievements/texCrocoClearGameMonsoonIcon.png"; public const string texCrocoKillScavengerIcon = "RoR2/Base/Achievements/texCrocoKillScavengerIcon.png"; public const string texCrocoKillWeakEnemiesMilestoneIcon = "RoR2/Base/Achievements/texCrocoKillWeakEnemiesMilestoneIcon.png"; public const string texCrocoTotalInfectionsMilestoneIcon = "RoR2/Base/Achievements/texCrocoTotalInfectionsMilestoneIcon.png"; public const string texDefeatSuperRoboBallBossIcon = "RoR2/Base/Achievements/texDefeatSuperRoboBallBossIcon.png"; public const string texDie20TimesIcon = "RoR2/Base/Achievements/texDie20TimesIcon.png"; public const string texDie5TimesIcon = "RoR2/Base/Achievements/texDie5TimesIcon.png"; public const string texDiscover10UniqueTier1Icon = "RoR2/Base/Achievements/texDiscover10UniqueTier1Icon.png"; public const string texDiscover5EquipmentIcon = "RoR2/Base/Achievements/texDiscover5EquipmentIcon.png"; public const string texEngiArmyIcon = "RoR2/Base/Achievements/texEngiArmyIcon.png"; public const string texEngiClearGameMonsoonIcon = "RoR2/Base/Achievements/texEngiClearGameMonsoonIcon.png"; public const string texEngiClearTeleporterWithZeroMonstersIcon = "RoR2/Base/Achievements/texEngiClearTeleporterWithZeroMonstersIcon.png"; public const string texEngiKillBossQuickIcon = "RoR2/Base/Achievements/texEngiKillBossQuickIcon.png"; public const string texFailShrineChanceIcon = "RoR2/Base/Achievements/texFailShrineChanceIcon.png"; public const string texFindDevilAltarIcon = "RoR2/Base/Achievements/texFindDevilAltarIcon.png"; public const string texFindTimedChestIcon = "RoR2/Base/Achievements/texFindTimedChestIcon.png"; public const string texFindUniqueNewtStatuesIcon = "RoR2/Base/Achievements/texFindUniqueNewtStatuesIcon.png"; public const string texFreeMageIcon = "RoR2/Base/Achievements/texFreeMageIcon.png"; public const string texHardEliteBossKillIcon = "RoR2/Base/Achievements/texHardEliteBossKillIcon.png"; public const string texHardHitterIcon = "RoR2/Base/Achievements/texHardHitterIcon.png"; public const string texHuntressAllGlaiveBouncesKillIcon = "RoR2/Base/Achievements/texHuntressAllGlaiveBouncesKillIcon.png"; public const string texHuntressAttackSpeedIcon = "RoR2/Base/Achievements/texHuntressAttackSpeedIcon.png"; public const string texHuntressClearGameMonsoonIcon = "RoR2/Base/Achievements/texHuntressClearGameMonsoonIcon.png"; public const string texHuntressCollectCrowbarsIcon = "RoR2/Base/Achievements/texHuntressCollectCrowbarsIcon.png"; public const string texHuntressMaintainFullHealthOnFrozenWallIcon = "RoR2/Base/Achievements/texHuntressMaintainFullHealthOnFrozenWallIcon.png"; public const string texKillBossQuantityInRunIcon = "RoR2/Base/Achievements/texKillBossQuantityInRunIcon.png"; public const string texKillBossQuickIcon = "RoR2/Base/Achievements/texKillBossQuickIcon.png"; public const string texKillElementalLemuriansIcon = "RoR2/Base/Achievements/texKillElementalLemuriansIcon.png"; public const string texKillEliteMonsterIcon = "RoR2/Base/Achievements/texKillEliteMonsterIcon.png"; public const string texKillElitesMilestoneIcon = "RoR2/Base/Achievements/texKillElitesMilestoneIcon.png"; public const string texKillGoldTitanInOneCycleIcon = "RoR2/Base/Achievements/texKillGoldTitanInOneCycleIcon.png"; public const string texKillTotalEnemiesIcon = "RoR2/Base/Achievements/texKillTotalEnemiesIcon.png"; public const string texLoaderBigSlamIcon = "RoR2/Base/Achievements/texLoaderBigSlamIcon.png"; public const string texLoaderClearGameMonsoonIcon = "RoR2/Base/Achievements/texLoaderClearGameMonsoonIcon.png"; public const string texLoaderKillLoadersIcon = "RoR2/Base/Achievements/texLoaderKillLoadersIcon.png"; public const string texLoaderSpeedRunIcon = "RoR2/Base/Achievements/texLoaderSpeedRunIcon.png"; public const string texLoaderThatsWeirdIcon = "RoR2/Base/Achievements/texLoaderThatsWeirdIcon.png"; public const string texLogCollectorIcon = "RoR2/Base/Achievements/texLogCollectorIcon.png"; public const string texLoopOnceIcon = "RoR2/Base/Achievements/texLoopOnceIcon.png"; public const string texMageAirborneMultiKillIcon = "RoR2/Base/Achievements/texMageAirborneMultiKillIcon.png"; public const string texMageClearGameMonsoonIcon = "RoR2/Base/Achievements/texMageClearGameMonsoonIcon.png"; public const string texMageFastBossIcon = "RoR2/Base/Achievements/texMageFastBossIcon.png"; public const string texMageMultiExecuteIcon = "RoR2/Base/Achievements/texMageMultiExecuteIcon.png"; public const string texMageMultiKillIcon = "RoR2/Base/Achievements/texMageMultiKillIcon.png"; public const string texMajorMultikillIcon = "RoR2/Base/Achievements/texMajorMultikillIcon.png"; public const string texMaxHealingShrineIcon = "RoR2/Base/Achievements/texMaxHealingShrineIcon.png"; public const string texMercClearGameMonsoonIcon = "RoR2/Base/Achievements/texMercClearGameMonsoonIcon.png"; public const string texMercCompleteTrialWithFullHealthIcon = "RoR2/Base/Achievements/texMercCompleteTrialWithFullHealthIcon.png"; public const string texMercDontTouchGroundIcon = "RoR2/Base/Achievements/texMercDontTouchGroundIcon.png"; public const string texMercXSkillsInYSecondsIcon = "RoR2/Base/Achievements/texMercXSkillsInYSecondsIcon.png"; public const string texMoveSpeedIcon = "RoR2/Base/Achievements/texMoveSpeedIcon.png"; public const string texMultiCombatShrineIcon = "RoR2/Base/Achievements/texMultiCombatShrineIcon.png"; public const string texNeverBackDownIcon = "RoR2/Base/Achievements/texNeverBackDownIcon.png"; public const string texObtainArtifactBombIcon = "RoR2/Base/Achievements/texObtainArtifactBombIcon.png"; public const string texObtainArtifactCommandIcon = "RoR2/Base/Achievements/texObtainArtifactCommandIcon.png"; public const string texObtainArtifactEliteOnlyIcon = "RoR2/Base/Achievements/texObtainArtifactEliteOnlyIcon.png"; public const string texObtainArtifactEnigmaIcon = "RoR2/Base/Achievements/texObtainArtifactEnigmaIcon.png"; public const string texObtainArtifactFriendlyFireIcon = "RoR2/Base/Achievements/texObtainArtifactFriendlyFireIcon.png"; public const string texObtainArtifactGlassIcon = "RoR2/Base/Achievements/texObtainArtifactGlassIcon.png"; public const string texObtainArtifactMixEnemyIcon = "RoR2/Base/Achievements/texObtainArtifactMixEnemyIcon.png"; public const string texObtainArtifactMonsterTeamGainsItemsIcon = "RoR2/Base/Achievements/texObtainArtifactMonsterTeamGainsItemsIcon.png"; public const string texObtainArtifactRandomSurvivorOnRespawnIcon = "RoR2/Base/Achievements/texObtainArtifactRandomSurvivorOnRespawnIcon.png"; public const string texObtainArtifactSacrificeIcon = "RoR2/Base/Achievements/texObtainArtifactSacrificeIcon.png"; public const string texObtainArtifactShadowCloneIcon = "RoR2/Base/Achievements/texObtainArtifactShadowCloneIcon.png"; public const string texObtainArtifactSingleMonsterTypeIcon = "RoR2/Base/Achievements/texObtainArtifactSingleMonsterTypeIcon.png"; public const string texObtainArtifactSwarmsIcon = "RoR2/Base/Achievements/texObtainArtifactSwarmsIcon.png"; public const string texObtainArtifactTeamDeathIcon = "RoR2/Base/Achievements/texObtainArtifactTeamDeathIcon.png"; public const string texObtainArtifactWeakAssKneesIcon = "RoR2/Base/Achievements/texObtainArtifactWeakAssKneesIcon.png"; public const string texObtainArtifactWispOnDeathIcon = "RoR2/Base/Achievements/texObtainArtifactWispOnDeathIcon.png"; public const string texPlaceholderAchievement = "RoR2/Base/Achievements/texPlaceholderAchievement.png"; public const string texRepeatedlyDuplicateItemsIcon = "RoR2/Base/Achievements/texRepeatedlyDuplicateItemsIcon.png"; public const string texRepeatFirstTeleporterIcon = "RoR2/Base/Achievements/texRepeatFirstTeleporterIcon.png"; public const string texRescueTreebotIcon = "RoR2/Base/Achievements/texRescueTreebotIcon.png"; public const string texStayAlive1Icon = "RoR2/Base/Achievements/texStayAlive1Icon.png"; public const string texSuicideHermitCrabsIcon = "RoR2/Base/Achievements/texSuicideHermitCrabsIcon.png"; public const string texToolbotBeatArenaLaterIcon = "RoR2/Base/Achievements/texToolbotBeatArenaLaterIcon.png"; public const string texToolbotClearGameMonsoonIcon = "RoR2/Base/Achievements/texToolbotClearGameMonsoonIcon.png"; public const string texToolbotGuardTeleporterIcon = "RoR2/Base/Achievements/texToolbotGuardTeleporterIcon.png"; public const string texToolbotKillImpBossWithBfgIcon = "RoR2/Base/Achievements/texToolbotKillImpBossWithBfgIcon.png"; public const string texTotalDronesRepairedIcon = "RoR2/Base/Achievements/texTotalDronesRepairedIcon.png"; public const string texTotalMoneyCollectedIcon = "RoR2/Base/Achievements/texTotalMoneyCollectedIcon.png"; public const string texTreebotBigHealIcon = "RoR2/Base/Achievements/texTreebotBigHealIcon.png"; public const string texTreebotClearGameMonsoonIcon = "RoR2/Base/Achievements/texTreebotClearGameMonsoonIcon.png"; public const string texTreebotDunkClayBossIcon = "RoR2/Base/Achievements/texTreebotDunkClayBossIcon.png"; public const string texTreebotLowHealthTeleporterIcon = "RoR2/Base/Achievements/texTreebotLowHealthTeleporterIcon.png"; public const string texUseThreePortalsIcon = "RoR2/Base/Achievements/texUseThreePortalsIcon.png"; public const string texArtifactCompoundCircleMask = "RoR2/Base/ArtifactCompounds/texArtifactCompoundCircleMask.png"; public const string texArtifactCompoundCircleNormal = "RoR2/Base/ArtifactCompounds/texArtifactCompoundCircleNormal.png"; public const string texArtifactCompoundDiamondMask = "RoR2/Base/ArtifactCompounds/texArtifactCompoundDiamondMask.png"; public const string texArtifactCompoundDiamondNormal = "RoR2/Base/ArtifactCompounds/texArtifactCompoundDiamondNormal.png"; public const string texArtifactCompoundFrameMask = "RoR2/Base/ArtifactCompounds/texArtifactCompoundFrameMask.png"; public const string texArtifactCompoundFrameNormal = "RoR2/Base/ArtifactCompounds/texArtifactCompoundFrameNormal.png"; public const string texArtifactCompoundScavScarMask = "RoR2/Base/ArtifactCompounds/texArtifactCompoundScavScarMask.png"; public const string texArtifactCompoundScavScarNormal = "RoR2/Base/ArtifactCompounds/texArtifactCompoundScavScarNormal.png"; public const string texArtifactCompoundSquareMask = "RoR2/Base/ArtifactCompounds/texArtifactCompoundSquareMask.png"; public const string texArtifactCompoundSquareNormal = "RoR2/Base/ArtifactCompounds/texArtifactCompoundSquareNormal.png"; public const string texArtifactCompoundTriangleMask = "RoR2/Base/ArtifactCompounds/texArtifactCompoundTriangleMask.png"; public const string texArtifactCompoundTriangleNormal = "RoR2/Base/ArtifactCompounds/texArtifactCompoundTriangleNormal.png"; public const string texArtifactBombDisabled = "RoR2/Base/Bomb/texArtifactBombDisabled.png"; public const string texArtifactBombEnabled = "RoR2/Base/Bomb/texArtifactBombEnabled.png"; public const string texArtifactCommandDisabled = "RoR2/Base/Command/texArtifactCommandDisabled.png"; public const string texArtifactCommandEnabled = "RoR2/Base/Command/texArtifactCommandEnabled.png"; public const string texArtifactEliteOnlyDisabled = "RoR2/Base/EliteOnly/texArtifactEliteOnlyDisabled.png"; public const string texArtifactEliteOnlyEnabled = "RoR2/Base/EliteOnly/texArtifactEliteOnlyEnabled.png"; public const string texArtifactRandomEquipmentDisabled = "RoR2/Base/Enigma/texArtifactRandomEquipmentDisabled.png"; public const string texArtifactRandomEquipmentEnabled = "RoR2/Base/Enigma/texArtifactRandomEquipmentEnabled.png"; public const string texArtifactFriendlyFireDisabled = "RoR2/Base/FriendlyFire/texArtifactFriendlyFireDisabled.png"; public const string texArtifactFriendlyFireEnabled = "RoR2/Base/FriendlyFire/texArtifactFriendlyFireEnabled.png"; public const string texArtifactGlassDisabled = "RoR2/Base/Glass/texArtifactGlassDisabled.png"; public const string texArtifactGlassEnabled = "RoR2/Base/Glass/texArtifactGlassEnabled.png"; public const string texArtifactMixEnemyDisabled = "RoR2/Base/MixEnemy/texArtifactMixEnemyDisabled.png"; public const string texArtifactMixEnemyEnabled = "RoR2/Base/MixEnemy/texArtifactMixEnemyEnabled.png"; public const string texArtifactEvolutionDisabled = "RoR2/Base/MonsterTeamGainsItems/texArtifactEvolutionDisabled.png"; public const string texArtifactEvolutionEnabled = "RoR2/Base/MonsterTeamGainsItems/texArtifactEvolutionEnabled.png"; public const string texArtifactMetamorphDisabled = "RoR2/Base/RandomSurvivorOnRespawn/texArtifactMetamorphDisabled.png"; public const string texArtifactMetamorphEnabled = "RoR2/Base/RandomSurvivorOnRespawn/texArtifactMetamorphEnabled.png"; public const string texArtifactSacrificeDisabled = "RoR2/Base/Sacrifice/texArtifactSacrificeDisabled.png"; public const string texArtifactSacrificeEnabled = "RoR2/Base/Sacrifice/texArtifactSacrificeEnabled.png"; public const string texArtifactShadowCloneDisabled = "RoR2/Base/ShadowClone/texArtifactShadowCloneDisabled.png"; public const string texArtifactShadowCloneEnabled = "RoR2/Base/ShadowClone/texArtifactShadowCloneEnabled.png"; public const string texArtifactKinDisabled = "RoR2/Base/SingleMonsterType/texArtifactKinDisabled.png"; public const string texArtifactKinEnabled = "RoR2/Base/SingleMonsterType/texArtifactKinEnabled.png"; public const string texArtifactSwarmsDisabled = "RoR2/Base/Swarms/texArtifactSwarmsDisabled.png"; public const string texArtifactSwarmsEnabled = "RoR2/Base/Swarms/texArtifactSwarmsEnabled.png"; public const string texArtifactDeathDisabled = "RoR2/Base/TeamDeath/texArtifactDeathDisabled.png"; public const string texArtifactDeathEnabled = "RoR2/Base/TeamDeath/texArtifactDeathEnabled.png"; public const string texArtifactFallDamageDisabled = "RoR2/Base/WeakAssKnees/texArtifactFallDamageDisabled.png"; public const string texArtifactFallDamageEnabled = "RoR2/Base/WeakAssKnees/texArtifactFallDamageEnabled.png"; public const string texArtifactWispDisabled = "RoR2/Base/WispOnDeath/texArtifactWispDisabled.png"; public const string texArtifactWispEnabled = "RoR2/Base/WispOnDeath/texArtifactWispEnabled.png"; public const string texUnidentifiedKillerIcon = "RoR2/Base/ArtifactShell/texUnidentifiedKillerIcon.png"; public const string texBanditKnifeEmissive = "RoR2/Base/Bandit2/texBanditKnifeEmissive.png"; public const string texBanditKnifeFresnelMask = "RoR2/Base/Bandit2/texBanditKnifeFresnelMask.png"; public const string texBanditKnifeNormal = "RoR2/Base/Bandit2/texBanditKnifeNormal.png"; public const string texBanditRevolverFresnelMask = "RoR2/Base/Bandit2/texBanditRevolverFresnelMask.png"; public const string texBanditShotgunAltDiffuse = "RoR2/Base/Bandit2/texBanditShotgunAltDiffuse.png"; public const string texBanditShotgunDiffuse = "RoR2/Base/Bandit2/texBanditShotgunDiffuse.png"; public const string texBanditShotgunEmissive = "RoR2/Base/Bandit2/texBanditShotgunEmissive.png"; public const string texBandit2SkillIcons = "RoR2/Base/Bandit2/texBandit2SkillIcons.png"; public const string texBandit2AltEmission = "RoR2/Base/Bandit2/texBandit2AltEmission.png"; public const string texBandit2CoatAltDiffuse = "RoR2/Base/Bandit2/texBandit2CoatAltDiffuse.png"; public const string texBandit2DiffuseAlt = "RoR2/Base/Bandit2/texBandit2DiffuseAlt.png"; public const string texBandit2CoatDiffuse = "RoR2/Base/Bandit2/texBandit2CoatDiffuse.png"; public const string texBandit2CoatNormal = "RoR2/Base/Bandit2/texBandit2CoatNormal.png"; public const string texBandit2Diffuse = "RoR2/Base/Bandit2/texBandit2Diffuse.png"; public const string texBandit2Emission = "RoR2/Base/Bandit2/texBandit2Emission.png"; public const string texBandit2Normal = "RoR2/Base/Bandit2/texBandit2Normal.png"; public const string texBanditCoatDiffuse = "RoR2/Base/Bandit2/texBanditCoatDiffuse.png"; public const string texBanditCoatEmissive = "RoR2/Base/Bandit2/texBanditCoatEmissive.png"; public const string texBanditIcon = "RoR2/Base/Bandit2/texBanditIcon.png"; public const string texBuffBanditSkullIcon = "RoR2/Base/Bandit2/texBuffBanditSkullIcon.tif"; public const string texBuffSuperBleedingIcon = "RoR2/Base/Bandit2/texBuffSuperBleedingIcon.tif"; public const string texBandit2BackstabMask = "RoR2/Base/Bandit2/texBandit2BackstabMask.png"; public const string texBanditSkullMask = "RoR2/Base/Bandit2/texBanditSkullMask.png"; public const string BeetleBody = "RoR2/Base/Beetle/BeetleBody.png"; public const string texSulfurBeetleDiffuse = "RoR2/Base/Beetle/texSulfurBeetleDiffuse.png"; public const string texSulfurBeetleFresnelMask = "RoR2/Base/Beetle/texSulfurBeetleFresnelMask.png"; public const string texBeetleDiffuse = "RoR2/Base/Beetle/texBeetleDiffuse.png"; public const string texBeetleEmission = "RoR2/Base/Beetle/texBeetleEmission.png"; public const string BeetleGuardBody = "RoR2/Base/Beetle/BeetleGuardBody.png"; public const string texSulfurBeetleGuardDiffuse = "RoR2/Base/Beetle/texSulfurBeetleGuardDiffuse.png"; public const string texSulfurBeetleGuardFresnelMask = "RoR2/Base/Beetle/texSulfurBeetleGuardFresnelMask.png"; public const string BeetleQueen2Body = "RoR2/Base/Beetle/BeetleQueen2Body.png"; public const string texAcidDecalDiffuse = "RoR2/Base/Beetle/texAcidDecalDiffuse.png"; public const string texBuggyMask = "RoR2/Base/Beetle/texBuggyMask.png"; public const string texSulfurBeetleQueenDiffuse = "RoR2/Base/Beetle/texSulfurBeetleQueenDiffuse.png"; public const string texSulfurBeetleQueenFresnelMask = "RoR2/Base/Beetle/texSulfurBeetleQueenFresnelMask.png"; public const string texAcidDecalMask = "RoR2/Base/Beetle/texAcidDecalMask.png"; public const string texAcidDecalNormal = "RoR2/Base/Beetle/texAcidDecalNormal.png"; public const string texBeetleDiffuse2 = "RoR2/Base/Beetle/texBeetleDiffuse2.png"; public const string texBeetleGrubRangeIndicator = "RoR2/Base/Beetle/texBeetleGrubRangeIndicator.png"; public const string texBeetleGuardAllyDiffuse = "RoR2/Base/Beetle/texBeetleGuardAllyDiffuse.png"; public const string texBeetleGuardAllyFresnelMask = "RoR2/Base/Beetle/texBeetleGuardAllyFresnelMask.png"; public const string texBeetleGuardDiffuse = "RoR2/Base/Beetle/texBeetleGuardDiffuse.png"; public const string texBeetleGuardEmission = "RoR2/Base/Beetle/texBeetleGuardEmission.png"; public const string texBeetleGuardNormal = "RoR2/Base/Beetle/texBeetleGuardNormal.png"; public const string texBeetleGuardShellMask = "RoR2/Base/Beetle/texBeetleGuardShellMask.png"; public const string texBeetleNormal = "RoR2/Base/Beetle/texBeetleNormal.png"; public const string texBeetleQueenDiffuse = "RoR2/Base/Beetle/texBeetleQueenDiffuse.png"; public const string texBeetleQueenEyeMask = "RoR2/Base/Beetle/texBeetleQueenEyeMask.png"; public const string texBeetleQueenNormal = "RoR2/Base/Beetle/texBeetleQueenNormal.png"; public const string texBeetleQueenSplatmap = "RoR2/Base/Beetle/texBeetleQueenSplatmap.png"; public const string texBeetleStrike = "RoR2/Base/Beetle/texBeetleStrike.png"; public const string texBuffBeetleJuiceIcon = "RoR2/Base/Beetle/texBuffBeetleJuiceIcon.tif"; public const string BellBody = "RoR2/Base/Bell/BellBody.png"; public const string texBellBallDiffuse = "RoR2/Base/Bell/texBellBallDiffuse.png"; public const string texBellBallNormal = "RoR2/Base/Bell/texBellBallNormal.png"; public const string texBellDeviceDiffuse = "RoR2/Base/Bell/texBellDeviceDiffuse.png"; public const string texBellDeviceNormal = "RoR2/Base/Bell/texBellDeviceNormal.png"; public const string texBellDiffuse = "RoR2/Base/Bell/texBellDiffuse.png"; public const string texBellNormal = "RoR2/Base/Bell/texBellNormal.png"; public const string texBirdsharkDiffuse = "RoR2/Base/Birdshark/texBirdsharkDiffuse.png"; public const string BisonBody = "RoR2/Base/Bison/BisonBody.png"; public const string texBisonDiffuse = "RoR2/Base/Bison/texBisonDiffuse.png"; public const string texBisonHairDiffuse = "RoR2/Base/Bison/texBisonHairDiffuse.png"; public const string texBisonNormal = "RoR2/Base/Bison/texBisonNormal.png"; public const string texBrotherIcon = "RoR2/Base/Brother/texBrotherIcon.png"; public const string texBrotherClothRipped = "RoR2/Base/Brother/texBrotherClothRipped.png"; public const string texBrotherDiffuse = "RoR2/Base/Brother/texBrotherDiffuse.png"; public const string texBrotherEyeDiffuse = "RoR2/Base/Brother/texBrotherEyeDiffuse.png"; public const string texBrotherEyeHurtDiffuse = "RoR2/Base/Brother/texBrotherEyeHurtDiffuse.png"; public const string texBrotherNormal = "RoR2/Base/Brother/texBrotherNormal.png"; public const string texCaptainSupplyRadius = "RoR2/Base/Captain/texCaptainSupplyRadius.png"; public const string texCrosshairDrone1 = "RoR2/Base/Captain/texCrosshairDrone1.png"; public const string texScanlineMask = "RoR2/Base/Captain/texScanlineMask.jpg"; public const string texWarning = "RoR2/Base/Captain/texWarning.png"; public const string texCaptainJacketDiffuse = "RoR2/Base/Captain/texCaptainJacketDiffuse.png"; public const string texCaptainJacketDiffuseAlt = "RoR2/Base/Captain/texCaptainJacketDiffuseAlt.png"; public const string texCaptainJacketNormal = "RoR2/Base/Captain/texCaptainJacketNormal.png"; public const string texCaptainPalette = "RoR2/Base/Captain/texCaptainPalette.psd"; public const string texCaptainPaletteAlt = "RoR2/Base/Captain/texCaptainPaletteAlt.psd"; public const string texCaptainCrosshairInner = "RoR2/Base/Captain/texCaptainCrosshairInner.png"; public const string texCaptainCrosshairOuter = "RoR2/Base/Captain/texCaptainCrosshairOuter.png"; public const string texCaptainSkillIcons = "RoR2/Base/Captain/texCaptainSkillIcons.png"; public const string texCaptainIcon = "RoR2/Base/Captain/texCaptainIcon.png"; public const string texRampCrosshair2 = "RoR2/Base/Captain/texRampCrosshair2.png"; public const string texClayFlowmap = "RoR2/Base/Clay/texClayFlowmap.png"; public const string ClayBossBody = "RoR2/Base/ClayBoss/ClayBossBody.png"; public const string texClayBossDiffuse = "RoR2/Base/ClayBoss/texClayBossDiffuse.png"; public const string texClayBossNormal = "RoR2/Base/ClayBoss/texClayBossNormal.png"; public const string texClayProjectileDiffuse = "RoR2/Base/ClayBoss/texClayProjectileDiffuse.png"; public const string texClayProjectileMask = "RoR2/Base/ClayBoss/texClayProjectileMask.png"; public const string ClayBruiserBody = "RoR2/Base/ClayBruiser/ClayBruiserBody.png"; public const string texClayBruiserDeathDecalMask = "RoR2/Base/ClayBruiser/texClayBruiserDeathDecalMask.png"; public const string texClayBruiserDiffuse = "RoR2/Base/ClayBruiser/texClayBruiserDiffuse.png"; public const string texClayBruiserNormal = "RoR2/Base/ClayBruiser/texClayBruiserNormal.png"; public const string texCommandoSkillIcons = "RoR2/Base/Commando/texCommandoSkillIcons.png"; public const string texCommandoIcon = "RoR2/Base/Commando/texCommandoIcon.png"; public const string texCommandoPaletteDiffuse = "RoR2/Base/Commando/texCommandoPaletteDiffuse.png"; public const string texCommandoPaletteDiffuseAlt = "RoR2/Base/Commando/texCommandoPaletteDiffuseAlt.psd"; public const string texCommandoPaletteEmission = "RoR2/Base/Commando/texCommandoPaletteEmission.png"; public const string CrocoBody = "RoR2/Base/Croco/CrocoBody.png"; public const string texCrocoSkillIcons = "RoR2/Base/Croco/texCrocoSkillIcons.png"; public const string texBuffRegenBoostIcon = "RoR2/Base/Croco/texBuffRegenBoostIcon.tif"; public const string texCrocoAltDiffuse = "RoR2/Base/Croco/texCrocoAltDiffuse.png"; public const string texCrocoBiteMask = "RoR2/Base/Croco/texCrocoBiteMask.png"; public const string texCrocoDecalMask = "RoR2/Base/Croco/texCrocoDecalMask.png"; public const string texCrocoDiffuse = "RoR2/Base/Croco/texCrocoDiffuse.png"; public const string texCrocoEmission = "RoR2/Base/Croco/texCrocoEmission.png"; public const string texCrocoNormal = "RoR2/Base/Croco/texCrocoNormal.png"; public const string texCrocoPoisonMask = "RoR2/Base/Croco/texCrocoPoisonMask.png"; public const string texCrocoSlashMask1 = "RoR2/Base/Croco/texCrocoSlashMask 1.png"; public const string texCrocoSlashMask = "RoR2/Base/Croco/texCrocoSlashMask.png"; public const string texCrocoSlashMaskSharp = "RoR2/Base/Croco/texCrocoSlashMaskSharp.png"; public const string texCrocoSpinesDiffuse = "RoR2/Base/Croco/texCrocoSpinesDiffuse.png"; public const string texCrocoSpinesMask = "RoR2/Base/Croco/texCrocoSpinesMask.png"; public const string texPoisonMask = "RoR2/Base/Croco/texPoisonMask.png"; public const string texPoisonNormal = "RoR2/Base/Croco/texPoisonNormal.png"; public const string texBackupDroneBodyIcon = "RoR2/Base/Drones/texBackupDroneBodyIcon.png"; public const string texDrone1Icon = "RoR2/Base/Drones/texDrone1Icon.png"; public const string texDrone2Icon = "RoR2/Base/Drones/texDrone2Icon.png"; public const string EmergencyDroneBody = "RoR2/Base/Drones/EmergencyDroneBody.png"; public const string EquipmentDroneBody = "RoR2/Base/Drones/EquipmentDroneBody.png"; public const string FlameDroneBody = "RoR2/Base/Drones/FlameDroneBody.png"; public const string MegaDroneBody = "RoR2/Base/Drones/MegaDroneBody.png"; public const string texMissileDroneIcon = "RoR2/Base/Drones/texMissileDroneIcon.png"; public const string texDroneBlades = "RoR2/Base/Drones/texDroneBlades.png"; public const string texTurret1Diffuse = "RoR2/Base/Drones/texTurret1Diffuse.png"; public const string texTurret1Icon = "RoR2/Base/Drones/texTurret1Icon.png"; public const string ElectricWormBody = "RoR2/Base/ElectricWorm/ElectricWormBody.png"; public const string texEngiSkillIcons = "RoR2/Base/Engi/texEngiSkillIcons.png"; public const string texEngiIcon = "RoR2/Base/Engi/texEngiIcon.png"; public const string texUIEngiMissileLockedOn = "RoR2/Base/Engi/texUIEngiMissileLockedOn.png"; public const string texUIEngiMissilePaint = "RoR2/Base/Engi/texUIEngiMissilePaint.png"; public const string texEngiTurretDiffuse = "RoR2/Base/Engi/texEngiTurretDiffuse.png"; public const string texEngiTurretEmission = "RoR2/Base/Engi/texEngiTurretEmission.png"; public const string texEngiTurretIcon = "RoR2/Base/Engi/texEngiTurretIcon.png"; public const string texEngiFlare = "RoR2/Base/Engi/texEngiFlare.png"; public const string texEngiDiffuse = "RoR2/Base/Engi/texEngiDiffuse.png"; public const string texEngiDiffuseAlt = "RoR2/Base/Engi/texEngiDiffuseAlt.png"; public const string texEngiEmission = "RoR2/Base/Engi/texEngiEmission.png"; public const string texEngiEmissionAlt = "RoR2/Base/Engi/texEngiEmissionAlt.png"; public const string texEngiShield = "RoR2/Base/Engi/texEngiShield.png"; public const string texEngiShieldBlurred = "RoR2/Base/Engi/texEngiShieldBlurred.png"; public const string GolemBody = "RoR2/Base/Golem/GolemBody.png"; public const string texGolemNormal1 = "RoR2/Base/Golem/texGolemNormal 1.png"; public const string texNatureGolemDiffuse = "RoR2/Base/Golem/texNatureGolemDiffuse.png"; public const string texSandyGolemDiffuse = "RoR2/Base/Golem/texSandyGolemDiffuse.png"; public const string texZap1Mask = "RoR2/Base/Golem/texZap1Mask.png"; public const string texSnowyGolemDiffuse = "RoR2/Base/Golem/texSnowyGolemDiffuse.png"; public const string texGolemDiffuse = "RoR2/Base/Golem/texGolemDiffuse.png"; public const string texGolemEmission = "RoR2/Base/Golem/texGolemEmission.png"; public const string texGolemNormal = "RoR2/Base/Golem/texGolemNormal.png"; public const string GrandparentBody = "RoR2/Base/Grandparent/GrandparentBody.png"; public const string texBuffOverheat = "RoR2/Base/Grandparent/texBuffOverheat.tif"; public const string texGrandparentDetailBDiffuse = "RoR2/Base/Grandparent/texGrandparentDetailBDiffuse.png"; public const string texGrandparentDetailBNormal = "RoR2/Base/Grandparent/texGrandparentDetailBNormal.png"; public const string texGrandparentDetailGDiffuse = "RoR2/Base/Grandparent/texGrandparentDetailGDiffuse.png"; public const string texGrandparentDetailGNormal = "RoR2/Base/Grandparent/texGrandparentDetailGNormal.png"; public const string texGrandparentDiffuse = "RoR2/Base/Grandparent/texGrandparentDiffuse.png"; public const string texGrandparentEmission = "RoR2/Base/Grandparent/texGrandparentEmission.png"; public const string texGrandparentNormal = "RoR2/Base/Grandparent/texGrandparentNormal.png"; public const string texGrandparentSplat = "RoR2/Base/Grandparent/texGrandparentSplat.png"; public const string GravekeeperBody = "RoR2/Base/Gravekeeper/GravekeeperBody.png"; public const string texChainTrailMask = "RoR2/Base/Gravekeeper/texChainTrailMask.png"; public const string texChainTrailNormal = "RoR2/Base/Gravekeeper/texChainTrailNormal.png"; public const string texGravekeeperFurDiffuse = "RoR2/Base/Gravekeeper/texGravekeeperFurDiffuse.png"; public const string texGravekeeperTestDiffuse = "RoR2/Base/Gravekeeper/texGravekeeperTestDiffuse.png"; public const string GreaterWispBody = "RoR2/Base/GreaterWisp/GreaterWispBody.png"; public const string texGreaterWispCracks = "RoR2/Base/GreaterWisp/texGreaterWispCracks.png"; public const string texGreaterWispDiffuse = "RoR2/Base/GreaterWisp/texGreaterWispDiffuse.png"; public const string texHandDiffuse = "RoR2/Base/HAND/texHandDiffuse.png"; public const string texHandEmission = "RoR2/Base/HAND/texHandEmission.png"; public const string texHereticBodyDiffuse = "RoR2/Base/Heretic/texHereticBody_Diffuse.png"; public const string texHereticBodyEmission = "RoR2/Base/Heretic/texHereticBody_Emission.png"; public const string texHereticBodyNormals = "RoR2/Base/Heretic/texHereticBody_Normals.png"; public const string texHereticClothesDiffuse = "RoR2/Base/Heretic/texHereticClothes_Diffuse.png"; public const string texHereticClothesNormal = "RoR2/Base/Heretic/texHereticClothes_Normal.png"; public const string texHereticFeather = "RoR2/Base/Heretic/texHereticFeather.png"; public const string texHereticFeatherEmission = "RoR2/Base/Heretic/texHereticFeatherEmission.png"; public const string texHereticIcon = "RoR2/Base/Heretic/texHereticIcon.png"; public const string HermitCrabBody = "RoR2/Base/HermitCrab/HermitCrabBody.png"; public const string texHermitCrabDiffuse = "RoR2/Base/HermitCrab/texHermitCrabDiffuse.png"; public const string texHermitCrabNormal = "RoR2/Base/HermitCrab/texHermitCrabNormal.png"; public const string texHuntressDiffuseAlt = "RoR2/Base/Huntress/texHuntressDiffuseAlt.png"; public const string texHuntressSkillIcons = "RoR2/Base/Huntress/texHuntressSkillIcons.png"; public const string texBowDiffuse = "RoR2/Base/Huntress/texBowDiffuse.png"; public const string texBowEmission = "RoR2/Base/Huntress/texBowEmission.png"; public const string texHuntressArrowBigMask = "RoR2/Base/Huntress/texHuntressArrowBigMask.png"; public const string texHuntressArrowMask = "RoR2/Base/Huntress/texHuntressArrowMask.png"; public const string texHuntressDiffuse = "RoR2/Base/Huntress/texHuntressDiffuse.png"; public const string texHuntressEmission = "RoR2/Base/Huntress/texHuntressEmission.png"; public const string texHuntressIcon = "RoR2/Base/Huntress/texHuntressIcon.png"; public const string texHuntressNormal = "RoR2/Base/Huntress/texHuntressNormal.png"; public const string texHuntressScarfDiffuseAlt = "RoR2/Base/Huntress/texHuntressScarfDiffuseAlt.png"; public const string ImpBody = "RoR2/Base/Imp/ImpBody.png"; public const string texImpBossDiffuse = "RoR2/Base/Imp/texImpBossDiffuse.png"; public const string texImpBossEmission = "RoR2/Base/Imp/texImpBossEmission.png"; public const string texImpBossNormals = "RoR2/Base/Imp/texImpBossNormals.png"; public const string texImpDiffuse = "RoR2/Base/Imp/texImpDiffuse.png"; public const string texImpEmission = "RoR2/Base/Imp/texImpEmission.png"; public const string texImpNormal = "RoR2/Base/Imp/texImpNormal.png"; public const string texImpSwipeMask = "RoR2/Base/Imp/texImpSwipeMask.png"; public const string ImpBossBody = "RoR2/Base/ImpBoss/ImpBossBody.png"; public const string JellyfishBody = "RoR2/Base/Jellyfish/JellyfishBody.png"; public const string texJellyfishAO = "RoR2/Base/Jellyfish/texJellyfishAO.png"; public const string texJellyfishDiffuse = "RoR2/Base/Jellyfish/texJellyfishDiffuse.png"; public const string texJellyfishEmission = "RoR2/Base/Jellyfish/texJellyfishEmission.png"; public const string texJellyfishNormal = "RoR2/Base/Jellyfish/texJellyfishNormal.png"; public const string LemurianBody = "RoR2/Base/Lemurian/LemurianBody.png"; public const string texLemurianBruiserDiffuse = "RoR2/Base/Lemurian/texLemurianBruiserDiffuse.png"; public const string texLemurianBruiserEmission = "RoR2/Base/Lemurian/texLemurianBruiserEmission.png"; public const string texLemurianBruiserNormal = "RoR2/Base/Lemurian/texLemurianBruiserNormal.png"; public const string texLemurianDiffuse = "RoR2/Base/Lemurian/texLemurianDiffuse.tga"; public const string texLemurianEmission = "RoR2/Base/Lemurian/texLemurianEmission.png"; public const string texLemurianNormal = "RoR2/Base/Lemurian/texLemurianNormal.png"; public const string texLemurianSlash = "RoR2/Base/Lemurian/texLemurianSlash.png"; public const string LemurianBruiserBody = "RoR2/Base/LemurianBruiser/LemurianBruiserBody.png"; public const string LoaderBody = "RoR2/Base/Loader/LoaderBody.png"; public const string texLoaderSkillIcons = "RoR2/Base/Loader/texLoaderSkillIcons.png"; public const string texLoaderPilotDiffuse = "RoR2/Base/Loader/texLoaderPilotDiffuse.png"; public const string texLoaderPilotDiffuseAlt = "RoR2/Base/Loader/texLoaderPilotDiffuseAlt.png"; public const string texLoaderPilotEmission = "RoR2/Base/Loader/texLoaderPilotEmission.png"; public const string texLoaderRopeNormal = "RoR2/Base/Loader/texLoaderRopeNormal.png"; public const string LunarExploderBody = "RoR2/Base/LunarExploder/LunarExploderBody.png"; public const string LunarGolemBody = "RoR2/Base/LunarGolem/LunarGolemBody.png"; public const string texBuffLunarShellIcon = "RoR2/Base/LunarGolem/texBuffLunarShellIcon.tif"; public const string texLunarGolemDiffuse = "RoR2/Base/LunarGolem/texLunarGolemDiffuse.png"; public const string texLunarGolemEmmission = "RoR2/Base/LunarGolem/texLunarGolemEmmission.png"; public const string texLunarGolemNormal = "RoR2/Base/LunarGolem/texLunarGolemNormal.png"; public const string LunarWispBody = "RoR2/Base/LunarWisp/LunarWispBody.png"; public const string texChargeRing = "RoR2/Base/LunarWisp/texChargeRing.png"; public const string texLunarWispDiffuse = "RoR2/Base/LunarWisp/texLunarWispDiffuse.png"; public const string texLunarWispNormal = "RoR2/Base/LunarWisp/texLunarWispNormal.png"; public const string texLunarWispTracerLead = "RoR2/Base/LunarWisp/texLunarWispTracerLead.png"; public const string texMageMatrixMask = "RoR2/Base/Mage/texMageMatrixMask.png"; public const string texMageMatrixMaskDirectional = "RoR2/Base/Mage/texMageMatrixMaskDirectional.png"; public const string texMageMatrixTri = "RoR2/Base/Mage/texMageMatrixTri.png"; public const string texMageSkillIcons = "RoR2/Base/Mage/texMageSkillIcons.png"; public const string texMageDiffuse = "RoR2/Base/Mage/texMageDiffuse.png"; public const string texMageDiffuseAlt = "RoR2/Base/Mage/texMageDiffuseAlt.png"; public const string texMageIcon = "RoR2/Base/Mage/texMageIcon.png"; public const string texMageMask = "RoR2/Base/Mage/texMageMask.png"; public const string MagmaWormBody = "RoR2/Base/MagmaWorm/MagmaWormBody.png"; public const string texMagma1 = "RoR2/Base/MagmaWorm/texMagma1.png"; public const string texMagmaWormDiffuse = "RoR2/Base/MagmaWorm/texMagmaWormDiffuse.png"; public const string texMagmaWormDiffuseOff = "RoR2/Base/MagmaWorm/texMagmaWormDiffuseOff.png"; public const string texMagmaWormHeight = "RoR2/Base/MagmaWorm/texMagmaWormHeight.png"; public const string texMagmaWormHeight2 = "RoR2/Base/MagmaWorm/texMagmaWormHeight2.png"; public const string texMagmaWormNormal = "RoR2/Base/MagmaWorm/texMagmaWormNormal.png"; public const string texMagmaWormSplat = "RoR2/Base/MagmaWorm/texMagmaWormSplat.png"; public const string texMercSkillIcons = "RoR2/Base/Merc/texMercSkillIcons.png"; public const string texBuffMercExposeIcon = "RoR2/Base/Merc/texBuffMercExposeIcon.tif"; public const string texMercAltDiffuse = "RoR2/Base/Merc/texMercAltDiffuse.png"; public const string texMercAltEmission = "RoR2/Base/Merc/texMercAltEmission.png"; public const string texMercDiffuse = "RoR2/Base/Merc/texMercDiffuse.png"; public const string texMercExposedMask = "RoR2/Base/Merc/texMercExposedMask.png"; public const string texMercIcon = "RoR2/Base/Merc/texMercIcon.png"; public const string texMercNormal = "RoR2/Base/Merc/texMercNormal.png"; public const string texMercSwipeMask = "RoR2/Base/Merc/texMercSwipeMask.png"; public const string texMercSwordDiffuse = "RoR2/Base/Merc/texMercSwordDiffuse.png"; public const string texMercSwordMask = "RoR2/Base/Merc/texMercSwordMask.png"; public const string texMercTestingDiffuse = "RoR2/Base/Merc/texMercTestingDiffuse.png"; public const string MiniMushroomBody = "RoR2/Base/MiniMushroom/MiniMushroomBody.png"; public const string texMiniMushroomDiffuse = "RoR2/Base/MiniMushroom/texMiniMushroomDiffuse.png"; public const string texMiniMushroomEmission = "RoR2/Base/MiniMushroom/texMiniMushroomEmission.png"; public const string texMiniMushroomNormal = "RoR2/Base/MiniMushroom/texMiniMushroomNormal.png"; public const string texMushDecalMask = "RoR2/Base/MiniMushroom/texMushDecalMask.png"; public const string texNullifierAllyDiffuse = "RoR2/Base/Nullifier/texNullifierAllyDiffuse.png"; public const string NullifierAllyBody = "RoR2/Base/Nullifier/NullifierAllyBody.png"; public const string NullifierBody = "RoR2/Base/Nullifier/NullifierBody.png"; public const string texBuffNullifiedIcon = "RoR2/Base/Nullifier/texBuffNullifiedIcon.tif"; public const string texBuffNullifyStackIcon = "RoR2/Base/Nullifier/texBuffNullifyStackIcon.tif"; public const string texNullifierDiffuse = "RoR2/Base/Nullifier/texNullifierDiffuse.png"; public const string texNullifierDiffuse2 = "RoR2/Base/Nullifier/texNullifierDiffuse2.png"; public const string texNullifierEmission = "RoR2/Base/Nullifier/texNullifierEmission.png"; public const string texNullifierNormal = "RoR2/Base/Nullifier/texNullifierNormal.png"; public const string texNullifierSky = "RoR2/Base/Nullifier/texNullifierSky.png"; public const string texNullifierSky2 = "RoR2/Base/Nullifier/texNullifierSky2.png"; public const string texNullifierSky3Alpha = "RoR2/Base/Nullifier/texNullifierSky3Alpha.png"; public const string texNullifierSkySparse = "RoR2/Base/Nullifier/texNullifierSkySparse.png"; public const string ParentBody = "RoR2/Base/Parent/ParentBody.png"; public const string texParentDiffuse = "RoR2/Base/Parent/texParentDiffuse.png"; public const string texParentEmission = "RoR2/Base/Parent/texParentEmission.png"; public const string texParentEyeMask = "RoR2/Base/Parent/texParentEyeMask.png"; public const string texParentNormal = "RoR2/Base/Parent/texParentNormal.png"; public const string RoboBallBossBody = "RoR2/Base/RoboBallBoss/RoboBallBossBody.png"; public const string RoboBallMiniBody = "RoR2/Base/RoboBallBoss/RoboBallMiniBody.png"; public const string SuperRoboBallBossBody = "RoR2/Base/RoboBallBoss/SuperRoboBallBossBody.png"; public const string texBuffEngiShieldIcon = "RoR2/Base/RoboBallBoss/texBuffEngiShieldIcon.tif"; public const string ScavBody = "RoR2/Base/Scav/ScavBody.png"; public const string texScavBackpackDiffuse = "RoR2/Base/Scav/texScavBackpackDiffuse.png"; public const string texScavBackpackNormal = "RoR2/Base/Scav/texScavBackpackNormal.png"; public const string texScavDiffuse = "RoR2/Base/Scav/texScavDiffuse.png"; public const string texScavEyeDiffuse = "RoR2/Base/Scav/texScavEyeDiffuse.png"; public const string texScavEyeMask = "RoR2/Base/Scav/texScavEyeMask.png"; public const string texScavEyeNormal = "RoR2/Base/Scav/texScavEyeNormal.png"; public const string texScavLunarDiffuse = "RoR2/Base/Scav/texScavLunarDiffuse.png"; public const string texScavNormal = "RoR2/Base/Scav/texScavNormal.png"; public const string ScavLunarBody = "RoR2/Base/ScavLunar/ScavLunarBody.png"; public const string ShopkeeperBody = "RoR2/Base/Shopkeeper/ShopkeeperBody.png"; public const string texNewtDiffuse = "RoR2/Base/Shopkeeper/texNewtDiffuse.png"; public const string texNewtJewlery = "RoR2/Base/Shopkeeper/texNewtJewlery.png"; public const string texNewtNormal = "RoR2/Base/Shopkeeper/texNewtNormal.png"; public const string texNewtShopkeeperArmMap = "RoR2/Base/Shopkeeper/texNewtShopkeeperArmMap.png"; public const string texNewtTattooMap = "RoR2/Base/Shopkeeper/texNewtTattooMap.png"; public const string texTitanAO = "RoR2/Base/Titan/texTitanAO.png"; public const string texTitanDiffuse = "RoR2/Base/Titan/texTitanDiffuse.png"; public const string texTitanNormals = "RoR2/Base/Titan/texTitanNormals.png"; public const string TitanBody = "RoR2/Base/Titan/TitanBody.png"; public const string TitanGoldBody = "RoR2/Base/Titan/TitanGoldBody.png"; public const string texToolbotSkillIcons = "RoR2/Base/Toolbot/texToolbotSkillIcons.png"; public const string texToolbotIcon = "RoR2/Base/Toolbot/texToolbotIcon.png"; public const string texTrimSheetConstruction2 = "RoR2/Base/Toolbot/texTrimSheetConstruction2.png"; public const string texTrimSheetConstructionAlt = "RoR2/Base/Toolbot/texTrimSheetConstructionAlt.png"; public const string texTrimSheetWoodDiffuse = "RoR2/Base/Toolbot/texTrimSheetWoodDiffuse.png"; public const string texRebarDiffuse = "RoR2/Base/Toolbot/texRebarDiffuse.png"; public const string texRebarNormal = "RoR2/Base/Toolbot/texRebarNormal.png"; public const string texRoboChunksDiffuse = "RoR2/Base/Toolbot/texRoboChunksDiffuse.png"; public const string texRoboChunksNormal = "RoR2/Base/Toolbot/texRoboChunksNormal.png"; public const string texToolbotBlades1 = "RoR2/Base/Toolbot/texToolbotBlades 1.png"; public const string texToolbotBlades = "RoR2/Base/Toolbot/texToolbotBlades.png"; public const string texToolbotNailMask = "RoR2/Base/Toolbot/texToolbotNailMask.png"; public const string texTreebotSkillIcons = "RoR2/Base/Treebot/texTreebotSkillIcons.png"; public const string texFSTreeBarkDiffuse = "RoR2/Base/Treebot/texFSTreeBarkDiffuse.tga"; public const string treebottreeAtlas = "RoR2/Base/Treebot/treebot tree_Atlas.tga"; public const string texBuffEntangleIcon = "RoR2/Base/Treebot/texBuffEntangleIcon.tif"; public const string texBuffFruiting = "RoR2/Base/Treebot/texBuffFruiting.tif"; public const string texTreebotFlowerDiffuse = "RoR2/Base/Treebot/texTreebotFlowerDiffuse.png"; public const string texTreebotFlowerDiffuse2 = "RoR2/Base/Treebot/texTreebotFlowerDiffuse2.png"; public const string texTreebotFlowerDiffuseAlt = "RoR2/Base/Treebot/texTreebotFlowerDiffuseAlt.png"; public const string texTreebotFlowerNormal = "RoR2/Base/Treebot/texTreebotFlowerNormal.png"; public const string texTreebotLeafAltDiffuse = "RoR2/Base/Treebot/texTreebotLeafAltDiffuse.png"; public const string texTreebotLeafAltNormal = "RoR2/Base/Treebot/texTreebotLeafAltNormal.png"; public const string texTreebotLeafDiffuse = "RoR2/Base/Treebot/texTreebotLeafDiffuse.png"; public const string texTreebotLeafDiffuse2 = "RoR2/Base/Treebot/texTreebotLeafDiffuse2.png"; public const string texTreebotLeafNormal = "RoR2/Base/Treebot/texTreebotLeafNormal.png"; public const string texTreebotTreeBarkDiffuse = "RoR2/Base/Treebot/texTreebotTreeBarkDiffuse.tga"; public const string TreebotBody = "RoR2/Base/Treebot/TreebotBody.png"; public const string texTreebotRoot1Mask = "RoR2/Base/Treebot/texTreebotRoot1Mask.png"; public const string texTreebotRoot1Normal = "RoR2/Base/Treebot/texTreebotRoot1Normal.png"; public const string texTreebotRoot2Mask = "RoR2/Base/Treebot/texTreebotRoot2Mask.png"; public const string texTreebotRoot2Normal = "RoR2/Base/Treebot/texTreebotRoot2Normal.png"; public const string texTreebotRoot3Mask = "RoR2/Base/Treebot/texTreebotRoot3Mask.png"; public const string texTreebotRoot3Normal = "RoR2/Base/Treebot/texTreebotRoot3Normal.png"; public const string texBuffWeakIcon = "RoR2/Base/Treebot/texBuffWeakIcon.tif"; public const string texVagrantDiffuse = "RoR2/Base/Vagrant/texVagrantDiffuse.png"; public const string texVagrantEmission = "RoR2/Base/Vagrant/texVagrantEmission.png"; public const string texVagrantNormal = "RoR2/Base/Vagrant/texVagrantNormal.png"; public const string texVagrantTentacleMask = "RoR2/Base/Vagrant/texVagrantTentacleMask.png"; public const string VagrantBody = "RoR2/Base/Vagrant/VagrantBody.png"; public const string texVultureAO = "RoR2/Base/Vulture/texVultureAO.png"; public const string texVultureDiffuse = "RoR2/Base/Vulture/texVultureDiffuse.png"; public const string texVultureNormal = "RoR2/Base/Vulture/texVultureNormal.png"; public const string texVultureSingleFeatherDiffuse = "RoR2/Base/Vulture/texVultureSingleFeatherDiffuse.png"; public const string texVultureSingleFeatherDiffuse2 = "RoR2/Base/Vulture/texVultureSingleFeatherDiffuse2.png"; public const string texVultureSingleFeatherDiffuse3 = "RoR2/Base/Vulture/texVultureSingleFeatherDiffuse3.png"; public const string texVultureSingleFeatherDiffuse4 = "RoR2/Base/Vulture/texVultureSingleFeatherDiffuse4.png"; public const string texVultureSingleFeatherDiffuse5 = "RoR2/Base/Vulture/texVultureSingleFeatherDiffuse5.png"; public const string texVultureSingleFeatherNormal = "RoR2/Base/Vulture/texVultureSingleFeatherNormal.png"; public const string texVultureTestDiffuse1 = "RoR2/Base/Vulture/texVultureTestDiffuse 1.png"; public const string texVultureTestDiffuse2 = "RoR2/Base/Vulture/texVultureTestDiffuse 2.png"; public const string texVultureTestDiffuse = "RoR2/Base/Vulture/texVultureTestDiffuse.png"; public const string texVultureTileFeatherDiffuse = "RoR2/Base/Vulture/texVultureTileFeatherDiffuse.png"; public const string texVultureTileFeatherNormal = "RoR2/Base/Vulture/texVultureTileFeatherNormal.png"; public const string VultureBody = "RoR2/Base/Vulture/VultureBody.png"; public const string texWisp1AO = "RoR2/Base/Wisp/texWisp1AO.png"; public const string WispBody = "RoR2/Base/Wisp/WispBody.png"; public const string texBuffBleedingIcon = "RoR2/Base/Common/texBuffBleedingIcon.tif"; public const string texBuffCloakIcon = "RoR2/Base/Common/texBuffCloakIcon.tif"; public const string texBuffCrippleIcon = "RoR2/Base/Common/texBuffCrippleIcon.tif"; public const string texBuffOnFireIcon = "RoR2/Base/Common/texBuffOnFireIcon.tif"; public const string texBuffSlow50Icon = "RoR2/Base/Common/texBuffSlow50Icon.tif"; public const string texBuffGenericShield = "RoR2/Base/Common/texBuffGenericShield.tif"; public const string texMovespeedBuffIcon = "RoR2/Base/Common/texMovespeedBuffIcon.tif"; public const string texCloudCaustic1 = "RoR2/Base/Common/texCloudCaustic1.jpg"; public const string texCloudCaustic2 = "RoR2/Base/Common/texCloudCaustic2.png"; public const string texCloudCaustic3 = "RoR2/Base/Common/texCloudCaustic3.jpg"; public const string texCloudGradient = "RoR2/Base/Common/texCloudGradient.png"; public const string texCloudWaterFoam1 = "RoR2/Base/Common/texCloudWaterFoam1.jpg"; public const string texCloudWaterFoam2 = "RoR2/Base/Common/texCloudWaterFoam2.psd"; public const string texBehemothRamp = "RoR2/Base/Common/ColorRamps/texBehemothRamp.png"; public const string texClayGooRamp = "RoR2/Base/Common/ColorRamps/texClayGooRamp.png"; public const string texClayGooSiphonRamp = "RoR2/Base/Common/ColorRamps/texClayGooSiphonRamp.png"; public const string texDustRamp = "RoR2/Base/Common/ColorRamps/texDustRamp.png"; public const string texFogRamp1 = "RoR2/Base/Common/ColorRamps/texFogRamp1.png"; public const string texFogRampPurple = "RoR2/Base/Common/ColorRamps/texFogRampPurple.png"; public const string texFogRampTest = "RoR2/Base/Common/ColorRamps/texFogRampTest.png"; public const string texHippoRezRamp = "RoR2/Base/Common/ColorRamps/texHippoRezRamp.png"; public const string texLunarWispTracer1 = "RoR2/Base/Common/ColorRamps/texLunarWispTracer 1.png"; public const string texMagmaFireball = "RoR2/Base/Common/ColorRamps/texMagmaFireball.png"; public const string texRampAncientWisp = "RoR2/Base/Common/ColorRamps/texRampAncientWisp.png"; public const string texRampAntler = "RoR2/Base/Common/ColorRamps/texRampAntler.png"; public const string texRampArcaneCircle = "RoR2/Base/Common/ColorRamps/texRampArcaneCircle.png"; public const string texRampArchWisp = "RoR2/Base/Common/ColorRamps/texRampArchWisp.png"; public const string texRampAreaIndicator = "RoR2/Base/Common/ColorRamps/texRampAreaIndicator.png"; public const string texRampArmorReduction = "RoR2/Base/Common/ColorRamps/texRampArmorReduction.png"; public const string texRampArtifactShellSoft = "RoR2/Base/Common/ColorRamps/texRampArtifactShellSoft.png"; public const string texRampBandit = "RoR2/Base/Common/ColorRamps/texRampBandit.png"; public const string texRampBanditAlt = "RoR2/Base/Common/ColorRamps/texRampBanditAlt.png"; public const string texRampBanditSlash = "RoR2/Base/Common/ColorRamps/texRampBanditSlash.png"; public const string texRampBanditSmokescreen = "RoR2/Base/Common/ColorRamps/texRampBanditSmokescreen.png"; public const string texRampBanditSplatter = "RoR2/Base/Common/ColorRamps/texRampBanditSplatter.png"; public const string texRampBanditSplatterAlt = "RoR2/Base/Common/ColorRamps/texRampBanditSplatterAlt.png"; public const string texRampBeamLightning = "RoR2/Base/Common/ColorRamps/texRampBeamLightning.png"; public const string texRampBeamSphere = "RoR2/Base/Common/ColorRamps/texRampBeamSphere.png"; public const string texRampBeetleBreath = "RoR2/Base/Common/ColorRamps/texRampBeetleBreath.png"; public const string texRampBeetleQueen = "RoR2/Base/Common/ColorRamps/texRampBeetleQueen.png"; public const string texRampBeetleQueen2 = "RoR2/Base/Common/ColorRamps/texRampBeetleQueen2.png"; public const string texRampBell = "RoR2/Base/Common/ColorRamps/texRampBell.png"; public const string texRampBirdHeart = "RoR2/Base/Common/ColorRamps/texRampBirdHeart.png"; public const string texRampBombOrb = "RoR2/Base/Common/ColorRamps/texRampBombOrb.png"; public const string texRampBrotherPillar = "RoR2/Base/Common/ColorRamps/texRampBrotherPillar.png"; public const string texRampCaptainAirstrike = "RoR2/Base/Common/ColorRamps/texRampCaptainAirstrike.png"; public const string texRampCaptainBodyArmor = "RoR2/Base/Common/ColorRamps/texRampCaptainBodyArmor.png"; public const string texRampCaptainDefenseMatrix = "RoR2/Base/Common/ColorRamps/texRampCaptainDefenseMatrix.png"; public const string texRampCaptainDefenseMatrixSoft = "RoR2/Base/Common/ColorRamps/texRampCaptainDefenseMatrixSoft.png"; public const string texRampClaySwordSwing = "RoR2/Base/Common/ColorRamps/texRampClaySwordSwing.png"; public const string texRampCloth = "RoR2/Base/Common/ColorRamps/texRampCloth.jpg"; public const string texRampCompositeLight = "RoR2/Base/Common/ColorRamps/texRampCompositeLight.psd"; public const string texRampCrippleWard = "RoR2/Base/Common/ColorRamps/texRampCrippleWard.png"; public const string texRampCrocoDisease = "RoR2/Base/Common/ColorRamps/texRampCrocoDisease.png"; public const string texRampCrocoDiseaseDark = "RoR2/Base/Common/ColorRamps/texRampCrocoDiseaseDark.png"; public const string texRampCrowbar = "RoR2/Base/Common/ColorRamps/texRampCrowbar.png"; public const string texRampDeathmark = "RoR2/Base/Common/ColorRamps/texRampDeathmark.png"; public const string texRampDeathProjectile = "RoR2/Base/Common/ColorRamps/texRampDeathProjectile.png"; public const string texRampDefault = "RoR2/Base/Common/ColorRamps/texRampDefault.png"; public const string texRampDefaultNoTransparency = "RoR2/Base/Common/ColorRamps/texRampDefaultNoTransparency.png"; public const string texRampDiamondLaser = "RoR2/Base/Common/ColorRamps/texRampDiamondLaser.png"; public const string texRampDroneFire = "RoR2/Base/Common/ColorRamps/texRampDroneFire.png"; public const string texRampDroneFire2 = "RoR2/Base/Common/ColorRamps/texRampDroneFire2.png"; public const string texRampEliteLunar = "RoR2/Base/Common/ColorRamps/texRampEliteLunar.png"; public const string texRampElitePoison = "RoR2/Base/Common/ColorRamps/texRampElitePoison.png"; public const string texRampElitePoison2 = "RoR2/Base/Common/ColorRamps/texRampElitePoison2.png"; public const string texRampElites = "RoR2/Base/Common/ColorRamps/texRampElites.psd"; public const string texRampEngi = "RoR2/Base/Comm
plugins/GuestUnion.GenericExtensions.dll
Decompiled 11 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("GuestUnion.GenericExtensions")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+eb843446fb06e971bdf3cecc5e0ab04c9f29ae41")] [assembly: AssemblyProduct("GuestUnion.GenericExtensions")] [assembly: AssemblyTitle("GuestUnion.GenericExtensions")] [assembly: AssemblyVersion("1.0.0.0")] 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 GuestUnion { public static class ArrayExtensions { public static bool TrueForAll<T>(this T[] array, Predicate<T> match) { return Array.TrueForAll(array, match); } public static int FindIndex<T>(this T[] array, Predicate<T> match) { return Array.FindIndex(array, match); } public static int FindLastIndex<T>(this T[] array, Predicate<T> match) { return Array.FindLastIndex(array, match); } public static int IndexOf<T>(this T[] array, T value) { return Array.IndexOf(array, value); } public static int LastIndexOf<T>(this T[] array, T value) { return Array.LastIndexOf(array, value); } public static T Find<T>(this T[] array, Predicate<T> match) { return Array.Find(array, match); } public static T FindLast<T>(this T[] array, Predicate<T> match) { return Array.FindLast(array, match); } public static T[] FindAll<T>(this T[] array, Predicate<T> match) { return Array.FindAll(array, match); } public static TOutput[] ConvertAll<TInput, TOutput>(this TInput[] array, Converter<TInput, TOutput> converter) { return Array.ConvertAll(array, converter); } public static void BinarySearch<T>(this T[] array, T value) { Array.BinarySearch(array, value); } public static void BinarySearch<T>(this T[] array, T value, IComparer<T> comparer) { Array.BinarySearch(array, value, comparer); } public static void Clear<T>(this T[] array) { Array.Clear(array, 0, array.Length); } public static void Fill<T>(this T[] array, T value) { Array.Fill(array, value); } public static void ForEach<T>(this T[] array, Action<T> action) { Array.ForEach(array, action); } public static void Reverse<T>(this T[] array) { Array.Reverse(array); } public static void Sort<T>(this T[] array) { Array.Sort(array); } public static void Sort<T>(this T[] array, IComparer<T> comparer) { Array.Sort(array, comparer); } } public static class CollectionExtensions { public static bool IsNullOrEmpty<T>(this ICollection<T> collection) { if (collection != null) { return collection.Count == 0; } return true; } } public static class DoubleExtensions { public static double Abs(this double value) { if (!(value < 0.0)) { return value; } return 0.0 - value; } public static double Clamp(this double value, double min, double max) { if (!(value < min)) { if (!(value > max)) { return value; } return max; } return min; } public static double Clamp01(this double value) { if (!(value < 0.0)) { if (!(value > 1.0)) { return value; } return 1.0; } return 0.0; } public static double LerpTo(this double from, double to, double t) { return from + (to - from) * t.Clamp01(); } public static double LerpToUnclamped(this double from, double to, double t) { return from + (to - from) * t; } public static double MoveTowards(this double from, double to, double maxDelta) { double num = to - from; if (!(num >= 0.0)) { if (!(0.0 - num <= maxDelta)) { return from - maxDelta; } return to; } if (!(num <= maxDelta)) { return from + maxDelta; } return to; } public static double NormalizeAngle(this double angle) { if (!(angle < 0.0)) { return angle % 360.0; } return angle % 360.0 + 360.0; } public static double NormalizeAngleOne360(this double angle) { if (!(angle < 0.0)) { if (!(angle > 360.0)) { return angle; } return angle - 360.0; } return angle + 360.0; } } public static class Int32Extensions { public static int Abs(this int value) { if (value >= 0) { return value; } return -value; } public static int Clamp(this int value, int min, int max) { if (value >= min) { if (value <= max) { return value; } return max; } return min; } public static bool HasFlag(this int value, int flag) { return (value & flag) == flag; } } public static class SingleExtensions { public static float Abs(this float value) { if (!(value < 0f)) { return value; } return 0f - value; } public static float Clamp(this float value, float min, float max) { if (!(value < min)) { if (!(value > max)) { return value; } return max; } return min; } public static float Clamp01(this float value) { if (!(value < 0f)) { if (!(value > 1f)) { return value; } return 1f; } return 0f; } public static float LerpTo(this float from, float to, float t) { return from + (to - from) * t.Clamp01(); } public static float LerpToUnclamped(this float from, float to, float t) { return from + (to - from) * t; } public static float MoveTowards(this float from, float to, float maxDelta) { float num = to - from; if (!(num >= 0f)) { if (!(0f - num <= maxDelta)) { return from - maxDelta; } return to; } if (!(num <= maxDelta)) { return from + maxDelta; } return to; } public static float NormalizeAngle(this float angle) { if (!(angle < 0f)) { return angle % 360f; } return angle % 360f + 360f; } public static float NormalizeAngleOne360(this float angle) { if (!(angle < 0f)) { if (!(angle > 360f)) { return angle; } return angle - 360f; } return angle + 360f; } } public static class StringBuilderExtensions { private static readonly Stack<StringBuilder> pool = new Stack<StringBuilder>(); public static StringBuilder ToStringBuilder<T>(this ref T obj) where T : struct { if (!pool.TryPop(out StringBuilder result)) { result = new StringBuilder(); } return result.Append(obj.ToString()); } public static StringBuilder ToStringBuilder<T>(this T obj) where T : class { if (!pool.TryPop(out StringBuilder result)) { result = new StringBuilder(); } return result.Append(obj); } public static string ToStringAndReturn(this StringBuilder sb) { if (sb == null) { return string.Empty; } string result = sb.ToString(); pool.Push(sb.Clear()); return result; } } public static class StringExtensions { public static bool IsNullOrEmpty(this string s) { if (s != null) { return s.Length == 0; } return true; } public static bool IsNullOrWhiteSpace(this string s) { if (s == null) { return true; } ReadOnlySpan<char> readOnlySpan = s.AsSpan(); for (int i = 0; i < readOnlySpan.Length; i++) { if (!char.IsWhiteSpace(readOnlySpan[i])) { return false; } } return true; } } }
plugins/GuestUnion.ObjectPool.dll
Decompiled 11 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("GuestUnion.ObjectPool")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+eb843446fb06e971bdf3cecc5e0ab04c9f29ae41")] [assembly: AssemblyProduct("GuestUnion.ObjectPool")] [assembly: AssemblyTitle("GuestUnion.ObjectPool")] [assembly: AssemblyVersion("1.0.0.0")] 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 GuestUnion.ObjectPool { public interface IPool<T> where T : class { T Rent(); bool Return(T value); } public struct PooledObjectScope<T> : IDisposable where T : class { private readonly IPool<T> _pool; private T? _buffer; public readonly T? Buffer => _buffer; public PooledObjectScope(IPool<T> pool, T? buffer) { _pool = pool; _buffer = buffer; } public void Dispose() { if (_buffer != null) { _pool.Return(_buffer); _buffer = null; } } } } namespace GuestUnion.ObjectPool.Generic { public struct CollectionScope<TCollection, TElement> : IDisposable where TCollection : class, ICollection<TElement> { private readonly IPool<TCollection> _pool; private TCollection? _collection; public readonly TCollection? Collection => _collection; public CollectionScope(IPool<TCollection> pool, TCollection? collection) { if (pool == null) { throw new ArgumentNullException("pool"); } _pool = pool; _collection = collection; } public void Dispose() { if (_collection != null) { _collection.Clear(); _pool.Return(_collection); _collection = null; } } } public class DictionaryPool<TKey, TValue> : GenericPool<Dictionary<TKey, TValue>> { public static readonly DictionaryPool<TKey, TValue> shared = new DictionaryPool<TKey, TValue>(); public static CollectionScope<Dictionary<TKey, TValue>, KeyValuePair<TKey, TValue>> Rent(out Dictionary<TKey, TValue> dictionary) { dictionary = shared.Rent(); return new CollectionScope<Dictionary<TKey, TValue>, KeyValuePair<TKey, TValue>>(shared, dictionary); } public DictionaryPool() : base((ushort)16) { } } public class GenericPool<T> : IPool<T>, IDisposable where T : class, new() { public ushort capacity; private readonly Stack<T> pool; public GenericPool(ushort capacity = 16) { pool = new Stack<T>(capacity); } public T Rent() { if (!pool.TryPop(out var result)) { return new T(); } return result; } public bool Return(T value) { if (value != null && pool.Count < capacity) { pool.Push(value); return true; } return false; } public void Clear() { pool.Clear(); } void IDisposable.Dispose() { Clear(); } } public class HashSetPool<T> : GenericPool<HashSet<T>> { public static readonly HashSetPool<T> shared = new HashSetPool<T>(); public static CollectionScope<HashSet<T>, T> Rent(out HashSet<T> set) { set = shared.Rent(); return new CollectionScope<HashSet<T>, T>(shared, set); } public HashSetPool() : base((ushort)16) { } } public class ListPool<T> : GenericPool<List<T>> { public static readonly ListPool<T> shared = new ListPool<T>(); public static CollectionScope<List<T>, T> Rent(out List<T> list) { list = shared.Rent(); return new CollectionScope<List<T>, T>(shared, list); } public ListPool() : base((ushort)16) { } } public class QueuePool<T> : GenericPool<Queue<T>> { public static readonly QueuePool<T> shared = new QueuePool<T>(); public QueuePool() : base((ushort)16) { } } public class StackPool<T> : GenericPool<Stack<T>> { public static readonly StackPool<T> shared = new StackPool<T>(); public StackPool() : base((ushort)16) { } } }
plugins/GuestUnion.UnityExtensions.dll
Decompiled 11 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using GuestUnion.ObjectPool.Generic; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("GuestUnion.UnityExtensions")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+eb843446fb06e971bdf3cecc5e0ab04c9f29ae41")] [assembly: AssemblyProduct("GuestUnion.UnityExtensions")] [assembly: AssemblyTitle("GuestUnion.UnityExtensions")] [assembly: AssemblyVersion("1.0.0.0")] 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 GuestUnion { public static class GameObjectExtensions { public static void RemoveComponent<T>(this GameObject gameObject) where T : Component { T val = default(T); if (gameObject.TryGetComponent<T>(ref val)) { Object.Destroy((Object)(object)val); } } public static void RemoveComponents<T>(this GameObject gameObject) where T : Component { //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) List<T> list = default(List<T>); CollectionScope<List<T>, T> val = ListPool<T>.Rent(ref list); try { gameObject.GetComponents<T>(list); foreach (T item in list) { Object.Destroy((Object)(object)item); } } finally { ((IDisposable)val).Dispose(); } } } public static class QuaternionExtensions { public static Quaternion ApplySpread(this in Quaternion rotation, float pitchAngle, float yawAngle) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //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_0010: 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) Vector3 lhs = rotation * Vector3.forward; Vector3 rhs = rotation * Vector3.up; Vector3 val = lhs.Cross(in rhs); Vector3 rhs2 = ((SingleExtensions.Abs(yawAngle) > Mathf.Epsilon) ? (Quaternion.AngleAxis(yawAngle, rhs) * val) : val); Vector3 lhs2 = ((SingleExtensions.Abs(pitchAngle) > Mathf.Epsilon) ? (Quaternion.AngleAxis(pitchAngle, val) * rhs) : rhs); return Quaternion.LookRotation(lhs2.Cross(in rhs2), rhs); } public static Quaternion ApplySpread2(this Quaternion rotation, float pitchAngle, float rollAngle) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_004c: 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_0056: Unknown result type (might be due to invalid IL or missing references) Vector3 lhs = rotation * Vector3.forward; if (SingleExtensions.Abs(rollAngle) > Mathf.Epsilon) { rotation *= Quaternion.AngleAxis(rollAngle, lhs); } if (SingleExtensions.Abs(pitchAngle) > Mathf.Epsilon) { Quaternion val = rotation; Vector3 rhs = rotation * Vector3.up; rotation = val * Quaternion.AngleAxis(pitchAngle, lhs.Cross(in rhs)); } return rotation; } } public static class Vector3Extensions { public static float Dot(this in Vector3 lhs, in Vector3 rhs) { return lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z; } public static Vector3 Cross(this in Vector3 lhs, in Vector3 rhs) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) return new Vector3(lhs.y * rhs.z - lhs.z * rhs.y, lhs.z * rhs.x - lhs.x * rhs.z, lhs.x * rhs.y - lhs.y * rhs.x); } public static Vector3 LerpTo(this in Vector3 from, in Vector3 to, float t) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) t = Mathf.Clamp01(t); return new Vector3(from.x + (to.x - from.x) * t, from.y + (to.y - from.y) * t, from.z + (to.z - from.z) * t); } public static Vector3 MoveTowords(this in Vector3 current, in Vector3 target, float maxDistanceDelta) { //IL_004d: 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) float num = target.x - current.x; float num2 = target.y - current.y; float num3 = target.z - current.z; float num4 = num * num + num2 * num2 + num3 * num3; if (num4 < Mathf.Epsilon || (maxDistanceDelta > Mathf.Epsilon && num4 <= maxDistanceDelta * maxDistanceDelta)) { return target; } float num5 = (float)Math.Sqrt(num4); return new Vector3(current.x + num / num5 * maxDistanceDelta, current.y + num2 / num5 * maxDistanceDelta, current.z + num3 / num5 * maxDistanceDelta); } public static Vector3 Project(this in Vector3 vector, in Vector3 onNormal) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Vector3 val = onNormal; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < Mathf.Epsilon) { return Vector3.zero; } float num = vector.Dot(in onNormal); return new Vector3(onNormal.x * num / sqrMagnitude, onNormal.y * num / sqrMagnitude, onNormal.z * num / sqrMagnitude); } public static Vector3 ProjectOnPlane(this in Vector3 vector, in Vector3 planeNormal) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_0018: Unknown result type (might be due to invalid IL or missing references) Vector3 val = planeNormal; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < Mathf.Epsilon) { return vector; } float num = vector.Dot(in planeNormal); return new Vector3(vector.x - planeNormal.x * num / sqrMagnitude, vector.y - planeNormal.y * num / sqrMagnitude, vector.z - planeNormal.z * num / sqrMagnitude); } public static float Sum(this in Vector3 vector3) { return vector3.x + vector3.y + vector3.z; } public static Vector3 ApplySpread(this in Vector3 direction, in Vector3 upwards, float horizontal, float vertical) { //IL_000a: 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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_005b: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (horizontal > Mathf.Epsilon) { Vector3 val = Quaternion.AngleAxis(horizontal, upwards) * direction; if (vertical > Mathf.Epsilon) { Vector3 rhs = Vector3.up; val = Quaternion.AngleAxis(vertical, direction.Cross(in rhs)) * val; } return val; } if (vertical > Mathf.Epsilon) { return Quaternion.AngleAxis(vertical, direction.Cross(in upwards)) * direction; } return direction; } } }