This commit is contained in:
Andrea Plati
2015-09-14 19:44:47 +02:00
parent 28c2d02278
commit 150f862b41
47 changed files with 52 additions and 20 deletions

View File

@ -68,7 +68,10 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
end
if self.lastpos.x~=nil then
if node.name ~= "air" then
if node.name == 'air' then
minetest.add_node(pos, {name="throwing:torch_trail"})
minetest.get_node_timer(pos):start(0.1)
elseif node.name ~= "air" and not string.find(node.name, "trail") then
self.object:remove()
if not string.find(node.name, "water") and not string.find(node.name, "lava") and not string.find(node.name, "torch") then
local dir=vector.direction(self.lastpos, pos)
@ -102,3 +105,14 @@ minetest.register_craft({
{'group:coal', 'default:stick', 'default:stick'},
}
})
minetest.register_node("throwing:torch_trail", {
drawtype = "airlike",
light_source = default.LIGHT_MAX-1,
walkable = false,
drop = "",
groups = {dig_immediate=3},
on_timer = function(pos, elapsed)
minetest.remove_node(pos)
end,
})