mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-10 17:53:52 +01:00
fix warning / wrong usage of on_construct in torches
This commit is contained in:
parent
40fb4a1299
commit
a7e12e268c
@ -227,7 +227,11 @@ function mcl_torches.register_torch(def)
|
||||
return itemstack
|
||||
end,
|
||||
on_rotate = false,
|
||||
on_construct = def.particles and set_flames(pos, def.flame_type, "floor"),
|
||||
on_construct = function(pos)
|
||||
if def.particles then
|
||||
set_flames(pos, def.flame_type, "floor")
|
||||
end
|
||||
end,
|
||||
on_destruct = def.particles and remove_flames,
|
||||
}
|
||||
minetest.register_node(itemstring, floordef)
|
||||
@ -247,13 +251,18 @@ function mcl_torches.register_torch(def)
|
||||
light_source = def.light,
|
||||
groups = groups_wall,
|
||||
drop = def.drop or itemstring,
|
||||
use_texture_alpha = "clip",
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_side = {-0.5, -0.3, -0.1, -0.2, 0.325, 0.1},
|
||||
},
|
||||
sounds = def.sounds,
|
||||
on_rotate = false,
|
||||
on_construct = def.particles and set_flames(pos, def.flame_type, "wall"),
|
||||
on_construct = function(pos)
|
||||
if def.particles then
|
||||
set_flames(pos, def.flame_type, "wall")
|
||||
end
|
||||
end,
|
||||
on_destruct = def.particles and remove_flames,
|
||||
}
|
||||
minetest.register_node(itemstring_wall, walldef)
|
||||
|
Loading…
Reference in New Issue
Block a user