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 EnemyHealthConfig v1.1.0
plugins/yazirushi-EnemyHealthConfig/EnemyHealthConfig.dll
Decompiled 5 months agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; 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("EnemyHealthConfig")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("EnemyHealthConfig")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("52ec35a4-3ef5-4dc4-bc41-20596a2c5529")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace EnemyHealthConfig; [BepInPlugin("yazirushi.EnemyHealthConfig", "EnemyHealthConfig", "1.1.0")] public class EnemyHealthConfig : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("yazirushi.EnemyHealthConfig"); internal static ManualLogSource mls; public static ConfigEntry<int> Animal_Health; public static ConfigEntry<int> ApexPredator_Health; public static ConfigEntry<int> Banger_Health; public static ConfigEntry<int> Bowtie_Health; public static ConfigEntry<int> Chef_Health; public static ConfigEntry<int> Clown_Health; public static ConfigEntry<int> Gnome_Health; public static ConfigEntry<int> Headman_Health; public static ConfigEntry<int> Hidden_Health; public static ConfigEntry<int> Huntsman_Health; public static ConfigEntry<int> Mentalist_Health; public static ConfigEntry<int> Peeper_Health; public static ConfigEntry<int> Reaper_Health; public static ConfigEntry<int> Robe_Health; public static ConfigEntry<int> Rugrat_Health; public static ConfigEntry<int> ShadowChild_Health; public static ConfigEntry<int> Spewer_Health; public static ConfigEntry<int> Trudge_Health; public static ConfigEntry<int> Upscream_Health; public static ConfigEntry<int> BirthdayBoy_Health; public static ConfigEntry<int> BombThrower_Health; public static ConfigEntry<int> Elsa_Health; public static ConfigEntry<int> HeadGrabber_Health; public static ConfigEntry<int> HeartHugger_Health; public static ConfigEntry<int> Oogly_Health; public static ConfigEntry<int> Shadow_Health; public static ConfigEntry<int> Spinny_Health; public static ConfigEntry<int> Tick_Health; public static ConfigEntry<int> Tricycle_Health; public static ConfigEntry<bool> EnableLogging; private void Awake() { Animal_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Animal Health", 150, "Animalの体力"); ApexPredator_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "ApexPredator Health", 150, "ApexPredatorの体力"); Banger_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Banger Health", 50, "Bangerの体力"); Bowtie_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Bowtie Health", 200, "Bowtieの体力"); Chef_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Chef Health", 150, "Chefの体力"); Clown_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Clown Health", 250, "Clownの体力"); Gnome_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Gnome Health", 20, "Gnomeの体力"); Headman_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Headman Health", 250, "Headmanの体力"); Hidden_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Hidden Health", 100, "Hiddenの体力"); Huntsman_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Huntsman Health", 250, "Huntsmanの体力"); Mentalist_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Mentalist Health", 150, "Mentalistの体力"); Peeper_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Peeper Health", 30, "Peeperの体力"); Reaper_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Reaper Health", 250, "Reaperの体力"); Robe_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Robe Health", 250, "Robeの体力"); Rugrat_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Rugrat Health", 150, "Rugratの体力"); ShadowChild_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "ShadowChild Health", 150, "ShadowChildの体力"); Spewer_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Spewer Health", 65, "Spewerの体力"); Trudge_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Trudge Health", 500, "Trudgeの体力"); Upscream_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Upscream Health", 50, "Upscreamの体力"); BirthdayBoy_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "BirthdayBoy Health", 150, "BirthdayBoyの体力"); BombThrower_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "CleanupCrew Health", 350, "CleanupCrewの体力"); Elsa_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Elsa Health", 600, "Elsaの体力"); HeadGrabber_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "HeadGrab Health", 150, "HeadGrabの体力"); HeartHugger_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "HeartHugger Health", 300, "HeartHuggerの体力"); Oogly_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Oogly Health", 200, "Ooglyの体力"); Shadow_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Loom Health", 500, "Loomの体力"); Spinny_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Gambit Health", 150, "Gambitの体力"); Tick_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Tick Health", 10, "Tickの体力"); Tricycle_Health = ((BaseUnityPlugin)this).Config.Bind<int>("Settings", "Bella Health", 200, "Bellaの体力"); EnableLogging = ((BaseUnityPlugin)this).Config.Bind<bool>("ConsoleLog", "EnableLogging", false, "ログの有効化"); mls = ((BaseUnityPlugin)this).Logger; mls.LogInfo((object)"EnemyHealthConfigが起動しました!"); mls.LogInfo((object)$"EnemyHealthConfig:Config:EnableLogging = {EnableLogging.Value}"); harmony.PatchAll(); } } [HarmonyPatch(typeof(EnemyHealth), "Awake")] public class Patch_EnemyHealth_Awake { private static void Postfix(EnemyHealth __instance) { if ((Object)(object)((Component)__instance).GetComponent<EnemyAnimal>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Animal_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Animal:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyDuck>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.ApexPredator_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:ApexPredator:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyBang>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Banger_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Banger:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyBowtie>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Bowtie_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Bowtie:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyTumbler>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Chef_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Chef:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyBeamer>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Clown_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Clown:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyGnome>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Gnome_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Gnome:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyHeadController>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Headman_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Headman:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyHidden>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Hidden_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Hidden:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyHunter>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Huntsman_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Huntsman:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyFloater>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Mentalist_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Mentalist:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyCeilingEye>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Peeper_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Peeper:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyRunner>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Reaper_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Reaper:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyRobe>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Robe_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Robe:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyValuableThrower>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Rugrat_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Rugrat:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyThinMan>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.ShadowChild_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:ShadowChild:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemySlowMouth>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Spewer_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Spewer:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemySlowWalker>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Trudge_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Trudge:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyUpscream>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Upscream_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Upscream:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyBirthdayBoy>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.BirthdayBoy_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:BirthdayBoy:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyBombThrower>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.BombThrower_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:CleanupCrew:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyElsa>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Elsa_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Elsa:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyHeadGrabber>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.HeadGrabber_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:HeadGrab:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyHeartHugger>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.HeartHugger_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:HeartHugger:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyOogly>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Oogly_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Oogly:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyShadow>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Shadow_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Loom:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemySpinny>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Spinny_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Gambit:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyTick>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Tick_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Tick:{health} -> {__instance.health}"); } return; } if ((Object)(object)((Component)__instance).GetComponent<EnemyTricycle>() != (Object)null) { int health = __instance.health; __instance.health = EnemyHealthConfig.Tricycle_Health.Value; if (EnemyHealthConfig.EnableLogging.Value) { EnemyHealthConfig.mls.LogInfo((object)$"EnemyHealthConfig:Bella:{health} -> {__instance.health}"); } return; } EnemyHealthConfig.mls.LogWarning((object)"EnemyHealthConfig:Unknown enemy"); Component[] components = ((Component)__instance).GetComponents<Component>(); foreach (Component val in components) { if (EnemyHealthConfig.EnableLogging.Value) { Debug.Log((object)("[Mod] Component: " + ((object)val).GetType().Name + " on " + ((Object)__instance).name)); } } } }