Please disclose if your mod was created primarily 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 LifeBombs v4.2.0
LifeBombs.dll
Decompiled 3 months agousing System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using Jotunn; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("HolyHandGrenades")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("HolyHandGrenades")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("8eed1f93-a0a7-4844-8895-3cc9ab0bc36c")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace HealthBombs; [BepInPlugin("TheRonTron.HolyHandGrenades", "Life Bombs", "4.2.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class HealthBombs : BaseUnityPlugin { private AssetBundle GrenadeBouquet; public void Awake() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown Logger.ShowDate = true; Game.isModded = true; Logger.LogInfo((object)("Embedded resources: " + string.Join(",", typeof(HealthBombs).Assembly.GetManifestResourceNames()))); GrenadeBouquet = AssetUtils.LoadAssetBundleFromResources("healthbombs", typeof(HealthBombs).Assembly); GameObject val = GrenadeBouquet.LoadAsset<GameObject>("HealthBomb"); ItemConfig val2 = new ItemConfig(); val2.CraftingStation = "piece_MeadCauldron"; val2.AddRequirement(new RequirementConfig("MeadHealthMajor", 4, 0, false)); val2.AddRequirement(new RequirementConfig("Sap", 5, 0, false)); val2.AddRequirement(new RequirementConfig("Eitr", 1, 0, false)); val2.AddRequirement(new RequirementConfig("Wisp", 2, 0, false)); ItemManager.Instance.AddItem(new CustomItem(val, true, val2)); PrefabManager.OnPrefabsRegistered += delegate { Cache.GetPrefab<StatusEffect>("SE_Dvergr_heal").m_startEffects.m_effectPrefabs = Cache.GetPrefab<StatusEffect>("Potion_health_major").m_startEffects.m_effectPrefabs; ((Component)PrefabManager.Instance.GetPrefab("HealthBomb_Projectile").GetComponentInChildren<ParticleSystem>()).GetComponent<Renderer>().material = Cache.GetPrefab<Material>("ooze_smoke"); Projectile component = PrefabManager.Instance.GetPrefab("HealthBomb_Projectile").GetComponent<Projectile>(); component.m_statusEffect = "SE_Dvergr_heal"; component.m_hitEffects.m_effectPrefabs.ElementAt(0).m_prefab = PrefabManager.Instance.GetPrefab("sfx_Potion_health_large"); component.m_hitEffects.m_effectPrefabs.ElementAt(1).m_prefab = PrefabManager.Instance.GetPrefab("fx_shaman_fireball_expl"); component.m_spawnOnHit = PrefabManager.Instance.GetPrefab("DvergerStaffHeal_aoe"); }; GrenadeBouquet.Unload(false); } }