Check for attachments

This commit is contained in:
ElCeejo 2021-04-10 12:56:46 -07:00 committed by GitHub
parent 42baede13f
commit 84df4274cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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