Use item_place_node instead of item_place after mcl_util.call_on_rightclick

This prevents (harmlessly) checking for on_rightclick a second time.
This commit is contained in:
Jürgen Rühle 2025-01-09 19:49:59 +01:00 committed by Mikita Wiśniewski
parent 25b9b927c9
commit 5bd1252cab

View file

@ -244,11 +244,11 @@ function sign_tpl.on_place(itemstack, placer, pointed_thing)
-- place on wall
if wdir ~= 0 and wdir ~= 1 then
placestack:set_name("mcl_signs:wall_sign_"..def._mcl_sign_wood)
itemstack, pos = minetest.item_place(placestack, placer, pointed_thing, wdir)
itemstack, pos = minetest.item_place_node(placestack, placer, pointed_thing, wdir)
elseif wdir == 1 then -- standing, not ceiling
placestack:set_name("mcl_signs:standing_sign_"..def._mcl_sign_wood)
local rot = normalize_rotation(placer:get_look_horizontal() * 180 / math.pi / 1.5)
itemstack, pos = minetest.item_place(placestack, placer, pointed_thing, rot) -- param2 value is degrees / 1.5
itemstack, pos = minetest.item_place_node(placestack, placer, pointed_thing, rot) -- param2 value is degrees / 1.5
else
return itemstack
end