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 WetCarryPenalty v1.5.1
Bepinex/plugins/WetCarryPenalty/WetCarryPenalty.dll
Decompiled 2 months agousing System.Diagnostics; using System.IO; 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 Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("WetCarryPenalty")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WetCarryPenalty")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b01d1629-ff3f-4b26-924e-32dd24e05c3e")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace WetCarryPenalty; [BepInPlugin("curt.valheim.wetcarrypenalty", "Wet Carry Penalty", "1.5.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class Main : BaseUnityPlugin { [HarmonyPatch(typeof(Player), "GetMaxCarryWeight")] public static class Patch_Player_GetMaxCarryWeight { private static void Postfix(Player __instance, ref float __result) { if (((Character)__instance).GetSEMan().HaveStatusEffect(SEMan.s_statusEffectWet)) { float num = WetCarryWeightReduction.Value / 100f; __result *= 1f - num; } if (((Character)__instance).GetSEMan().HaveStatusEffect(SoakedEffect.StatusEffect.NameHash())) { __result *= 0.9f; } if (((Character)__instance).GetSEMan().HaveStatusEffect(TrenchFootEffect.StatusEffect.NameHash())) { __result *= 0.85f; } if (((Character)__instance).GetSEMan().HaveStatusEffect(GangreneEffect.StatusEffect.NameHash())) { __result *= 0.8f; } if (((Character)__instance).GetSEMan().HaveStatusEffect(SepsisEffect.StatusEffect.NameHash())) { __result *= 0.7f; } if (((Character)__instance).GetSEMan().HaveStatusEffect(HypothermiaEffect.StatusEffect.NameHash())) { __result *= 0.75f; } } } [HarmonyPatch(typeof(SE_Wet), "Setup")] public static class Patch_SE_Wet_Setup { private static void Postfix(SE_Wet __instance, Character character) { if (character is Player) { ((StatusEffect)__instance).m_ttl = WetDurationMinutes.Value * 60f; } } } [HarmonyPatch(typeof(SE_Wet), "UpdateStatusEffect")] public static class Patch_SE_Wet_UpdateStatusEffect { private static void Postfix(SE_Wet __instance, float dt, Character ___m_character, ref float ___m_time) { if (___m_character is Player && ___m_character.GetSEMan().HaveStatusEffect(SEMan.s_statusEffectCampFire)) { float num = CampfireDryingTimeMinutes.Value * 60f; float num2 = ((StatusEffect)__instance).m_ttl / num; ___m_time += dt * (num2 - 11f); } } } [HarmonyPatch(typeof(SE_Stats), "GetTooltipString")] public static class Patch_SE_Stats_GetTooltipString { private static void Postfix(SE_Stats __instance, ref string __result) { if (__instance is SE_Wet && WetCarryWeightReduction.Value > 0f) { float value = WetCarryWeightReduction.Value; __result += $"$se_max_carryweight: <color=orange>-{value:0.#}%</color>\n"; } if (SoakedEffect != null && ((StatusEffect)__instance).NameHash() == SoakedEffect.StatusEffect.NameHash()) { __result += "$se_max_carryweight: <color=orange>-10%</color>\n"; } if (TrenchFootEffect != null && ((StatusEffect)__instance).NameHash() == TrenchFootEffect.StatusEffect.NameHash()) { __result += "$se_max_carryweight: <color=orange>-15%</color>\n"; } if (GangreneEffect != null && ((StatusEffect)__instance).NameHash() == GangreneEffect.StatusEffect.NameHash()) { __result += "$se_max_carryweight: <color=orange>-20%</color>\n"; } if (SepsisEffect != null && ((StatusEffect)__instance).NameHash() == SepsisEffect.StatusEffect.NameHash()) { __result += "$se_max_carryweight: <color=orange>-30%</color>\n"; __result += "Health loss: <color=orange>-1 Per Second</color>\n"; } if (HypothermiaEffect != null && ((StatusEffect)__instance).NameHash() == HypothermiaEffect.StatusEffect.NameHash()) { __result += "$se_max_carryweight: <color=orange>-25%</color>\n"; } } } private const string pluginGUID = "curt.valheim.wetcarrypenalty"; private const string pluginName = "Wet Carry Penalty"; private const string pluginVersion = "1.5.1"; private readonly Harmony HarmonyInstance = new Harmony("curt.valheim.wetcarrypenalty"); public static ManualLogSource logger = Logger.CreateLogSource("Wet Carry Penalty"); public static ConfigEntry<float> WetCarryWeightReduction; public static ConfigEntry<float> WetDurationMinutes; public static ConfigEntry<float> CampfireDryingTimeMinutes; public static ConfigEntry<float> SoakedTimeMinutes; public static ConfigEntry<float> TrenchFootTimeMinutes; public static ConfigEntry<float> GangreneTimeMinutes; public static ConfigEntry<float> SepsisTimeMinutes; public static float WetTimeSeconds; private bool wasWet; private int currentWetStage; public static CustomStatusEffect WetImmunityEffect; public static CustomStatusEffect SoakedEffect; public static CustomStatusEffect TrenchFootEffect; public static CustomStatusEffect GangreneEffect; public static CustomStatusEffect SepsisEffect; public static CustomStatusEffect HypothermiaEffect; private float sepsisDamageTimer; public static CustomItem WetImmunityMead; public static CustomItem WetImmunityMeadBase; public void Awake() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown ConfigurationManagerAttributes val = new ConfigurationManagerAttributes { IsAdminOnly = true }; WetCarryWeightReduction = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Wet carry weight reduction (%)", 20f, new ConfigDescription("Percentage by which the Wet status effect reduces maximum carry weight.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 100f), new object[1] { val })); WetDurationMinutes = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Wet duration (minutes)", 40f, new ConfigDescription("How long Wet status effect lasts after leaving water or rain.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 120f), new object[1] { val })); CampfireDryingTimeMinutes = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Campfire drying time (minutes)", 1.5f, new ConfigDescription("Approximate time required to fully dry beside a campfire.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), new object[1] { val })); SoakedTimeMinutes = ((BaseUnityPlugin)this).Config.Bind<float>("Progressive Wet Stages", "1 - Soaked Time (minutes)", 10f, new ConfigDescription("Continuous wet time required to gain Soaked.", (AcceptableValueBase)null, new object[1] { val })); TrenchFootTimeMinutes = ((BaseUnityPlugin)this).Config.Bind<float>("Progressive Wet Stages", "2 - Trench Foot Time (minutes)", 20f, new ConfigDescription("Continuous wet time required to gain Trench Foot.", (AcceptableValueBase)null, new object[1] { val })); GangreneTimeMinutes = ((BaseUnityPlugin)this).Config.Bind<float>("Progressive Wet Stages", "3 - Gangrene Time (minutes)", 25f, new ConfigDescription("Continuous wet time required to gain Gangrene.", (AcceptableValueBase)null, new object[1] { val })); SepsisTimeMinutes = ((BaseUnityPlugin)this).Config.Bind<float>("Progressive Wet Stages", "4 - Sepsis Time (minutes)", 30f, new ConfigDescription("Continuous wet time required to gain Sepsis.", (AcceptableValueBase)null, new object[1] { val })); logger.LogInfo((object)"Wet Carry Penalty loaded. Have fun."); PrefabManager.OnVanillaPrefabsAvailable += AddWetImmunityMead; Assembly executingAssembly = Assembly.GetExecutingAssembly(); AddStatusEffects(); HarmonyInstance.PatchAll(executingAssembly); } private void Update() { Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null) { currentWetStage = 0; WetTimeSeconds = 0f; wasWet = false; sepsisDamageTimer = 0f; return; } bool flag = ((Character)localPlayer).GetSEMan().HaveStatusEffect(SEMan.s_statusEffectWet); bool flag2 = ((Character)localPlayer).GetSEMan().HaveStatusEffect(SEMan.s_statusEffectFreezing); bool flag3 = ((Character)localPlayer).GetSEMan().HaveStatusEffect(HypothermiaEffect.StatusEffect.NameHash()); if (((Character)localPlayer).GetSEMan().HaveStatusEffect(WetImmunityEffect.StatusEffect.NameHash()) && flag) { ((Character)localPlayer).GetSEMan().RemoveStatusEffect(SEMan.s_statusEffectWet, false); flag = false; } if (flag) { if (!wasWet) { logger.LogInfo((object)"Continuous Wet timer started."); } WetTimeSeconds += Time.deltaTime; int newStage = 0; if (WetTimeSeconds >= SepsisTimeMinutes.Value * 60f) { newStage = 4; } else if (WetTimeSeconds >= GangreneTimeMinutes.Value * 60f) { newStage = 3; } else if (WetTimeSeconds >= TrenchFootTimeMinutes.Value * 60f) { newStage = 2; } else if (WetTimeSeconds >= SoakedTimeMinutes.Value * 60f) { newStage = 1; } ChangeWetStage(localPlayer, newStage); } else { if (wasWet) { logger.LogInfo((object)$"Continuous Wet timer reset after {WetTimeSeconds:0.0} seconds."); } RemoveCurrentWetStage(localPlayer); WetTimeSeconds = 0f; } if (flag && flag2) { if (!flag3) { ((Character)localPlayer).GetSEMan().AddStatusEffect(HypothermiaEffect.StatusEffect.NameHash(), false, 0, 0f); } } else if (flag3) { ((Character)localPlayer).GetSEMan().RemoveStatusEffect(HypothermiaEffect.StatusEffect.NameHash(), false); } UpdateSepsisDamage(localPlayer); wasWet = flag; } private void AddWetImmunityMead() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Expected O, but got Unknown //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Expected O, but got Unknown ItemConfig val = new ItemConfig(); val.Name = "Freyr's Protection"; val.Description = "A gift of godly power, protecting the drinker from becoming wet."; WetImmunityMead = new CustomItem("WetCarryPenalty_WetImmunityMead", "MeadBzerker", val); MeshRenderer[] componentsInChildren = WetImmunityMead.ItemPrefab.GetComponentsInChildren<MeshRenderer>(true); Material val2 = new Material(((Renderer)componentsInChildren[0]).sharedMaterial); ((Object)val2).name = "WetImmunityMead_Material"; if (val2.HasProperty("_Color")) { val2.SetFloat("_Hue", 0.48f); val2.SetFloat("_Saturation", -0.55f); val2.SetFloat("_Value", 0.35f); val2.SetColor("_Color", new Color(0.9f, 0.97f, 1f, 1f)); } MeshRenderer[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { ((Renderer)array[i]).sharedMaterial = val2; } Sprite val3 = RenderManager.Instance.Render(WetImmunityMead.ItemPrefab, RenderManager.IsometricRotation); WetImmunityMead.ItemDrop.m_itemData.m_shared.m_icons = (Sprite[])(object)new Sprite[1] { val3 }; StatusEffect obj = ScriptableObject.CreateInstance<StatusEffect>(); ((Object)obj).name = "WetCarryPenalty_WetImmunity"; obj.m_name = "Freyr's Protection"; obj.m_tooltip = "You are immune to becoming wet."; obj.m_icon = val3; obj.m_ttl = 600f; obj.m_startMessage = "Freyr smiles upon you, shielding you from ocean, river, and rain."; obj.m_startMessageType = (MessageType)2; WetImmunityEffect = new CustomStatusEffect(obj, false); ItemManager.Instance.AddStatusEffect(WetImmunityEffect); WetImmunityMead.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = WetImmunityEffect.StatusEffect; ItemManager.Instance.AddItem(WetImmunityMead); ItemConfig val4 = new ItemConfig(); val4.Name = "Mead base: Freyr's Protection"; val4.Description = "Needs to be fermented."; val4.CraftingStation = "piece_MeadCauldron"; val4.AddRequirement("Honey", 50, 0); val4.AddRequirement("Thistle", 50, 0); val4.AddRequirement("Bloodbag", 50, 0); val4.AddRequirement("Root", 20, 0); val4.AddRequirement("Chitin", 20, 0); val4.AddRequirement("FreshSeaweed", 10, 0); val4.AddRequirement("YmirRemains", 10, 0); val4.AddRequirement("Chain", 5, 0); WetImmunityMeadBase = new CustomItem("WetCarryPenalty_MeadBaseWetImmunity", "MeadBaseSwimmer", val4); WetImmunityMeadBase.ItemDrop.m_itemData.m_dropPrefab = WetImmunityMeadBase.ItemPrefab; WetImmunityMeadBase.ItemDrop.m_itemData.m_shared.m_consumeStatusEffect = null; WetImmunityMeadBase.ItemDrop.m_itemData.m_shared.m_appendToolTip = WetImmunityMead.ItemDrop; FermenterConversionConfig val5 = new FermenterConversionConfig(); ((ConversionConfig)val5).FromItem = "WetCarryPenalty_MeadBaseWetImmunity"; ((ConversionConfig)val5).ToItem = "WetCarryPenalty_WetImmunityMead"; ((ConversionConfig)val5).Station = Fermenters.Fermenter; val5.ProducedItems = 6; ItemManager.Instance.AddItemConversion(new CustomItemConversion((ConversionConfig)(object)val5)); ItemManager.Instance.AddItem(WetImmunityMeadBase); PrefabManager.OnVanillaPrefabsAvailable -= AddWetImmunityMead; } private void AddStatusEffects() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00e0: 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_0148: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown SE_Stats obj = ScriptableObject.CreateInstance<SE_Stats>(); ((Object)obj).name = "WetCarryPenalty_Stage1"; ((StatusEffect)obj).m_name = "Soaked"; ((StatusEffect)obj).m_tooltip = "Wetness is soaking deep into your skin, every step is squishy."; ((StatusEffect)obj).m_startMessage = ((StatusEffect)obj).m_tooltip; ((StatusEffect)obj).m_startMessageType = (MessageType)2; obj.m_healthRegenMultiplier = 0.85f; obj.m_staminaRegenMultiplier = 0.9f; obj.m_eitrRegenMultiplier = 0.9f; obj.m_speedModifier = -0.1f; string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Icons", "wet_stage_1.png"); ((StatusEffect)obj).m_icon = AssetUtils.LoadSpriteFromFile(text); SoakedEffect = new CustomStatusEffect((StatusEffect)(object)obj, false); ItemManager.Instance.AddStatusEffect(SoakedEffect); SE_Stats obj2 = ScriptableObject.CreateInstance<SE_Stats>(); ((Object)obj2).name = "WetCarryPenalty_Stage2"; ((StatusEffect)obj2).m_name = "Trench Foot"; ((StatusEffect)obj2).m_tooltip = "Your feet have started to decay. Extra squishy."; ((StatusEffect)obj2).m_startMessage = ((StatusEffect)obj2).m_tooltip; ((StatusEffect)obj2).m_startMessageType = (MessageType)2; obj2.m_healthRegenMultiplier = 0.75f; obj2.m_staminaRegenMultiplier = 0.8f; obj2.m_eitrRegenMultiplier = 0.8f; obj2.m_speedModifier = -0.15f; string text2 = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Icons", "wet_stage_2.png"); ((StatusEffect)obj2).m_icon = AssetUtils.LoadSpriteFromFile(text2); TrenchFootEffect = new CustomStatusEffect((StatusEffect)(object)obj2, false); ItemManager.Instance.AddStatusEffect(TrenchFootEffect); SE_Stats obj3 = ScriptableObject.CreateInstance<SE_Stats>(); ((Object)obj3).name = "WetCarryPenalty_Stage3"; ((StatusEffect)obj3).m_name = "Gangrene"; ((StatusEffect)obj3).m_tooltip = "You smell a foul odor from your feet, the rot has set in."; ((StatusEffect)obj3).m_startMessage = ((StatusEffect)obj3).m_tooltip; ((StatusEffect)obj3).m_startMessageType = (MessageType)2; obj3.m_healthRegenMultiplier = 0.55f; obj3.m_staminaRegenMultiplier = 0.6f; obj3.m_eitrRegenMultiplier = 0.6f; obj3.m_speedModifier = -0.25f; string text3 = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Icons", "wet_stage_3x.png"); ((StatusEffect)obj3).m_icon = AssetUtils.LoadSpriteFromFile(text3); GangreneEffect = new CustomStatusEffect((StatusEffect)(object)obj3, false); ItemManager.Instance.AddStatusEffect(GangreneEffect); SE_Stats obj4 = ScriptableObject.CreateInstance<SE_Stats>(); ((Object)obj4).name = "WetCarryPenalty_Stage4"; ((StatusEffect)obj4).m_name = "Sepsis"; ((StatusEffect)obj4).m_tooltip = "The rot has entered your blood, it's too late now."; ((StatusEffect)obj4).m_startMessage = ((StatusEffect)obj4).m_tooltip; ((StatusEffect)obj4).m_startMessageType = (MessageType)2; obj4.m_healthRegenMultiplier = 0.25f; obj4.m_staminaRegenMultiplier = 0.4f; obj4.m_eitrRegenMultiplier = 0.4f; obj4.m_speedModifier = -0.4f; string text4 = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Icons", "wet_stage_4x.png"); ((StatusEffect)obj4).m_icon = AssetUtils.LoadSpriteFromFile(text4); SepsisEffect = new CustomStatusEffect((StatusEffect)(object)obj4, false); ItemManager.Instance.AddStatusEffect(SepsisEffect); SE_Stats obj5 = ScriptableObject.CreateInstance<SE_Stats>(); ((Object)obj5).name = "WetCarryPenalty_WetFreezing"; ((StatusEffect)obj5).m_name = "Hypothermia"; ((StatusEffect)obj5).m_tooltip = "Being wet in a freezing environment makes the muscles seize up and stop working."; ((StatusEffect)obj5).m_startMessage = ((StatusEffect)obj5).m_tooltip; ((StatusEffect)obj5).m_startMessageType = (MessageType)2; obj5.m_healthRegenMultiplier = 0.45f; obj5.m_staminaRegenMultiplier = 0.5f; obj5.m_eitrRegenMultiplier = 0.5f; obj5.m_speedModifier = -0.3f; string text5 = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Icons", "wet_freezing.png"); ((StatusEffect)obj5).m_icon = AssetUtils.LoadSpriteFromFile(text5); HypothermiaEffect = new CustomStatusEffect((StatusEffect)(object)obj5, false); ItemManager.Instance.AddStatusEffect(HypothermiaEffect); } private void UpdateSepsisDamage(Player player) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (!((Character)player).GetSEMan().HaveStatusEffect(SepsisEffect.StatusEffect.NameHash())) { sepsisDamageTimer = 0f; return; } sepsisDamageTimer += Time.deltaTime; if (sepsisDamageTimer >= 1f) { sepsisDamageTimer -= 1f; HitData val = new HitData(); val.m_point = ((Component)player).transform.position; val.m_damage.m_damage = 1f; ((Character)player).Damage(val); } } private void RemoveCurrentWetStage(Player player) { switch (currentWetStage) { case 1: ((Character)player).GetSEMan().RemoveStatusEffect(SoakedEffect.StatusEffect.NameHash(), false); break; case 2: ((Character)player).GetSEMan().RemoveStatusEffect(TrenchFootEffect.StatusEffect.NameHash(), false); break; case 3: ((Character)player).GetSEMan().RemoveStatusEffect(GangreneEffect.StatusEffect.NameHash(), false); break; case 4: ((Character)player).GetSEMan().RemoveStatusEffect(SepsisEffect.StatusEffect.NameHash(), false); break; } currentWetStage = 0; } private void ChangeWetStage(Player player, int newStage) { if (newStage != currentWetStage) { RemoveCurrentWetStage(player); switch (newStage) { case 1: ((Character)player).GetSEMan().AddStatusEffect(SoakedEffect.StatusEffect.NameHash(), false, 0, 0f); break; case 2: ((Character)player).GetSEMan().AddStatusEffect(TrenchFootEffect.StatusEffect.NameHash(), false, 0, 0f); break; case 3: ((Character)player).GetSEMan().AddStatusEffect(GangreneEffect.StatusEffect.NameHash(), false, 0, 0f); break; case 4: ((Character)player).GetSEMan().AddStatusEffect(SepsisEffect.StatusEffect.NameHash(), false, 0, 0f); break; } currentWetStage = newStage; } } }