From 81589268625277fdbe41da296c176c4ba3bc1c21 Mon Sep 17 00:00:00 2001 From: ElCeejo <40281901+ElCeejo@users.noreply.github.com> Date: Sat, 8 May 2021 02:30:57 -0700 Subject: [PATCH] Check for attachments before attaching player to bed (#2862) --- mods/beds/functions.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/beds/functions.lua b/mods/beds/functions.lua index f0ddae7a..ddac52be 100644 --- a/mods/beds/functions.lua +++ b/mods/beds/functions.lua @@ -102,6 +102,11 @@ local function lay_down(player, pos, bed_pos, state, skip) return false end + -- Check if player is attached to an object + if player:get_attach() then + return false + end + if beds.player[name] then -- player already in bed, do nothing return false