From 63ad77e2429faefb1c4ac9f900fe759015791134 Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Sat, 27 Nov 2021 20:51:47 -0500 Subject: [PATCH] make beds sleepable https://github.com/mt-mods/homedecor_modpack/issues/13 --- homedecor_bedroom/init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/homedecor_bedroom/init.lua b/homedecor_bedroom/init.lua index dbf12566..aea1f8ca 100644 --- a/homedecor_bedroom/init.lua +++ b/homedecor_bedroom/init.lua @@ -31,7 +31,7 @@ local kbed_cbox = { } --- local bed_on_rightclick = minetest.registered_nodes["beds:bed"].on_rightclick +local bed_on_rightclick = minetest.registered_nodes["beds:bed"].on_rightclick homedecor.register("bed_regular", { mesh = "homedecor_bed_regular.obj", @@ -67,9 +67,9 @@ homedecor.register("bed_regular", { if itemname == "homedecor:bed_regular" then homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true) return itemstack --- else --- bed_on_rightclick(pos, node, clicker) --- return itemstack + else + bed_on_rightclick(pos, node, clicker) + return itemstack end end }) @@ -96,10 +96,10 @@ homedecor.register("bed_extended", { homedecor.unextend_bed(pos) end, on_dig = unifieddyes.on_dig, --- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) --- bed_on_rightclick(pos, node, clicker) --- return itemstack --- end, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + bed_on_rightclick(pos, node, clicker) + return itemstack + end, drop = "homedecor:bed_regular" }) @@ -133,10 +133,10 @@ homedecor.register("bed_kingsize", { end end, on_dig = unifieddyes.on_dig, --- on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) --- bed_on_rightclick(pos, node, clicker) --- return itemstack --- end, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + bed_on_rightclick(pos, node, clicker) + return itemstack + end, }) for w, d in pairs({ ["mahogany"] = S("mahogany"), ["oak"] = S("oak") }) do