From dde5e29a45df3d22edd79547dd527882f4d5b2c5 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 19 Sep 2024 08:55:49 +0200 Subject: [PATCH] Add 'sittable' group to cushion and chair --- src/nodes.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/nodes.lua b/src/nodes.lua index b6d5bbf..384f105 100644 --- a/src/nodes.lua +++ b/src/nodes.lua @@ -200,7 +200,7 @@ xdecor.register("chair", { description = S("Chair"), tiles = {"xdecor_wood.png"}, sounds = default.node_sound_wood_defaults(), - groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 2}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 2, sittable = 1}, is_ground_content = false, on_rotate = screwdriver.rotate_simple, node_box = xdecor.pixelbox(16, { @@ -213,7 +213,6 @@ xdecor.register("chair", { }), can_dig = xdecor.sit_dig, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - pos.y = pos.y + 0 -- Sitting position xdecor.sit(pos, node, clicker, pointed_thing) return itemstack end, @@ -320,13 +319,12 @@ end xdecor.register("cushion", { description = S("Cushion"), tiles = {"xdecor_cushion.png"}, - groups = {snappy = 3, flammable = 3, fall_damage_add_percent = -50}, + groups = {snappy = 3, flammable = 3, fall_damage_add_percent = -50, sittable = 1}, is_ground_content = false, on_place = minetest.rotate_node, node_box = xdecor.nodebox.slab_y(0.5), can_dig = xdecor.sit_dig, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - pos.y = pos.y + 0 -- Sitting position xdecor.sit(pos, node, clicker, pointed_thing) return itemstack end