vl_fireworks: Call pointed node's on_rightclick first (#4823)

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4823
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This commit is contained in:
Mikita Wiśniewski 2025-01-05 19:07:19 +01:00 committed by the-real-herowl
parent 6011a31aad
commit f2f322daa5
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,3 @@
name = vl_fireworks
description = Adds fun fireworks to the game which players can use.
depends = vl_projectile, vl_legacy
depends = vl_projectile, vl_legacy, mcl_util

View File

@ -175,6 +175,11 @@ local firework_def = {
return itemstack
end,
on_place = function(itemstack, user, pointed_thing)
local new_stack = mcl_util.call_on_rightclick(itemstack, user, pointed_thing)
if new_stack then
return new_stack
end
local pos = pointed_thing.above
vl_fireworks.shoot_firework(itemstack, pos)
if mcl_gamemode.get_gamemode(user) ~= "creative" then