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 GlowAway v1.0.0
GlowAway.dll
Decompiled 4 days agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using HarmonyLib; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("GlowAway")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("GlowAway")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("ca654dc2-c98e-40f0-9e01-cc10d53a8ad5")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace GlowAway; [BepInPlugin("org.ssmvc.glowaway", "GlowAway", "1.0.0")] [BepInProcess("valheim.exe")] public class GlowAway : BaseUnityPlugin { [HarmonyPatch(typeof(ParticleIntensityScaler))] private static class ParticleIntensityScalerPatch { [HarmonyPrefix] [HarmonyPatch("ApplyIntensity")] public static void ApplyIntensityPrefix(ParticleIntensityScaler __instance) { if (Enabled.Value) { if (!GlowEnabled.Value) { __instance.intensity = 0f; } if (__instance.intensity > IntensityMax.Value) { __instance.intensity = IntensityMax.Value; } __instance.scaleEmission *= Scale.Value; } } } public const string PluginGUID = "org.ssmvc.glowaway"; public const string PluginName = "GlowAway"; public const string PluginVersion = "1.0.0"; private static Harmony _harmony; public static ConfigEntry<bool> Enabled { get; set; } public static ConfigEntry<float> Scale { get; set; } public static ConfigEntry<bool> GlowEnabled { get; set; } public static ConfigEntry<float> IntensityMax { get; set; } public void Awake() { _harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "org.ssmvc.glowaway"); Enabled = ((BaseUnityPlugin)this).Config.Bind<bool>("_Global", "isModEnabled", true, "Globally enable or disable this mod."); GlowEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Glow", "enableGlow", true, "Enable Glow"); Scale = ((BaseUnityPlugin)this).Config.Bind<float>("Glow", "scale", 1f, "Glow Scale."); IntensityMax = ((BaseUnityPlugin)this).Config.Bind<float>("Glow", "intensityMax", 10f, "Max Intensity"); } public void OnDestroy() { Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } } }