mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
30 lines
844 B
C#
30 lines
844 B
C#
using HarmonyLib;
|
|
|
|
namespace EHR.Patches;
|
|
|
|
[HarmonyPatch(typeof(DeconSystem), nameof(DeconSystem.UpdateSystem))]
|
|
public static class DeconSystemUpdateSystemPatch
|
|
{
|
|
public static void Prefix(DeconSystem __instance)
|
|
{
|
|
if (!AmongUsClient.Instance.AmHost) return;
|
|
|
|
if (Options.ChangeDecontaminationTime.GetBool())
|
|
{
|
|
float deconTime = Main.CurrentMap switch
|
|
{
|
|
MapNames.MiraHQ => Options.DecontaminationTimeOnMiraHQ.GetFloat(),
|
|
MapNames.Polus => Options.DecontaminationTimeOnPolus.GetFloat(),
|
|
_ => 3f
|
|
};
|
|
|
|
__instance.DoorOpenTime = deconTime;
|
|
__instance.DeconTime = deconTime;
|
|
}
|
|
else
|
|
{
|
|
__instance.DoorOpenTime = 3f;
|
|
__instance.DeconTime = 3f;
|
|
}
|
|
}
|
|
} |