shooter: Fix invalid particlespawner definition

This commit is contained in:
ANAND 2020-05-30 06:52:30 +05:30
parent 3d7ad1a6bc
commit 2a1c951c8a
No known key found for this signature in database
GPG key ID: 3AD8A3C4A51AAB97

View file

@ -214,9 +214,9 @@ shooter.punch_node = function(pos, spec)
minetest.remove_node(pos) minetest.remove_node(pos)
shooter.play_node_sound(node, pos) shooter.play_node_sound(node, pos)
if item.tiles then if item.tiles then
if item.tiles[1] then local texture = item.tiles[1]
shooter.spawn_particles(pos, {texture=item.tiles[1]}) texture = (type(texture) == "table") and texture.name or texture
end shooter.spawn_particles(pos, {texture=texture})
end end
if config.node_drops then if config.node_drops then
local object = minetest.add_item(pos, item) local object = minetest.add_item(pos, item)