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 Scales of the Asclepius v1.0.4
ScalesAsclepius.dll
Decompiled 5 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HG; using HG.Reflection; using Microsoft.CodeAnalysis; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using RoR2; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.UI; using RoR2BepInExPack.GameAssetPathsBetter; using ShaderSwapper; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ScalesAsclepius")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+3ae453130dc65bba526ba0a993067cafa0ebae34")] [assembly: AssemblyProduct("ScalesAsclepius")] [assembly: AssemblyTitle("ScalesAsclepius")] [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 ScalesAsclepius { public abstract class BuffBase : GenericBase<BuffDef> { protected virtual Color Color => Color.white; protected virtual Sprite IconSprite => null; protected virtual bool IsCooldown => false; protected virtual bool IsDebuff => false; protected virtual bool IsHidden => false; protected virtual bool IsStackable => false; protected override void Create() { //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) Value = ScriptableObject.CreateInstance<BuffDef>(); ((Object)Value).name = $"bd{Name}"; Value.buffColor = Color; Value.iconSprite = IconSprite; Value.isCooldown = IsCooldown; Value.isDebuff = IsDebuff; Value.isHidden = IsHidden; Value.canStack = IsStackable; ContentAddition.AddBuffDef(Value); } } public abstract class GenericBase<T> where T : Object { protected T Value; protected abstract string Name { get; } public GenericBase() { if (IsEnabled()) { Create(); Initialize(); } } protected virtual bool IsEnabled() { return true; } protected virtual void Create() { } protected virtual void Initialize() { } public T Get() { return Value; } } public abstract class ItemBase : GenericBase<ItemDef> { protected virtual bool IsConsumed => false; protected virtual bool IsRemovable => false; protected virtual bool IsHidden => false; protected virtual GameObject PickupModelPrefab => null; protected virtual Sprite PickupIconSprite => null; protected virtual ItemTag[] Tags => Array.Empty<ItemTag>(); protected virtual CombinedItemTier Tier => (ItemTier)5; protected virtual string DisplayName => null; protected virtual string Description => null; protected virtual string PickupText => null; protected virtual string Lore => null; protected virtual ItemDisplayRuleDict ItemDisplay() { return null; } protected override void Create() { //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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown Value = ScriptableObject.CreateInstance<ItemDef>(); ((Object)Value).name = Name; Value.isConsumed = IsConsumed; Value.canRemove = IsRemovable; Value.hidden = IsHidden; Value.pickupModelPrefab = PickupModelPrefab; Value.pickupIconSprite = PickupIconSprite; Value.tags = Tags; Value._itemTierDef = Tier; Value.deprecatedTier = Tier; if (Object.op_Implicit((Object)(object)Value)) { Value.AutoPopulateTokens(); if (!string.IsNullOrWhiteSpace(DisplayName)) { Value.nameToken = SALanguage.LanguageAdd(Value.nameToken, DisplayName); } if (!string.IsNullOrWhiteSpace(Description)) { Value.descriptionToken = SALanguage.LanguageAdd(Value.descriptionToken, Description); } if (!string.IsNullOrWhiteSpace(PickupText)) { Value.pickupToken = SALanguage.LanguageAdd(Value.pickupToken, PickupText); } if (!string.IsNullOrWhiteSpace(Lore)) { Value.loreToken = SALanguage.LanguageAdd(Value.loreToken, Lore); } LogDisplay(); } ItemAPI.Add(new CustomItem(Value, ItemDisplay())); } protected virtual void LogDisplay() { } } public class FloatingPointFix : MonoBehaviour { private Transform transformComponent; private ModelPanelParameters modelComponent; public float sizeModifier; private void Awake() { transformComponent = ((Component)this).GetComponent<Transform>(); modelComponent = ((Component)this).GetComponent<ModelPanelParameters>(); } private void Start() { //IL_0045: 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) if (Object.op_Implicit((Object)(object)transformComponent) && Object.op_Implicit((Object)(object)modelComponent) && SceneCatalog.currentSceneDef.cachedName == "logbook") { Transform obj = transformComponent; obj.localScale *= sizeModifier; ModelPanelParameters obj2 = modelComponent; obj2.maxDistance *= sizeModifier; ModelPanelParameters obj3 = modelComponent; obj3.minDistance *= sizeModifier; } } } public struct CombinedItemTier { public ItemTierDef ItemTierDef; public ItemTier ItemTier; public static implicit operator ItemTierDef(CombinedItemTier self) { return self.ItemTierDef; } public static implicit operator ItemTier(CombinedItemTier self) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return self.ItemTier; } public static implicit operator CombinedItemTier(ItemTier itemTier) { //IL_000b: 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) CombinedItemTier result = default(CombinedItemTier); result.ItemTier = itemTier; return result; } public static implicit operator CombinedItemTier(ItemTierDef itemTierDef) { CombinedItemTier result = default(CombinedItemTier); result.ItemTierDef = itemTierDef; return result; } } public static class PluginConfig { public enum MathProcess { Max, Min } public static ConfigEntry<bool> Enable_Logging; public static ConfigEntry<bool> Set_Default; public static ConfigEntry<int> Round_To; public static void Init() { GeneralInit(); } private static void GeneralInit() { string text = "! General !"; Enable_Logging = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(text, "Enable Logs", true, "[ True = Enables Logging | False = Disables Logging ]\nDisclaimer: Makes debugging harder when disabled"); Set_Default = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(text, "Default Configs", true, "[ True = Sets item configs to default (Except Item Enabled) | False = Configs can be changed ]\nUseful for when Default Values get updated"); Round_To = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<int>(text, "Item Stat Rounding", 0, "[ 0 = Whole | 1 = Tenths | 2 = Hundrenths | 3 = ... ]\nRounds item values to respective decimal point"); } public static ConfigEntry<T> PostConfig<T>(this ConfigEntry<T> config) { if (Set_Default.Value) { ((ConfigEntryBase)config).BoxedValue = ((ConfigEntryBase)config).DefaultValue; } return config; } public static ConfigEntry<float> PostConfig(this ConfigEntry<float> config, MathProcess capType, float capNum) { config = config.PostConfig<float>(); if (capType == MathProcess.Max) { ((ConfigEntryBase)config).BoxedValue = Mathf.Max((float)((ConfigEntryBase)config).BoxedValue, capNum); } else { ((ConfigEntryBase)config).BoxedValue = Mathf.Min((float)((ConfigEntryBase)config).BoxedValue, capNum); } return config; } public static ConfigEntry<int> PostConfig(this ConfigEntry<int> config, MathProcess capType, int capNum) { config = config.PostConfig<int>(); if (capType == MathProcess.Max) { ((ConfigEntryBase)config).BoxedValue = Mathf.Max((int)((ConfigEntryBase)config).BoxedValue, capNum); } else { ((ConfigEntryBase)config).BoxedValue = Mathf.Min((int)((ConfigEntryBase)config).BoxedValue, capNum); } return config; } } public class CompassFoundBuff : BuffBase { public static BuffDef BuffDef; protected override string Name => "CompassFoundBuff"; protected override Sprite IconSprite => SotAPlugin.Bundle.LoadAsset<Sprite>("texCompassBuff"); protected override Color Color => new Color(1f, 0f, 0f); protected override bool IsHidden => false; protected override void Initialize() { BuffDef = Value; } } public class HealFromDebuff : BuffBase { public static BuffDef BuffDef; protected override string Name => "HealFromDebuff"; protected override Sprite IconSprite => Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Medkit.texBuffMedkitHealIcon_tif).WaitForCompletion(); protected override Color Color => new Color(1f, 0.922f, 0.886f); protected override bool IsStackable => false; protected override void Initialize() { BuffDef = Value; } } public class GauzePadItem : ItemBase { public static ConfigEntry<bool> Item_Enabled; public static ConfigEntry<float> Heal_Amount; public static ConfigEntry<float> Heal_Amount_Stack; public static ConfigEntry<float> Duration; public static ConfigEntry<float> Duration_Stack; public static float Level_Scale = 0.2f; public static ItemDef ItemDef; protected override string Name => "GauzePad"; protected override CombinedItemTier Tier => (ItemTier)0; protected override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)31 }; protected override bool IsRemovable => true; protected override GameObject PickupModelPrefab => SotAPlugin.Bundle.LoadAsset<GameObject>("gauzePadModel"); protected override Sprite PickupIconSprite => SotAPlugin.Bundle.LoadAsset<Sprite>("gauzeIconRender"); protected override string DisplayName => "Gauze Pad"; protected override string Description { get { List<string> list = new List<string>(2); list.Add(string.Format("Increase base health regeneration ".Style(SAColors.FontColor.cIsHealing) + "by " + "{0} hp/s ".Style(SAColors.FontColor.cIsHealing) + "({1} hp/s per stack) ".Style(SAColors.FontColor.cStack).OptText(Heal_Amount_Stack.Value != 0f), SAUtils.RoundVal(Heal_Amount.Value), SAUtils.RoundVal(Heal_Amount_Stack.Value).SignVal())); list.Add(string.Format("for " + "{0}s ".Style(SAColors.FontColor.cIsUtility) + "({1}s per stack) ".Style(SAColors.FontColor.cStack).OptText(Duration_Stack.Value != 0f) + "when gaining a " + "debuff".Style(SAColors.FontColor.cIsDamage) + ".", SAUtils.RoundVal(Duration.Value), SAUtils.RoundVal(Duration_Stack.Value).SignVal())); return SAUtils.FuseText(list); } } protected override string PickupText => "Rapidly heal when afflicted with a debuff."; protected override bool IsEnabled() { Heal_Amount = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Regeneration Amount", 6f, "[ 6 = +6 hp/s | Regeneration Amount ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Heal_Amount_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Regeneration Amount Stack", 6f, "[ 6 = +6 hp/s | Regeneration Amount per Item Stack | 0 to Disable ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Duration = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Effect Duration", 3f, "[ 3 = 3s | Duration for Regeneration ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Duration_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Effect Duration Stack", 0f, "[ 1 = +1s | Duration for Regeneration per Item Stack | 0 to Disable ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Item_Enabled = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(DisplayName + " - Item", "Enable Item", true, "[ True = Enabled | False = Disabled ]"); return Item_Enabled.Value; } protected override void Initialize() { ItemDef = Value; ItemDef.requiredExpansion = SotAPlugin.ScalesAsclepiusExp; } protected override void LogDisplay() { //IL_0067: 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) ModelPanelParameters val = PickupModelPrefab.AddComponent<ModelPanelParameters>(); Transform child = PickupModelPrefab.transform.GetChild(0); if (Object.op_Implicit((Object)(object)child)) { val.focusPointTransform = child; val.cameraPositionTransform = child; val.minDistance = 1.25f; val.maxDistance = 6.25f; val.modelRotation = new Quaternion(0.01152916f, -0.5877523f, 0.045532152f, -0.80767643f); } } protected override ItemDisplayRuleDict ItemDisplay() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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) PickupModelPrefab.AddComponent<ItemDisplay>().rendererInfos = SAREnderHelpers.ItemDisplaySetup(PickupModelPrefab); ItemDisplayRuleDict val = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val.Add("CommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { followerPrefab = PickupModelPrefab, ruleType = (ItemDisplayRuleType)0, childName = "Head", localPos = new Vector3(0.09018f, 0.33654f, 0.08826f), localAngles = new Vector3(359.2535f, 256.1467f, 31.56238f), localScale = new Vector3(0.25f, 0.25f, 0.25f) } }); return val; } } public class CollectorsCompassItem : ItemBase { public static ConfigEntry<bool> Item_Enabled; public static ConfigEntry<int> InteractAmount; public static ConfigEntry<float> Health_Multiply; public static ConfigEntry<float> Health_Multiply_Stack; public static ConfigEntry<float> Speed_Multiply; public static ConfigEntry<float> Speed_Multiply_Stack; public static ItemDef ItemDef; protected override string Name => "CollectorsCompass"; protected override CombinedItemTier Tier => (ItemTier)2; protected override ItemTag[] Tags { get { ItemTag[] array = new ItemTag[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); return (ItemTag[])(object)array; } } protected override bool IsRemovable => true; protected override GameObject PickupModelPrefab => SotAPlugin.Bundle.LoadAsset<GameObject>("collectorsCompassModel"); protected override Sprite PickupIconSprite => SotAPlugin.Bundle.LoadAsset<Sprite>("collectorsCompassRender"); private static string ConfigName => "Collectors Compass"; protected override string DisplayName => "Collector's Compass"; protected override string Description { get { List<string> list = new List<string>(5); list.Add("At the " + "start of each stage".Style(SAColors.FontColor.cIsUtility) + ", " + "mark ".Style(SAColors.FontColor.cIsHealth) + "a random interactable. "); list.Add("Using a " + "marked ".Style(SAColors.FontColor.cIsHealth) + "interactable " + "marks ".Style(SAColors.FontColor.cIsHealth) + "another. "); list.Add(string.Format("Claiming " + "{0} marks ".Style(SAColors.FontColor.cIsHealth) + "reveals".Style(SAColors.FontColor.cIsUtility) + " all remaining interactables ", InteractAmount.Value)); list.Add(string.Format("and increases all allies " + "maximum health ".Style(SAColors.FontColor.cIsHealing) + "by " + "{0}% ".Style(SAColors.FontColor.cIsHealing) + "({1}% per stack) ".OptText(Health_Multiply_Stack.Value != 0f).Style(SAColors.FontColor.cStack), SAUtils.RoundVal(Health_Multiply.Value), SAUtils.RoundVal(Health_Multiply_Stack.Value).SignVal())); list.Add(string.Format("and " + "movement speed ".Style(SAColors.FontColor.cIsUtility) + "by " + "{0}%".Style(SAColors.FontColor.cIsUtility) + " ({1}% per stack)".OptText(Speed_Multiply_Stack.Value != 0f).Style(SAColors.FontColor.cStack) + ".", SAUtils.RoundVal(Speed_Multiply.Value), SAUtils.RoundVal(Speed_Multiply_Stack.Value).SignVal())); return SAUtils.FuseText(list); } } protected override string PickupText => $"Marks interactables, revealing all interactables and increases maximum health and speed after claiming {InteractAmount.Value}."; protected override bool IsEnabled() { InteractAmount = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<int>(ConfigName + " - Item", "Interact Amount", 3, "[ 3 = 3 | Interactables Found to Proc Item ]").PostConfig(PluginConfig.MathProcess.Max, 1); Health_Multiply = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(ConfigName + " - Item", "Health Multiply", 100f, "[ 100 = 100% | Max Health Increase on Buff ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Health_Multiply_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(ConfigName + " - Item", "Health Multiply Stack", 50f, "[ 50 = +50% | Max Health Increase on Buff per Item Stack ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Speed_Multiply = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(ConfigName + " - Item", "Speed Multiply", 15f, "[ 15 = 15% | Speed Increase on Buff ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Speed_Multiply_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(ConfigName + " - Item", "Speed Multiply Stack", 0f, "[ 15 = +15% | Speed Increase on Buff per Item Stack ]").PostConfig(PluginConfig.MathProcess.Max, 0f); Item_Enabled = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(ConfigName + " - Item", "Enable Item", true, "[ True = Enabled | False = Disabled ]"); return Item_Enabled.Value; } protected override void Initialize() { //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) ItemDef = Value; ItemDef.requiredExpansion = SotAPlugin.ScalesAsclepiusExp; MeshRenderer component = ((Component)ItemDef.pickupModelPrefab.transform.Find("mdlCompass")).GetComponent<MeshRenderer>(); Texture val = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampBandit_png).WaitForCompletion(); ((Renderer)component).sharedMaterial.SetTexture("_FresnelRamp", val); } protected override void LogDisplay() { //IL_0067: 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) ModelPanelParameters val = PickupModelPrefab.AddComponent<ModelPanelParameters>(); Transform child = PickupModelPrefab.transform.GetChild(0); if (Object.op_Implicit((Object)(object)child)) { val.focusPointTransform = child; val.cameraPositionTransform = child; val.minDistance = 1.25f; val.maxDistance = 6.25f; val.modelRotation = new Quaternion(0.01152916f, -0.5877523f, 0.045532152f, -0.80767643f); } } } public class IVBagItem : ItemBase { public static ConfigEntry<bool> Item_Enabled; public static ConfigEntry<int> Target_Count; public static ConfigEntry<int> Target_Count_Stack; public static ConfigEntry<float> Heal_Percent; public static ConfigEntry<float> Heal_Percent_Stack; public static ConfigEntry<float> Radius; public static ConfigEntry<float> Radius_Stack; public static ItemDef ItemDef; protected override string Name => "IVBag"; protected override CombinedItemTier Tier => (ItemTier)1; protected override ItemTag[] Tags { get { ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); return (ItemTag[])(object)array; } } protected override bool IsRemovable => true; protected override GameObject PickupModelPrefab => SotAPlugin.Bundle.LoadAsset<GameObject>("IVBagModel"); protected override Sprite PickupIconSprite => SotAPlugin.Bundle.LoadAsset<Sprite>("IVBagRender"); protected override string DisplayName => "IV Bag"; protected override string Description { get { List<string> list = new List<string>(3); list.Add(string.Format("Tether ".Style(SAColors.FontColor.cIsHealing) + "to the nearest {0} " + "({1} per stack) ".Style(SAColors.FontColor.cStack).OptText(Target_Count_Stack.Value != 0) + "allies ".OptText("ally ", Target_Count_Stack.Value != 0 || Target_Count.Value > 1), Target_Count.Value, Target_Count_Stack.Value.SignVal())); list.Add(string.Format("within " + "{0}m".Style(SAColors.FontColor.cIsUtility) + " ({1}m per stack)".Style(SAColors.FontColor.cStack).OptText(Radius_Stack.Value != 0f) + ", ", SAUtils.RoundVal(Radius.Value), SAUtils.RoundVal(Radius_Stack.Value).SignVal())); list.Add(string.Format("sharing " + "{0}% ".Style(SAColors.FontColor.cIsHealing) + "({1}% per stack) ".Style(SAColors.FontColor.cStack).OptText(Heal_Percent_Stack.Value != 0f) + "of " + "all healing".Style(SAColors.FontColor.cIsHealing) + ".", SAUtils.RoundVal(Heal_Percent.Value), SAUtils.RoundVal(Heal_Percent_Stack.Value).SignVal())); return SAUtils.FuseText(list); } } protected override string PickupText => "Tether to " + "a nearby ally".OptText("nearby allies", Target_Count.Value > 1) + ", sharing all healing."; protected override bool IsEnabled() { Target_Count = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<int>(DisplayName + " - Item", "Tether Count", 1, "[ 1 = 1 | Max Tether to Ally ]"); Target_Count_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<int>(DisplayName + " - Item", "Tether Count Stack", 1, "[ 1 = +1 | Max Tether to Ally per Item Stack | 0 to Disable ]"); Heal_Percent = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Healing Shared", 50f, "[ 50 = 50% | Healing Shared to Tethered Ally ]"); Heal_Percent_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Healing Shared Stack", 0f, "[ 50 = +50% | Healing Shared per Item Stack | 0 to Disable ]"); Radius = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Radius", 30f, "[ 30 = 30 | Meter Radius ]"); Radius_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Radius Stack", 0f, "[ 10 = +10 | Meter Radius per Item Stack | 0 to Disable ]"); Item_Enabled = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(DisplayName + " - Item", "Enable Item", true, "[ True = Enabled | False = Disabled ]"); Target_Count.Value = Mathf.Max(Target_Count.Value, 0); Target_Count_Stack.Value = Mathf.Max(Target_Count_Stack.Value, 0); Heal_Percent.Value = Mathf.Max(Heal_Percent.Value, 0f); Heal_Percent_Stack.Value = Mathf.Max(Heal_Percent_Stack.Value, 0f); Radius.Value = Mathf.Max(Radius.Value, 0f); Radius_Stack.Value = Mathf.Max(Radius_Stack.Value, 0f); return Item_Enabled.Value; } protected override void Initialize() { ItemDef = Value; ItemDef.requiredExpansion = SotAPlugin.ScalesAsclepiusExp; } protected override void LogDisplay() { //IL_0067: 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) ModelPanelParameters val = PickupModelPrefab.AddComponent<ModelPanelParameters>(); Transform child = PickupModelPrefab.transform.GetChild(0); if (Object.op_Implicit((Object)(object)child)) { val.focusPointTransform = child; val.cameraPositionTransform = child; val.minDistance = 1.25f; val.maxDistance = 6.25f; val.modelRotation = new Quaternion(0.01152916f, -0.5877523f, 0.045532152f, -0.80767643f); FloatingPointFix floatingPointFix = PickupModelPrefab.AddComponent<FloatingPointFix>(); floatingPointFix.sizeModifier = 1f; } } } public class PottingSoilItem : ItemBase { public static ConfigEntry<bool> Item_Enabled; public static ItemDef ItemDef; protected override string Name => "PottingSoil"; protected override CombinedItemTier Tier => (ItemTier)1; protected override ItemTag[] Tags { get { ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); return (ItemTag[])(object)array; } } protected override bool IsRemovable => true; protected override string DisplayName => "Potting Soil"; protected override bool IsEnabled() { Item_Enabled = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(DisplayName + " - Item", "Enable Item", false, "[ True = Enabled | False = Disabled ]"); return Item_Enabled.Value; } protected override void Initialize() { ItemDef = Value; ItemDef.requiredExpansion = SotAPlugin.ScalesAsclepiusExp; } } public class BubbleWrapItem : ItemBase { public static ConfigEntry<bool> Item_Enabled; public static ConfigEntry<float> Heal_Percent; public static ConfigEntry<float> Heal_Percent_Stack; public static ConfigEntry<float> Debuff_Reduce; public static ConfigEntry<float> Debuff_Reduce_Stack; private static readonly string VoidCorruptText = "Corrupts all Gauze Pads".Style(SAColors.FontColor.cIsVoid) + "."; public static ItemDef ItemDef; protected override string Name => "BubbleWrap"; protected override CombinedItemTier Tier => (ItemTier)6; protected override ItemTag[] Tags => (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)31 }; protected override GameObject PickupModelPrefab => SotAPlugin.Bundle.LoadAsset<GameObject>("bubbleWrapModel"); protected override Sprite PickupIconSprite => SotAPlugin.Bundle.LoadAsset<Sprite>("bubbleIconRender"); protected override string DisplayName => "Bubble Wrap"; protected override string Description { get { List<string> list = new List<string>(3); list.Add(string.Format("Reduce all " + "debuff ".Style(SAColors.FontColor.cIsDamage) + "durations by " + "{0} ".Style(SAColors.FontColor.cIsUtility) + "({1} per stack) ".Style(SAColors.FontColor.cStack).OptText(Debuff_Reduce_Stack.Value != 0f) + "second" + "s".OptText(Debuff_Reduce_Stack.Value != 0f || Debuff_Reduce.Value > 1f) + ". ", SAUtils.RoundVal(Debuff_Reduce.Value), SAUtils.RoundVal(Debuff_Reduce_Stack.Value).SignVal())); list.Add(string.Format("Heal ".Style(SAColors.FontColor.cIsHealing) + "for " + "{0}% ".Style(SAColors.FontColor.cIsHealing) + "({1}% per stack) ".Style(SAColors.FontColor.cStack).OptText(Heal_Percent_Stack.Value != 0f) + "of " + "maximum health ".Style(SAColors.FontColor.cIsHealing) + "after a " + "debuff ".Style(SAColors.FontColor.cIsDamage) + "ends. ", SAUtils.RoundVal(Heal_Percent.Value), SAUtils.RoundVal(Heal_Percent_Stack.Value).SignVal())); list.Add(VoidCorruptText); return SAUtils.FuseText(list); } } protected override string PickupText => string.Format("Reduce debuff durations by {0} second" + "s".OptText(Debuff_Reduce.Value > 1f) + ". Heal after removing a debuff. " + VoidCorruptText, SAUtils.RoundVal(Debuff_Reduce.Value)); protected override bool IsEnabled() { Heal_Percent = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Percent Heal", 5f, "[ 5 = 5% | of Maximum Health Healing ]"); Heal_Percent_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Percent Heal Stack", 2.5f, "[ 2.5 = +2.5% | of Maximum Health Healing per Item Stack | 0 to Disable ]"); Debuff_Reduce = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Debuff Reduce", 1f, "[ 1 = 1s | Debuff Duration Reduced ]"); Debuff_Reduce_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Debuff Reduce Stack", 0f, "[ 1 = +1s | Debuff Duration Reduced per Item Stack | 0 to Disable ]"); Item_Enabled = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(DisplayName + " - Item", "Enable Item", true, "[ True = Enabled | False = Disabled ]"); Heal_Percent.Value = Mathf.Max(Heal_Percent.Value, 0f); Heal_Percent_Stack.Value = Mathf.Max(Heal_Percent_Stack.Value, 0f); Debuff_Reduce.Value = Mathf.Max(Debuff_Reduce.Value, 0f); Debuff_Reduce_Stack.Value = Mathf.Max(Debuff_Reduce_Stack.Value, 0f); return Item_Enabled.Value; } protected override void Initialize() { ItemDef = Value; ItemDef.requiredExpansion = SotAPlugin.ScalesAsclepiusExp; } protected override void LogDisplay() { //IL_0067: 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) ModelPanelParameters val = PickupModelPrefab.AddComponent<ModelPanelParameters>(); Transform child = PickupModelPrefab.transform.GetChild(0); if (Object.op_Implicit((Object)(object)child)) { val.focusPointTransform = child; val.cameraPositionTransform = child; val.minDistance = 1.25f; val.maxDistance = 6.25f; val.modelRotation = new Quaternion(0.01152916f, -0.5877523f, 0.045532152f, -0.80767643f); FloatingPointFix floatingPointFix = PickupModelPrefab.AddComponent<FloatingPointFix>(); floatingPointFix.sizeModifier = 1f; } } } public class JellyBagItem : ItemBase { public static ConfigEntry<bool> Item_Enabled; public static ConfigEntry<float> Heal_Percent; public static ConfigEntry<float> Heal_Percent_Stack; public static ConfigEntry<float> Threshold; public static ConfigEntry<float> Threshold_Stack; public static ConfigEntry<float> Radius; public static ConfigEntry<float> Radius_Stack; private static readonly string VoidCorruptText = "Corrupts all IV Bags".Style(SAColors.FontColor.cIsVoid) + "."; public static ItemDef ItemDef; protected override string Name => "JellyBag"; protected override CombinedItemTier Tier => (ItemTier)7; protected override ItemTag[] Tags { get { ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); return (ItemTag[])(object)array; } } protected override GameObject PickupModelPrefab => SotAPlugin.Bundle.LoadAsset<GameObject>("jellyBagModel"); protected override Sprite PickupIconSprite => SotAPlugin.Bundle.LoadAsset<Sprite>("jellyBagRender"); protected override string DisplayName => "Jelly Bag"; protected override string Description { get { List<string> list = new List<string>(4); list.Add(string.Format("Heal ".Style(SAColors.FontColor.cIsHealing) + "for " + "{0}% ".Style(SAColors.FontColor.cIsHealing) + "({1} per stack) ".Style(SAColors.FontColor.cStack).OptText(Heal_Percent_Stack.Value != 0f) + "of damage when nearby allies ", SAUtils.RoundVal(Heal_Percent.Value), SAUtils.RoundVal(Heal_Percent_Stack.Value).SignVal())); list.Add(string.Format("within " + "{0}m ".Style(SAColors.FontColor.cIsUtility) + "({1}m per stack) ".Style(SAColors.FontColor.cStack).OptText(Radius_Stack.Value != 0f) + "take damage for ", SAUtils.RoundVal(Radius.Value), SAUtils.RoundVal(Radius_Stack.Value).SignVal())); list.Add(string.Format("at least " + "{0}% ".Style(SAColors.FontColor.cIsHealth) + "({1}% per stack) ".Style(SAColors.FontColor.cStack).OptText(Threshold_Stack.Value != 0f) + "health".Style(SAColors.FontColor.cIsHealth) + ". ", SAUtils.RoundVal(Threshold.Value), SAUtils.RoundVal(Threshold_Stack.Value).SignVal())); list.Add(VoidCorruptText); return SAUtils.FuseText(list); } } protected override string PickupText => "Heal when nearby allies take damage. " + VoidCorruptText; protected override bool IsEnabled() { Heal_Percent = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Percent Heal", 50f, "[ 50 = 50% | Damage to Healing ]"); Heal_Percent_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Percent Heal Stack", 0f, "[ 25 = +25% | Damage to Healing per Item Stack | 0 to Disable ]"); Threshold = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Damage Threshold", 25f, "[ 25 = 25% | Damaged Required to Proc ]"); Threshold_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Damage Threshold Stack", -50f, "[ -50 = -50% | Damaged Required to Proc per Item Stack | RECIPROCAL | 0 to Disable ]"); Radius = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Radius", 30f, "[ 30 = 30 | Meter Radius ]"); Radius_Stack = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<float>(DisplayName + " - Item", "Radius Stack", 0f, "[ 5 = +5 | Meter Radius per Item Stack | 0 to Disable ]"); Heal_Percent.Value = Mathf.Max(Heal_Percent.Value, 0f); Heal_Percent_Stack.Value = Mathf.Max(Heal_Percent_Stack.Value, 0f); Threshold.Value = Mathf.Max(Threshold.Value, 0f); Threshold_Stack.Value = Mathf.Min(Threshold_Stack.Value, 0f); Radius.Value = Mathf.Max(Radius.Value, 0f); Radius_Stack.Value = Mathf.Max(Radius_Stack.Value, 0f); Item_Enabled = ((BaseUnityPlugin)SotAPlugin.Instance).Config.Bind<bool>(DisplayName + " - Item", "Enable Item", true, "[ True = Enabled | False = Disabled ]"); return Item_Enabled.Value; } protected override void Initialize() { ItemDef = Value; ItemDef.requiredExpansion = SotAPlugin.ScalesAsclepiusExp; GameObject val = SotAPlugin.Bundle.LoadAsset<GameObject>("jellyBagDisplay"); DynamicBone val2 = val.AddComponent<DynamicBone>(); val2.m_Root = val.transform.root; } protected override void LogDisplay() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) ModelPanelParameters val = PickupModelPrefab.AddComponent<ModelPanelParameters>(); Transform val2 = PickupModelPrefab.transform.Find("mdlJellyBag"); if (Object.op_Implicit((Object)(object)val2)) { val.focusPointTransform = val2; val.cameraPositionTransform = val2; val.minDistance = 1f; val.maxDistance = 6.25f; val.modelRotation = new Quaternion(0.01152916f, -0.5877523f, 0.045532152f, -0.80767643f); } } } public class BubbleWrapHooks { public static bool ItemEnabled; private static EffectDef BounceEffect; public BubbleWrapHooks() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown ItemEnabled = BubbleWrapItem.Item_Enabled.Value; if (ItemEnabled && GauzePadItem.Item_Enabled.Value) { CreateBubbleEffect(); CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost); DotController.OnDotStackRemovedServer += new hook_OnDotStackRemovedServer(DotController_OnDotStackRemovedServer); CharacterBody.AddTimedBuff_BuffDef_float += new hook_AddTimedBuff_BuffDef_float(CharacterBody_AddTimedBuff_BuffDef_float); } } private static void CreateBubbleEffect() { //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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAsset<GameObject>((object)RoR2_DLC1_BearVoid.BearVoidProc_prefab).WaitForCompletion(), "BubbleWrapProc"); EffectComponent component = val.GetComponent<EffectComponent>(); GameObject gameObject = ((Component)val.transform.Find("TextCamScaler")).gameObject; component.soundName = ""; Object.Destroy((Object)(object)gameObject); foreach (Transform componentInChild in val.GetComponentInChildren<Transform>()) { Transform val2 = componentInChild; val2.localScale *= 0.5f; } BounceEffect = new EffectDef { prefab = val, prefabName = "BubbleWrapProc", prefabEffectComponent = component }; ContentAddition.AddEffect(BounceEffect.prefab); } private void AddHealFromDebuff(CharacterBody self) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown int num = (Object.op_Implicit((Object)(object)((self != null) ? self.inventory : null)) ? self.inventory.GetItemCount(BubbleWrapItem.ItemDef) : 0); if (num > 0) { ProcChainMask val = default(ProcChainMask); float num2 = BubbleWrapItem.Heal_Percent.Value; if (BubbleWrapItem.Heal_Percent_Stack.Value > 0f) { float num3 = BubbleWrapItem.Heal_Percent_Stack.Value * (float)(num - 1); num2 += num3; } ((Component)self).GetComponent<HealthComponent>().HealFraction(num2 / 100f, val); Util.PlaySound("Play_gup_step", ((Component)self).gameObject); EffectManager.SpawnEffect(BounceEffect.prefab, new EffectData { rootObject = ((Component)self).gameObject, rotation = Quaternion.identity }, true); } } private void DotController_OnDotStackRemovedServer(orig_OnDotStackRemovedServer orig, DotController self, DotStack dotStack) { DotDef dotDef = dotStack.dotDef; CharacterBody victimBody = self.victimBody; int buffCount = victimBody.GetBuffCount(dotDef.associatedBuff); if (Object.op_Implicit((Object)(object)((victimBody != null) ? victimBody.inventory : null)) && buffCount <= 1) { AddHealFromDebuff(self.victimBody); } orig.Invoke(self, dotStack); } private void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef) { orig.Invoke(self, buffDef); if (Object.op_Implicit((Object)(object)((self != null) ? self.inventory : null)) && Object.op_Implicit((Object)(object)buffDef) && (buffDef.isDebuff || buffDef.isCooldown) && !buffDef.isDOT) { AddHealFromDebuff(self); } } private void CharacterBody_AddTimedBuff_BuffDef_float(orig_AddTimedBuff_BuffDef_float orig, CharacterBody self, BuffDef buffDef, float duration) { if (Object.op_Implicit((Object)(object)((self != null) ? self.inventory : null)) && Object.op_Implicit((Object)(object)buffDef)) { int itemCount = self.inventory.GetItemCount(BubbleWrapItem.ItemDef); bool flag = buffDef.isDebuff || buffDef.isDOT || buffDef.isCooldown; float num = BubbleWrapItem.Debuff_Reduce.Value; if (itemCount > 0 && flag) { if (BubbleWrapItem.Debuff_Reduce_Stack.Value > 0f) { float num2 = BubbleWrapItem.Debuff_Reduce_Stack.Value * (float)(itemCount - 1); num += num2; } duration = Math.Max(0f, duration - num); } } orig.Invoke(self, buffDef, duration); } } public class CollectorsCompassHooks { public class CompassList : MonoBehaviour { public bool IsMarked; public GameObject PosIndicator; public GameObject MarkEffect; public static List<CompassList> AllInteractables = new List<CompassList>(); public void Awake() { AllInteractables.Add(this); } public void OnDisable() { RemoveFromList(); } public void OnDestroy() { RemoveFromList(); } public void RemoveFromList() { AllInteractables.Remove(this); } } public class PermanentReveal : NetworkBehaviour { private PositionIndicator PosIndicator; private PurchaseInteraction PurchaseInteract; private BarrelInteraction BarrelInteract; public static void ShowObject(GameObject gameObject) { if (!Object.op_Implicit((Object)(object)gameObject.GetComponent<PermanentReveal>())) { gameObject.AddComponent<PermanentReveal>(); } } public void OnEnable() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((Component)this).gameObject)) { return; } NetworkIdentity component = ((Component)this).gameObject.GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if ((Object)(object)instance != (Object)null && instance.isPingTheSameNetworkObject(component)) { Object.Destroy((Object)(object)this); return; } } } GameObject val = Object.Instantiate<GameObject>(RoR2Indicator, ((Component)this).transform.position, Quaternion.identity); PosIndicator = val.GetComponent<PositionIndicator>(); PosIndicator.insideViewObject.GetComponent<SpriteRenderer>().sprite = PingIndicator.GetInteractableIcon(((Component)this).gameObject); PosIndicator.targetTransform = ((Component)this).transform; PurchaseInteract = ((Component)this).gameObject.GetComponent<PurchaseInteraction>(); BarrelInteract = ((Component)this).gameObject.GetComponent<BarrelInteraction>(); } public void OnDisable() { if (Object.op_Implicit((Object)(object)PosIndicator)) { Object.Destroy((Object)(object)((Component)PosIndicator).gameObject); PosIndicator = null; } } public void FixedUpdate() { bool flag = false; if (Object.op_Implicit((Object)(object)PurchaseInteract) && !PurchaseInteract.available) { flag = true; } if (Object.op_Implicit((Object)(object)BarrelInteract) && BarrelInteract.opened) { flag = true; } if (flag) { OnDisable(); } else if (!flag && !Object.op_Implicit((Object)(object)PosIndicator)) { OnEnable(); } } } public static bool ItemEnabled; public static GameObject HealthPopUp; public static GameObject ArrowPrefab; public static GameObject RoR2Indicator; public static int ActivateCount; public CollectorsCompassHooks() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown ItemEnabled = CollectorsCompassItem.Item_Enabled.Value; if (ItemEnabled) { ActivateCount = 0; CreateIcon(); CreateArrows(); SetUpBarrel(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); SceneDirector.onPostPopulateSceneServer += SceneDirector_onPostPopulateSceneServer; PurchaseInteraction.Awake += new hook_Awake(PurchaseInteraction_Awake); PurchaseInteraction.OnInteractionBegin += new hook_OnInteractionBegin(PurchaseInteraction_OnInteractionBegin); BarrelInteraction.OnInteractionBegin += new hook_OnInteractionBegin(BarrelInteraction_OnInteractionBegin); } } private void CreateIcon() { //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_0038: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0067: 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_00be: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_ShrineChance.ShrineChance_prefab).WaitForCompletion().transform.Find("Symbol")).gameObject, "CollectorsCompassMark"); Texture val2 = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common.texCloudWaterFoam2_psd).WaitForCompletion(); MeshRenderer component = val.GetComponent<MeshRenderer>(); Material val3 = new Material(((Renderer)component).sharedMaterial); val.AddComponent<NetworkIdentity>(); val.transform.localScale = Vector3.one * 12f; val3.mainTexture = (Texture)(object)SotAPlugin.Bundle.LoadAsset<Sprite>("compassMarkIcon").texture; val3.SetTexture("_Cloud1Tex", val2); val3.SetColor("_TintColor", new Color(1f, 0f, 0f, 0.745f)); val3.SetFloat("_AlphaBoost", 0.35f); val3.SetFloat("_AlphaBias", 0.4f); val3.SetFloat("_DistortionStrength", 0.05f); ((Renderer)component).sharedMaterial = val3; HealthPopUp = val; } private void CreateArrows() { //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_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) GameObject arrowPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Common.BossPositionIndicator_prefab).WaitForCompletion(), "CompassPositionIndicator"); GameObject roR2Indicator = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Common.PoiPositionIndicator_prefab).WaitForCompletion(); ArrowPrefab = arrowPrefab; RoR2Indicator = roR2Indicator; } private void SetUpBarrel() { //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) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Barrel1.Barrel1_prefab).WaitForCompletion(); val.AddComponent<CompassList>(); } private GameObject MarkInteract() { //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015a: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) if (SceneInfo.instance.countsAsStage) { CompassList compassList = null; int num = 0; while (!Object.op_Implicit((Object)(object)compassList) && (double)num < Math.Pow(CompassList.AllInteractables.Count, 2.0)) { int count = CompassList.AllInteractables.Count; int index = Random.RandomRange(0, count - 1); CompassList compassList2 = CompassList.AllInteractables[index]; if (Object.op_Implicit((Object)(object)compassList2)) { PurchaseInteraction component = ((Component)compassList2).gameObject.GetComponent<PurchaseInteraction>(); BarrelInteraction component2 = ((Component)compassList2).gameObject.GetComponent<BarrelInteraction>(); if (Object.op_Implicit((Object)(object)component) && component.available) { compassList = compassList2; } else if (Object.op_Implicit((Object)(object)component2) && !component2.opened) { compassList = compassList2; } else { compassList2.RemoveFromList(); } } num++; } if (Object.op_Implicit((Object)(object)compassList)) { GameObject gameObject = ((Component)compassList).gameObject; GameObject val = Object.Instantiate<GameObject>(HealthPopUp, gameObject.transform.position, Quaternion.identity); Highlight component3 = ((Component)compassList).gameObject.GetComponent<Highlight>(); Transform transform = val.transform; transform.position += new Vector3(0f, 4f, 0f); component3.highlightColor = (HighlightColor)3; component3.CustomColor = new Color(1f, 0f, 0f); if (Object.op_Implicit((Object)(object)gameObject.GetComponent<ShopTerminalBehavior>()?.serverMultiShopController)) { MultiShopController serverMultiShopController = gameObject.GetComponent<ShopTerminalBehavior>().serverMultiShopController; GameObject[] terminalGameObjects = serverMultiShopController.terminalGameObjects; foreach (GameObject val2 in terminalGameObjects) { val2.GetComponent<Highlight>().highlightColor = (HighlightColor)3; val2.GetComponent<Highlight>().CustomColor = new Color(1f, 0f, 0f); } } compassList.MarkEffect = val; compassList.IsMarked = true; return gameObject; } } return null; } private void ReplaceMark(CompassList component, GameObject interactable) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) ActivateCount++; Util.PlaySound("Play_env_hiddenLab_laptop_sequence_lock", interactable); component.IsMarked = false; interactable.GetComponent<Highlight>().highlightColor = (HighlightColor)0; interactable.GetComponent<Highlight>().isOn = false; Object.Destroy((Object)(object)component.MarkEffect); Object.Destroy((Object)(object)component.PosIndicator); if (ActivateCount >= CollectorsCompassItem.InteractAmount.Value) { ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers((TeamIndex)1); List<CharacterBody> list = new List<CharacterBody>(); foreach (TeamComponent item in teamMembers) { CharacterBody body = item.body; PlayerCharacterMasterController val = (Object.op_Implicit((Object)(object)body.master) ? body.master.playerCharacterMasterController : null); if (Object.op_Implicit((Object)(object)val)) { list.Add(body); } } foreach (CharacterBody item2 in list) { if (Object.op_Implicit((Object)(object)item2)) { item2.AddBuff(CompassFoundBuff.BuffDef); } } foreach (CompassList allInteractable in CompassList.AllInteractables) { GameObject val2 = (Object.op_Implicit((Object)(object)allInteractable) ? ((Component)allInteractable).gameObject : null); if (Object.op_Implicit((Object)(object)val2)) { val2.AddComponent<PermanentReveal>(); } } Util.PlaySound("Play_UI_rustedLockbox_open", interactable); } else { GameObject val3 = MarkInteract(); if (Object.op_Implicit((Object)(object)val3)) { GameObject val4 = Object.Instantiate<GameObject>(ArrowPrefab, val3.transform); val4.GetComponent<PositionIndicator>().targetTransform = val3.transform; val3.GetComponent<CompassList>().PosIndicator = val4; } } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (sender.HasBuff(CompassFoundBuff.BuffDef)) { int itemCountForTeam = Util.GetItemCountForTeam(sender.teamComponent.teamIndex, CollectorsCompassItem.ItemDef.itemIndex, false, true); float num = CollectorsCompassItem.Health_Multiply.Value; float num2 = CollectorsCompassItem.Speed_Multiply.Value; if (CollectorsCompassItem.Health_Multiply_Stack.Value > 0f) { float num3 = CollectorsCompassItem.Health_Multiply_Stack.Value * (float)(itemCountForTeam - 1); num += num3; } if (CollectorsCompassItem.Speed_Multiply_Stack.Value > 0f) { float num4 = CollectorsCompassItem.Speed_Multiply_Stack.Value * (float)(itemCountForTeam - 1); num2 += num4; } args.healthTotalMult += num / 100f; args.moveSpeedMultAdd += num2 / 100f; } } private void SceneDirector_onPostPopulateSceneServer(SceneDirector self) { ActivateCount = 0; foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (!Object.op_Implicit((Object)(object)instance.master) || instance.master.inventory.GetItemCount(CollectorsCompassItem.ItemDef) <= 0) { continue; } MarkInteract(); break; } } private void PurchaseInteraction_Awake(orig_Awake orig, PurchaseInteraction self) { //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_0010: 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected I4, but got Unknown orig.Invoke(self); CostTypeIndex costType = self.costType; CostTypeIndex val = costType; bool flag; switch ((int)val) { case 0: case 1: case 2: case 4: case 5: case 6: case 7: case 10: case 15: flag = true; break; default: flag = false; break; } if (NetworkServer.active && flag && ((Component)self).gameObject.activeSelf) { ((Component)self).gameObject.AddComponent<CompassList>(); } } private void PurchaseInteraction_OnInteractionBegin(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator) { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, activator); CompassList component = ((Component)self).gameObject.GetComponent<CompassList>(); if (Object.op_Implicit((Object)(object)component) && component.IsMarked) { ReplaceMark(component, ((Component)self).gameObject); } else { if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)((Component)component).gameObject.GetComponent<ShopTerminalBehavior>())) { return; } MultiShopController val = ((Component)component).gameObject.GetComponent<ShopTerminalBehavior>()?.serverMultiShopController; if (!Object.op_Implicit((Object)(object)val) || val.available) { return; } GameObject[] terminalGameObjects = val.terminalGameObjects; foreach (GameObject val2 in terminalGameObjects) { CompassList component2 = val2.GetComponent<CompassList>(); if (component2.IsMarked) { ReplaceMark(component2, val2); continue; } val2.GetComponent<Highlight>().highlightColor = (HighlightColor)0; val2.GetComponent<Highlight>().isOn = false; } } } private void BarrelInteraction_OnInteractionBegin(orig_OnInteractionBegin orig, BarrelInteraction self, Interactor activator) { orig.Invoke(self, activator); CompassList component = ((Component)self).gameObject.GetComponent<CompassList>(); if (Object.op_Implicit((Object)(object)component) && component.IsMarked) { ReplaceMark(component, ((Component)self).gameObject); } } } public class GauzePadHooks { public static bool ItemEnabled; private EffectDef SplashEffect; public GauzePadHooks() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown ItemEnabled = GauzePadItem.Item_Enabled.Value; if (ItemEnabled) { CreateSplashEffect(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); DotController.OnDotStackAddedServer += new hook_OnDotStackAddedServer(DotController_OnDotStackAddedServer); CharacterBody.AddBuff_BuffIndex += new hook_AddBuff_BuffIndex(CharacterBody_AddBuff_BuffIndex); } } private void CreateSplashEffect() { //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_003a: 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_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_006a: 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_0083: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAsset<GameObject>((object)RoR2_Base_Phasing.ProcStealthkit_prefab).WaitForCompletion(), "GauzePadProc"); EffectComponent component = val.GetComponent<EffectComponent>(); Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>(); foreach (Transform val2 in componentsInChildren) { val2.localScale = Vector3.one * 0.5f; } SplashEffect = new EffectDef { prefab = val, prefabName = "GauzePadProc", prefabEffectComponent = component }; ContentAddition.AddEffect(SplashEffect.prefab); } private void AddHealFromDebuff(CharacterBody self) { //IL_0062: 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_007f: Unknown result type (might be due to invalid IL or missing references) int itemCount = self.inventory.GetItemCount(GauzePadItem.ItemDef); if (itemCount > 0) { float num = GauzePadItem.Duration.Value; if (GauzePadItem.Duration_Stack.Value > 0f) { float num2 = GauzePadItem.Duration_Stack.Value * (float)(itemCount - 1); num += num2; } EffectManager.SimpleEffect(SplashEffect.prefab, self.corePosition, self.transform.rotation, true); NetworkingHelpers.ApplyBuff(self, HealFromDebuff.BuffDef.buffIndex, 1, num); Util.PlaySound("Play_scav_backpack_open", ((Component)self).gameObject); } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!Object.op_Implicit((Object)(object)((sender != null) ? sender.inventory : null))) { return; } int itemCount = sender.inventory.GetItemCount(GauzePadItem.ItemDef); if (sender.HasBuff(HealFromDebuff.BuffDef) && itemCount > 0) { float num = GauzePadItem.Heal_Amount.Value; float num2 = num * GauzePadItem.Level_Scale; if (GauzePadItem.Heal_Amount_Stack.Value > 0f) { float num3 = GauzePadItem.Heal_Amount_Stack.Value * (float)(itemCount - 1); num += num3; } args.baseRegenAdd += num; args.levelRegenAdd += num2; } } private void DotController_OnDotStackAddedServer(orig_OnDotStackAddedServer orig, DotController self, DotStack dotStack) { orig.Invoke(self, dotStack); CharacterBody victimBody = self.victimBody; if ((Object)(object)dotStack.dotDef.associatedBuff != (Object)null && Object.op_Implicit((Object)(object)((victimBody != null) ? victimBody.inventory : null))) { AddHealFromDebuff(victimBody); } } private void CharacterBody_AddBuff_BuffIndex(orig_AddBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { //IL_0003: 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) orig.Invoke(self, buffType); BuffDef buffDef = BuffCatalog.GetBuffDef(buffType); if (Object.op_Implicit((Object)(object)buffDef) && Object.op_Implicit((Object)(object)((self != null) ? self.inventory : null)) && buffDef.isDebuff && !buffDef.isDOT) { AddHealFromDebuff(self); } } } public class IVBagHooks { public static bool ItemEnabled; public static GameObject TetherPrefab; public static ModdedProcType HealShare; public IVBagHooks() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) ItemEnabled = IVBagItem.Item_Enabled.Value; if (ItemEnabled) { CreateTether(); HealthComponent.onCharacterHealServer += HealthComponent_onCharacterHealServer; NetworkingAPI.RegisterMessageType<IVBagTether.IVTetherSync>(); HealShare = ProcTypeAPI.ReserveProcType(); } } private void HealthComponent_onCharacterHealServer(HealthComponent self, float amount, ProcChainMask procChainMask) { //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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)self).GetComponent<CharacterBody>(); IVBagTether iVBagTether = ((component != null) ? ((Component)component).GetComponent<IVBagTether>() : null); int num = (Object.op_Implicit((Object)(object)((component != null) ? component.inventory : null)) ? component.inventory.GetItemCount(IVBagItem.ItemDef) : 0); bool flag = ProcTypeAPI.HasModdedProc(procChainMask, HealShare); if (!(amount > 0.5f) || iVBagTether == null || iVBagTether.TargetLinks.Count <= 0 || flag) { return; } foreach (Transform targetLink in iVBagTether.TargetLinks) { HealthComponent component2 = ((Component)targetLink).GetComponent<HealthComponent>(); if (Object.op_Implicit((Object)(object)component2)) { ProcChainMask val = default(ProcChainMask); ProcTypeAPI.AddModdedProc(ref val, HealShare); float num2 = IVBagItem.Heal_Percent.Value; if (IVBagItem.Heal_Percent_Stack.Value > 0f) { float num3 = IVBagItem.Heal_Percent_Stack.Value * (float)(num - 1); num2 += num3; } component2.Heal(amount * num2 / 100f, val, true); NetMessageExtensions.Send((INetMessage)(object)new IVBagTether.IVTetherSync(((NetworkBehaviour)component).netId), (NetworkDestination)1); } } } private void CreateTether() { //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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0050: 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_00e1: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) TetherPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC1_EliteEarth.AffixEarthTetherVFX_prefab).WaitForCompletion(), "IVBagTether", true); LineRenderer component = TetherPrefab.GetComponent<LineRenderer>(); Material val = new Material(((Renderer)component).sharedMaterial); val.SetColor("_TintColor", new Color(0f, 0f, 0f)); RendererSetMaterialsExtension.SetSharedMaterials((Renderer)(object)component, (Material[])(object)new Material[1] { val }, 1); Object.Destroy((Object)(object)((Component)TetherPrefab.transform.Find("EndTransform/HealedFX/HealingSymbols_Ps")).gameObject); Object.Destroy((Object)(object)((Component)TetherPrefab.transform.Find("EndTransform/HealedFX/HealingGlow_Ps")).gameObject); Object.Destroy((Object)(object)TetherPrefab.GetComponent<LoopSoundPlayer>()); ParticleSystemRenderer component2 = ((Component)TetherPrefab.transform.Find("EndTransform/HealedFX/HealingGlow_Ps (1)")).GetComponent<ParticleSystemRenderer>(); Material val2 = new Material(((Renderer)component2).sharedMaterial); val2.SetColor("_TintColor", new Color(0f, 0f, 0f)); ((Renderer)component2).sharedMaterial = val2; } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((self != null) ? self.inventory : null)) && NetworkServer.active) { IVBagTether component = ((Component)self).GetComponent<IVBagTether>(); int itemCount = self.inventory.GetItemCount(IVBagItem.ItemDef); if (Object.op_Implicit((Object)(object)component) && itemCount <= 0) { Object.Destroy((Object)(object)component); } if (!Object.op_Implicit((Object)(object)component) && itemCount > 0) { ((Component)self).gameObject.AddComponent<IVBagTether>(); } } } } public class IVBagTether : BaseItemBodyBehavior { public class IVTetherSync : INetMessage, ISerializableObject { private NetworkInstanceId NetID; public IVTetherSync() { } public IVTetherSync(NetworkInstanceId setID) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) NetID = setID; } public void Deserialize(NetworkReader reader) { //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) NetID = reader.ReadNetworkId(); } public void OnReceived() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) GameObject val = Util.FindNetworkObject(NetID); IVBagTether iVBagTether = ((val != null) ? val.GetComponent<IVBagTether>() : null); if (Object.op_Implicit((Object)(object)iVBagTether)) { iVBagTether.TriggerVisual(); } } public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) writer.Write(NetID); } } public List<Transform> TargetLinks; public List<GameObject> ActiveTethers; private List<Renderer> TetherRenders; private CharacterBody Owner; private MaterialPropertyBlock PropertySet; private TetherVfxOrigin TetherEffect; public float Duration; private float GlowHue; [ItemDefAssociation(useOnServer = true, useOnClient = true)] public static ItemDef GetItemDef() { return IVBagItem.Item_Enabled.Value ? IVBagItem.ItemDef : null; } public void OnEnable() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown Owner = ((Component)this).GetComponent<CharacterBody>(); TetherEffect = ((Component)this).gameObject.AddComponent<TetherVfxOrigin>(); TetherEffect.tetherPrefab = IVBagHooks.TetherPrefab; Duration = 0f; GlowHue = 0f; PropertySet = new MaterialPropertyBlock(); TetherVfxOrigin tetherEffect = TetherEffect; tetherEffect.onTetherAdded = (TetherAddDelegate)Delegate.Combine((Delegate?)(object)tetherEffect.onTetherAdded, (Delegate?)new TetherAddDelegate(SetUpTether)); TetherVfxOrigin tetherEffect2 = TetherEffect; tetherEffect2.onTetherRemoved = (TetherRemoveDelegate)Delegate.Combine((Delegate?)(object)tetherEffect2.onTetherRemoved, (Delegate?)new TetherRemoveDelegate(RemoveTether)); TargetLinks = new List<Transform>(); ActiveTethers = new List<GameObject>(); TetherRenders = new List<Renderer>(); } public void SetUpTether(TetherVfx tether, Transform transform) { GameObject gameObject = ((Component)tether).gameObject; Renderer component = ((Component)gameObject.GetComponent<LineRenderer>()).GetComponent<Renderer>(); Transform obj = gameObject.transform.Find("EndTransform/HealedFX/HealingGlow_Ps (1)"); Renderer item = ((obj != null) ? ((Component)((Component)obj).GetComponent<ParticleSystemRenderer>()).GetComponent<Renderer>() : null); ActiveTethers.Add(gameObject); TetherRenders.Add(component); TetherRenders.Add(item); } public void RemoveTether(TetherVfx tether) { GameObject gameObject = ((Component)tether).gameObject; Renderer component = ((Component)gameObject.GetComponent<LineRenderer>()).GetComponent<Renderer>(); Transform obj = gameObject.transform.Find("EndTransform/HealedFX/HealingGlow_Ps (1)"); Renderer item = ((obj != null) ? ((Component)((Component)obj).GetComponent<ParticleSystemRenderer>()).GetComponent<Renderer>() : null); if (ActiveTethers.Contains(gameObject)) { ActiveTethers.Remove(gameObject); } if (TetherRenders.Contains(component)) { TetherRenders.Remove(component); } if (TetherRenders.Contains(item)) { TetherRenders.Remove(item); } } public void OnDestroy() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown TetherVfxOrigin tetherEffect = TetherEffect; tetherEffect.onTetherAdded = (TetherAddDelegate)Delegate.Remove((Delegate?)(object)tetherEffect.onTetherAdded, (Delegate?)new TetherAddDelegate(SetUpTether)); TetherVfxOrigin tetherEffect2 = TetherEffect; tetherEffect2.onTetherRemoved = (TetherRemoveDelegate)Delegate.Remove((Delegate?)(object)tetherEffect2.onTetherRemoved, (Delegate?)new TetherRemoveDelegate(RemoveTether)); Object.Destroy((Object)(object)TetherEffect); } public void Update() { //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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) Duration = Math.Max(0f, Duration - Time.deltaTime); TargetLinks.Clear(); List<HurtBox> list = CollectionPool<HurtBox, List<HurtBox>>.RentCollection(); TeamMask val = TeamMask.none; ((TeamMask)(ref val)).AddTeam(Owner.teamComponent.teamIndex); int itemCount = Owner.inventory.GetItemCount(IVBagItem.ItemDef); float num = IVBagItem.Radius.Value; if (RunArtifactManager.instance.IsArtifactEnabled(Artifacts.FriendlyFire)) { val = TeamMask.GetEnemyTeams(Owner.teamComponent.teamIndex); ((TeamMask)(ref val)).AddTeam(Owner.teamComponent.teamIndex); } if (IVBagItem.Radius_Stack.Value > 0f) { float num2 = IVBagItem.Radius_Stack.Value * (float)(itemCount - 1); num += num2; } SphereSearch val2 = new SphereSearch { radius = num, origin = Owner.transform.position, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, queryTriggerInteraction = (QueryTriggerInteraction)0 }; val2.RefreshCandidates(); val2.FilterCandidatesByHurtBoxTeam(val); val2.OrderCandidatesByDistance(); val2.FilterCandidatesByDistinctHurtBoxEntities(); val2.GetHurtBoxes(list); int num3 = IVBagItem.Target_Count.Value; if (IVBagItem.Target_Count_Stack.Value > 0) { int num4 = IVBagItem.Target_Count_Stack.Value * (itemCount - 1); num3 += num4; } int num5 = 0; int num6 = Math.Min(num3, list.Count); while (TargetLinks.Count < num6 && num5 < list.Count) { CharacterBody val3 = list[num5]?.healthComponent.body; if ((Object)(object)val3 != (Object)(object)Owner) { TargetLinks.Add(val3.transform); } num5++; } } public void LateUpdate() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) TetherEffect.SetTetheredTransforms(TargetLinks); float glowHue = Mathf.MoveTowards(GlowHue, (Duration > 0f) ? 2f : 0f, Time.deltaTime * 15f); Color val = default(Color); ((Color)(ref val))..ctor(GlowHue, GlowHue, GlowHue); GlowHue = glowHue; PropertySet.SetColor("_TintColor", val); foreach (Renderer tetherRender in TetherRenders) { tetherRender.SetPropertyBlock(PropertySet); } } public void TriggerVisual() { Duration = 0.5f; Util.PlaySound("Play_treeBot_m1_hit_heal", ((Component)Owner).gameObject); } } public class JellyBagHooks { public static bool ItemEnabled; public static EffectDef OrbEffect; public static EffectDef HitEffect; public static GameObject RadiusEffect; public static NetworkSoundEventDef ArriveSound; public JellyBagHooks() { ItemEnabled = JellyBagItem.Item_Enabled.Value; if (ItemEnabled) { CreateSound(); CreateOrbEffect(); CreateHitEffect(); CreateRadiusEffect(); GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; } } private void CreateSound() { ArriveSound = SASounds.CreateNetworkSoundDef("Play_UI_arenaMode_voidCollapse_select"); } private void CreateOrbEffect() { //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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Infusion.InfusionOrbEffect_prefab).WaitForCompletion(), "JellyBagOrbEffect"); Texture val2 = Addressables.LoadAssetAsync<Texture>((object)RoR2_Base_Common_ColorRamps.texRampTritone2_png).WaitForCompletion(); EffectComponent component = val.GetComponent<EffectComponent>(); OrbEffect component2 = val.GetComponent<OrbEffect>(); ParticleSystem component3 = ((Component)val.transform.Find("VFX/PulseGlow")).GetComponent<ParticleSystem>(); component3.startColor = new Color(0.224f, 0.118f, 1f, 0.2f); ParticleSystemRenderer component4 = ((Component)val.transform.Find("VFX/Core")).GetComponent<ParticleSystemRenderer>(); Material val3 = new Material(((Renderer)component4).sharedMaterial); val3.DisableKeyword("VERTEXCOLOR"); val3.SetColor("_TintColor", new Color(0.224f, 0.118f, 1f)); val3.SetTexture("_RemapTex", val2); ((Renderer)component4).sharedMaterial = val3; TrailRenderer component5 = ((Component)val.transform.Find("TrailParent/Trail")).GetComponent<TrailRenderer>(); Material val4 = new Material(((Renderer)component5).sharedMaterial); val4.DisableKeyword("VERTEXCOLOR"); val4.SetColor("_TintColor", new Color(0.224f, 0.118f, 1f)); val4.SetTexture("_RemapTex", val2); ((Renderer)component5).sharedMaterial = val4; if (Object.op_Implicit((Object)(object)component2)) { component2.onArrival = new UnityEvent(); } OrbEffect = new EffectDef { prefab = val, prefabName = "JellyBagOrbEffect", prefabEffectComponent = component }; ContentAddition.AddEffect(OrbEffect.prefab); } private void CreateHitEffect() { //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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LunarSkillReplacements.LunarSecondaryRootEffect_prefab).WaitForCompletion(), "JellyBagHitProc"); EffectComponent val2 = val.AddComponent<EffectComponent>(); DestroyOnTimer component = val.GetComponent<DestroyOnTimer>(); TemporaryVisualEffect component2 = val.GetComponent<TemporaryVisualEffect>(); ParticleSystem component3 = ((Component)val.transform.Find("Visual/Sparks")).GetComponent<ParticleSystem>(); component3.playbackSpeed = 1.5f; component3.emissionRate = 15f; component3.maxParticles = 25; component3.startSpeed = 5f; Object.Destroy((Object)(object)((Component)val.transform.Find("Visual/Feathers")).gameObject); Object.Destroy((Object)(object)((Component)val.transform.Find("Visual/Core Slashes")).gameObject); Object.Destroy((Object)(object)((Component)val.transform.Find("Visual/Rising Rings")).gameObject); Object.Destroy((Object)(object)component2); component.duration = 0.25f; ((Behaviour)component).enabled = true; val2.parentToReferencedTransform = true; val2.positionAtReferencedTransform = true; val2.applyScale = true; HitEffect = new EffectDef { prefab = val, prefabName = "JellyBagHitProc", prefabEffectComponent = val2 }; ContentAddition.AddEffect(HitEffect.prefab); } private void CreateRadiusEffect() { //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_NearbyDamageBonus.NearbyDamageBonusIndicator_prefab).WaitForCompletion(), "JellyBagIndicator"); MeshRenderer component = ((Component)val.transform.Find("Radius, Spherical")).GetComponent<MeshRenderer>(); Material val2 = new Material(((Renderer)component).sharedMaterial); val2.SetColor("_TintColor", new Color(0.357f, 0f, 0.957f, 1f)); ((Renderer)component).sharedMaterial = val2; Object.Destroy((Object)(object)val.GetComponent<NetworkedBodyAttachment>()); val.AddComponent<NetworkParent>(); RadiusEffect = val; } private void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { //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) //IL_002e: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) CharacterBody victimBody = damageReport.victimBody; HealthComponent val = ((victimBody != null) ? ((Component)victimBody).GetComponent<HealthComponent>() : null); TeamIndex victimTeamIndex = damageReport.victimTeamIndex; if (!Object.op_Implicit((Object)(object)val) || Util.GetItemCountForTeam(victimTeamIndex, JellyBagItem.ItemDef.itemIndex, true, true) <= 0) { return; } float num = damageReport.damageDealt / val.fullCombinedHealth; ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers(victimTeamIndex); List<CharacterBody> list = new List<CharacterBody>(); foreach (TeamComponent item in teamMembers) { CharacterBody body = item.body; int num2 = (Object.op_Implicit((Object)(object)body.inventory) ? body.inventory.GetItemCount(JellyBagItem.ItemDef) : 0); if (!((Object)(object)body == (Object)(object)victimBody) && Object.op_Implicit((Object)(object)body.inventory) && num2 != 0) { list.Add(body); } } foreach (CharacterBody item2 in list) { if (!Object.op_Implicit((Object)(object)item2.inventory)) { continue; } Vector3 val2 = victimBody.transform.position - item2.transform.position; float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude; int itemCount = item2.inventory.GetItemCount(JellyBagItem.ItemDef); float num3 = JellyBagItem.Radius.Value; float num4 = JellyBagItem.Threshold.Value / 100f; if (JellyBagItem.Threshold_Stack.Value < 0f) { float num5 = Mathf.Pow(1f + JellyBagItem.Threshold_Stack.Value / 100f, (float)(itemCount - 1)); num4 *= num5; } if (JellyBagItem.Radius_Stack.Value > 0f) { float num6 = JellyBagItem.Radius_Stack.Value * (float)(itemCount - 1); num3 += num6; } if (num >= num4 && (double)sqrMagnitude <= Math.Pow(num3, 2.0)) { float num7 = JellyBagItem.Heal_Percent.Value; if (JellyBagItem.Heal_Percent_Stack.Value > 0f) { float num8 = JellyBagItem.Heal_Percent_Stack.Value * (float)(itemCount - 1); num7 += num8; } OrbManager.instance.AddOrb((Orb)(object)new JellyBagOrb { origin = victimBody.corePosition, target = item2.mainHurtBox, healAmount = damageReport.damageDealt * num7 / 100f }); } } } } public class JellyBagIndicator : BaseItemBodyBehavior { private GameObject RadiusPrefab; private GameObject SphereIndicator; [ItemDefAssociation(useOnServer = true, useOnClient = true)] public static ItemDef GetItemDef() { return JellyBagItem.Item_Enabled.Value ? JellyBagItem.ItemDef : null; } public void OnEnable() { Inventory.onInventoryChangedGlobal += UpdateVisual; CharacterBody body = ((BaseItemBodyBehavior)this).body; body.OnNetworkItemBehaviorUpdate = (Action<NetworkItemBehaviorData>)Delegate.Combine(body.OnNetworkItemBehaviorUpdate, new Action<NetworkItemBehaviorData>(HandleNetworkItemBehaviorUpdate)); } public void OnDisable() { Inventory.onInventoryChangedGlobal -= UpdateVisual; CharacterBody body = ((BaseItemBodyBehavior)this).body; body.OnNetworkItemBehaviorUpdate = (Action<NetworkItemBehaviorData>)Delegate.Remove(body.OnNetworkItemBehaviorUpdate, new Action<NetworkItemBehaviorData>(HandleNetworkItemBehaviorUpdate)); SetPrefab(active: false); } private void UpdateVisual(Inventory inventory) { //IL_00a4: 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) CharacterMaster component = ((Component)inventory).GetComponent<CharacterMaster>(); CharacterBody val = (Object.op_Implicit((Object)(object)component) ? component.GetBody() : null); if (!Object.op_Implicit((Object)(object)val) || !((Object)(object)val == (Object)(object)((BaseItemBodyBehavior)this).body)) { return; } int itemCount = inventory.GetItemCount(JellyBagItem.ItemDef); SetPrefab(active: true); if (itemCount > 0) { float num = JellyBagItem.Radius.Value; if (JellyBagItem.Radius_Stack.Value > 0f) { float num2 = JellyBagItem.Radius_Stack.Value * (float)(itemCount - 1); num += num2; } SetRadius(num); val.TransmitItemBehavior(new NetworkItemBehaviorData(JellyBagItem.ItemDef.itemIndex, num), false); } } public void HandleNetworkItemBehaviorUpdate(NetworkItemBehaviorData itemBehaviorData) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) if (((NetworkItemBehaviorData)(ref itemBehaviorData)).itemIndex == JellyBagItem.ItemDef.itemIndex) { SetRadius(itemBehaviorData.floatValue); } } private void SetPrefab(bool active) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (active && !Object.op_Implicit((Object)(object)RadiusPrefab)) { RadiusPrefab = Object.Instantiate<GameObject>(JellyBagHooks.RadiusEffect, ((Component)((BaseItemBodyBehavior)this).body).GetComponent<CharacterBody>().corePosition, Quaternion.identity); SphereIndicator = ((Component)RadiusPrefab.transform.Find("Radius, Spherical")).gameObject; RadiusPrefab.transform.SetParent(((Component)((BaseItemBodyBehavior)this).body).GetComponent<CharacterBody>().transform); } else if (!active) { Object.Destroy((Object)(object)RadiusPrefab); RadiusPrefab = null; SphereIndicator = null; } } private void SetRadius(float diameter) { //IL_001b: 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_002b: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)SphereIndicator)) { SphereIndicator.transform.localScale = Vector3.one * diameter * 2f; } } } public class JellyBagOrb : Orb { private static readonly float Speed = 30f; public float healAmount; public override void Begin() { //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_001b: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / Speed; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration, scale = 1.75f }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(JellyBagHooks.OrbEffect.prefab, val, true); } public override void OnArrival() { //IL_0040: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown ((Orb)this).OnArrival(); HealthComponent healthComponent = base.target.healthComponent; CharacterBody val = healthComponent?.body; if (Object.op_Implicit((Object)(object)((val != null) ? val.inventory : null))) { healthComponent.Heal(healAmount, default(ProcChainMask), true); EffectManager.SimpleSoundEffect(JellyBagHooks.ArriveSound.index, ((Component)val).gameObject.transform.position, true); EffectManager.SpawnEffect(JellyBagHooks.HitEffect.prefab, new EffectData { rootObject = ((Component)val).gameObject, rotation = Quaternion.identity }, true); } } } public class PottingSoilHooks { public static bool ItemEnabled; public PottingSoilHooks() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown ItemEnabled = PottingSoilItem.Item_Enabled.Value; if (ItemEnabled) { GlobalEventManager.OnInteractionBegin += new hook_OnInteractionBegin(GlobalEventManager_OnInteractionBegin); } } private void GlobalEventManager_OnInteractionBegin(orig_OnInteractionBegin orig, GlobalEventManager self, Interactor interactor, IInteractable interactable, GameObject interactableObject) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_00c9: Expected O, but got Unknown orig.Invoke(self, interactor, interactable, interactableObject); CharacterBody component = ((Component)interactor).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory)) { int itemCount = component.inventory.GetItemCount(PottingSoilItem.ItemDef); if (itemCount > 0 && PermittedInteractSpawn((MonoBehaviour)interactable, interactableObject)) { SpawnCard val = (SpawnCard)(object)LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscSquidTurret"); DirectorPlacementRule val2 = new DirectorPlacementRule { placementMode = (PlacementMode)1, position = interactableObject.transform.position, maxDistance = 20f, minDistance = 5f }; DirectorSpawnRequest val3 = new DirectorSpawnRequest(val, val2, RoR2Application.rng) { teamIndexOverride = (TeamIndex)1, summonerBodyObject = ((Component)interactor).gameObject }; DirectorCore.instance.TrySpawnObject(val3); } } } private bool PermittedInteractSpawn(MonoBehaviour interactMonoBehaviour, GameObject interactObject) { if (!Object.op_Implicit((Object)(object)interactMonoBehaviour)) { return false; } InteractionProcFilter component = interactObject.GetComponent<InteractionProcFilter>(); if (Object.op_Implicit((Object)(object)component)) { return component.shouldAllowOnInteractionBeginProc; } if (Object.op_Implicit((Object)(object)((Component)interactMonoBehaviour).GetComponent<DelusionChestController>())) { if (((Behaviour)((Component)interactMonoBehaviour).GetComponent<PickupPickerController>()).enabled) { return false; } return true; } if (Object.op_Implicit((Object)(object)((Component)interactMonoBehaviour).GetComponent<VehicleSeat>())) { return false; } if (Object.op_Implicit((Object)(object)((Component)interactMonoBehaviour).GetComponent<GenericPickupController>())) { return false; } if (Object.op_Implicit((Object)(object)((Component)interactMonoBehaviour).GetComponent<NetworkUIPromptController>())) { return false; } return true; } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("noodleGemo.ScalesoftheAsclepius", "ScalesoftheAsclepius", "1.0.3")] public class SotAPlugin : BaseUnityPlugin { public const string PluginGUID = "noodleGemo.ScalesoftheAsclepius"; public const string PluginCreator = "noodleGemo"; public const string PluginName = "ScalesoftheAsclepius"; public const string PluginVersion = "1.0.3"; public static readonly string TokenPrefix = "GEMO_SOTA_"; public static ExpansionDef ScalesAsclepiusExp; public static ItemRelationshipProvider VoidRelationship; public static SotAPlugin Instance { get; private set; } public static AssetBundle Bundle { get; private set; } public void Awake() { Instance = this; SetUpAssets(); PluginConfig.Init(); if (PluginConfig.Enable_Logging.Value) { Log.Init(((BaseUnityPlugin)this).Logger); } CreateContent(); } private void CreateContent() { CreateExpansion(); CreateBuffs(); CreateItems(); CreateVoidRelationship(); } private void CreateExpansion() { //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) string description = "Scales of the Asclepius"; string description2 = "Adds content from the 'Scales of the Asclepius' expansion to the game."; ScalesAsclepiusExp = ScriptableObject.CreateInstance<ExpansionDef>(); ((Object)ScalesAsclepiusExp).name = "scaleAsclepiusIcon"; ScalesAsclepiusExp.iconSprite = Bundle.LoadAsset<Sprite>("expansionIcon"); ScalesAsclepiusExp.disabledIconSprite = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Common_MiscIcons.texUnlockIcon_png).WaitForCompletion(); ScalesAsclepiusExp.nameToken = SALanguage.LanguageAdd("EXPANSION_ICON", description); ScalesAsclepiusExp.descriptionToken = SALanguage.LanguageAdd("EXPANSION_DESC", description2); ContentAddition.AddExpansionDef(ScalesAsclepiusExp); } private void CreateVoidRelationship() { //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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result