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:
parent
6011a31aad
commit
f2f322daa5
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user