From 0f57b2268a22e455c87d1e55ac9f69d9f992bda5 Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Thu, 11 Aug 2022 21:31:20 -0400 Subject: [PATCH] fix some seats (#43) --- homedecor_seating/misc.lua | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/homedecor_seating/misc.lua b/homedecor_seating/misc.lua index 481295ce..f1b5748b 100644 --- a/homedecor_seating/misc.lua +++ b/homedecor_seating/misc.lua @@ -18,6 +18,9 @@ homedecor.register("deckchair", { selection_box = dc_cbox, collision_box = dc_cbox, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1) + end }) minetest.register_alias("homedecor:deckchair_foot", "homedecor:deckchair") @@ -35,6 +38,9 @@ homedecor.register("deckchair_striped_blue", { selection_box = dc_cbox, collision_box = dc_cbox, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1) + end }) homedecor.register("simple_bench", { @@ -52,6 +58,9 @@ homedecor.register("simple_bench", { _sound_def = { key = "node_sound_wood_defaults", }, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1) + end }) local bl1_sbox = { @@ -142,9 +151,7 @@ homedecor.register("kitchen_chair_wood", { after_place_node = unifieddyes.fix_rotation_nsew, on_rotate = unifieddyes.fix_after_screwdriver_nsew, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - pos.y = pos.y+0 -- where do I put my ass ? - homedecor.sit(pos, node, clicker) - return itemstack + return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1) end }) @@ -170,9 +177,7 @@ homedecor.register("kitchen_chair_padded", { on_dig = unifieddyes.on_dig, on_rotate = unifieddyes.fix_after_screwdriver_nsew, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - pos.y = pos.y+0 -- where do I put my ass ? - homedecor.sit(pos, node, clicker) - return itemstack + return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1) end }) @@ -210,6 +215,9 @@ for _, c in pairs(chairs) do collision_box = ofchairs_cbox, expand = { top = "placeholder" }, on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple or nil, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + return lrfurn.sit(pos, node, clicker, itemstack, pointed_thing, 1) + end }) end