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 DeadlierVoidFog v1.4.0
plugins/DeadlierVoidFog.dll
Decompiled 7 months agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using On.RoR2; using RoR2; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("DeadlierVoidFog")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DeadlierVoidFog")] [assembly: AssemblyTitle("DeadlierVoidFog")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace DeadlierVoidFog; [BepInPlugin("com.chronos.deadliervoidfog", "Deadlier Void Fog", "1.4.0")] public class DeadlierVoidFogPlugin : BaseUnityPlugin { public const string PluginGUID = "com.chronos.deadliervoidfog"; public const string PluginName = "Deadlier Void Fog"; public const string PluginVersion = "1.4.0"; private ConfigEntry<float> healthFractionPerSecond; private ConfigEntry<bool> expo; private ConfigEntry<bool> enableClassicRun; private ConfigEntry<bool> enableEclipseRun; private ConfigEntry<bool> enableInfiniteTowerRun; private ConfigEntry<bool> enableWeeklyRun; private ConfigEntry<bool> enableVoidRaidRun; public void Awake() { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown healthFractionPerSecond = ((BaseUnityPlugin)this).Config.Bind<float>("General", "HealthFractionPerSecond", 0.25f, "How much to damage."); expo = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Exponential", false, "Is damage increased exponential? (almost instant death)"); enableClassicRun = ((BaseUnityPlugin)this).Config.Bind<bool>("GameModes", "ClassicRun", false, "Enable Void Fog modification in ClassicRun (standard mode)."); enableEclipseRun = ((BaseUnityPlugin)this).Config.Bind<bool>("GameModes", "EclipseRun", false, "Enable Void Fog modification in Eclipse mode."); enableInfiniteTowerRun = ((BaseUnityPlugin)this).Config.Bind<bool>("GameModes", "InfiniteTowerRun", true, "Enable Void Fog modification in Simulacrum (InfiniteTowerRun)."); enableWeeklyRun = ((BaseUnityPlugin)this).Config.Bind<bool>("GameModes", "WeeklyRun", false, "Enable Void Fog modification in Prismatic Trials."); enableVoidRaidRun = ((BaseUnityPlugin)this).Config.Bind<bool>("GameModes", "VoidRaidRun", false, "Enable Void Fog modification in Void Fields / Planetarium."); FogDamageController.Start += new hook_Start(FogDamageController_Start); } private void FogDamageController_Start(orig_Start orig, FogDamageController self) { orig.Invoke(self); string text = ((object)Run.instance)?.GetType().Name ?? "Unknown"; if (!IsModeEnabled(text)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[DeadlierVoidFog] Skipping fog damage modification for game mode: " + text)); return; } self.incrementExponentially = expo.Value; self.healthFractionPerSecond = healthFractionPerSecond.Value; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[DeadlierVoidFog] Applied fog damage modification for game mode: " + text)); } private bool IsModeEnabled(string runName) { return runName switch { "ClassicRun" => enableClassicRun.Value, "EclipseRun" => enableEclipseRun.Value, "InfiniteTowerRun" => enableInfiniteTowerRun.Value, "WeeklyRun" => enableWeeklyRun.Value, "VoidRaidRun" => enableVoidRaidRun.Value, _ => true, }; } }