From 25e2bb68779485928cb92f33fa708acc48dce09a Mon Sep 17 00:00:00 2001 From: Pontus Ullgren Date: Tue, 6 Aug 2024 07:59:54 +0200 Subject: [PATCH] Update SleepWithoutSpawn to work with Ashlands release --- SleepWithoutSpawn/BepInExPlugin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 SleepWithoutSpawn/BepInExPlugin.cs diff --git a/SleepWithoutSpawn/BepInExPlugin.cs b/SleepWithoutSpawn/BepInExPlugin.cs old mode 100644 new mode 100755 index 93bb168..5875953 --- a/SleepWithoutSpawn/BepInExPlugin.cs +++ b/SleepWithoutSpawn/BepInExPlugin.cs @@ -60,7 +60,7 @@ static class Bed_Interact_Patch { static bool Prefix(Bed __instance, Humanoid human, bool repeat, ref bool __result, ZNetView ___m_nview) { - if (((!allowDaySleep.Value || EnvMan.instance.IsAfternoon() || EnvMan.instance.IsNight()) && Traverse.Create(__instance).Method("IsCurrent").GetValue()) || repeat || !AedenthornUtils.CheckKeyHeld(modKey.Value) || (unclaimedOnly.Value && ___m_nview.GetZDO().GetLong("owner", 0L) != 0)) + if (((!allowDaySleep.Value || EnvMan.IsAfternoon() || EnvMan.IsNight()) && Traverse.Create(__instance).Method("IsCurrent").GetValue()) || repeat || !AedenthornUtils.CheckKeyHeld(modKey.Value) || (unclaimedOnly.Value && ___m_nview.GetZDO().GetLong("owner", 0L) != 0)) { return true; } @@ -68,7 +68,7 @@ static bool Prefix(Bed __instance, Humanoid human, bool repeat, ref bool __resul Player player = human as Player; - if (!allowDaySleep.Value && !EnvMan.instance.IsAfternoon() && !EnvMan.instance.IsNight()) + if (!allowDaySleep.Value && !EnvMan.IsAfternoon() && !EnvMan.IsNight()) { human.Message(MessageHud.MessageType.Center, "$msg_cantsleep", 0, null); __result = false;