TNT: Only burn visually connected powder (#1857)
This commit is contained in:
parent
81e4d41ae7
commit
458f6558de
16
init.lua
16
init.lua
@ -513,17 +513,17 @@ minetest.register_node("tnt:gunpowder_burning", {
|
|||||||
on_timer = function(pos, elapsed)
|
on_timer = function(pos, elapsed)
|
||||||
for dx = -1, 1 do
|
for dx = -1, 1 do
|
||||||
for dz = -1, 1 do
|
for dz = -1, 1 do
|
||||||
for dy = -1, 1 do
|
if math.abs(dx) + math.abs(dz) == 1 then
|
||||||
if not (dx == 0 and dz == 0) then
|
for dy = -1, 1 do
|
||||||
tnt.burn({
|
tnt.burn({
|
||||||
x = pos.x + dx,
|
x = pos.x + dx,
|
||||||
y = pos.y + dy,
|
y = pos.y + dy,
|
||||||
z = pos.z + dz,
|
z = pos.z + dz,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
end,
|
end,
|
||||||
-- unaffected by explosions
|
-- unaffected by explosions
|
||||||
|
Loading…
Reference in New Issue
Block a user