Skip to content

Commit

Permalink
Re-enable beds on_rightclick functions
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Jan 6, 2025
1 parent f7d5164 commit 5cde938
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions homedecor_bedroom/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ homedecor.register("bed_regular", {
local itemname = itemstack:get_name()
if itemname == "homedecor:bed_regular" then
homedecor.bed_expansion(pos, clicker, itemstack, pointed_thing, true)
elseif core.global_exists("beds") then
beds.on_rightclick(pos, clicker)
elseif bed_on_rightclick then
bed_on_rightclick(pos, node, clicker)
end
Expand Down Expand Up @@ -112,7 +114,9 @@ homedecor.register("bed_extended", {
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if bed_on_rightclick then
if core.global_exists("beds") then
beds.on_rightclick(pos, clicker)
elseif bed_on_rightclick then
bed_on_rightclick(pos, node, clicker)
end
return itemstack
Expand Down Expand Up @@ -153,7 +157,9 @@ homedecor.register("bed_kingsize", {
end,
on_dig = unifieddyes.on_dig,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if bed_on_rightclick then
if core.global_exists("beds") then
beds.on_rightclick(pos, clicker)
elseif bed_on_rightclick then
bed_on_rightclick(pos, node, clicker)
end
return itemstack
Expand Down

0 comments on commit 5cde938

Please sign in to comment.