Fix problems with TNT
This commit is contained in:
parent
f81820203d
commit
87fc2aac60
13
init.lua
13
init.lua
@ -80,16 +80,15 @@ local function destroy(drops, pos, cid)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local def = cid_data[cid]
|
local def = cid_data[cid]
|
||||||
|
if def and def.on_blast then
|
||||||
|
def.on_blast(pos, 1)
|
||||||
|
return
|
||||||
|
end
|
||||||
if def and def.flammable then
|
if def and def.flammable then
|
||||||
|
print(dump(def), dump(pos), cid)
|
||||||
minetest.set_node(pos, fire_node)
|
minetest.set_node(pos, fire_node)
|
||||||
else
|
else
|
||||||
local on_blast = def.on_blast
|
minetest.remove_node(pos)
|
||||||
if on_blast ~= nil then
|
|
||||||
on_blast(pos, 1)
|
|
||||||
return
|
|
||||||
else
|
|
||||||
minetest.remove_node(pos)
|
|
||||||
end
|
|
||||||
if def then
|
if def then
|
||||||
local node_drops = minetest.get_node_drops(def.name, "")
|
local node_drops = minetest.get_node_drops(def.name, "")
|
||||||
for _, item in ipairs(node_drops) do
|
for _, item in ipairs(node_drops) do
|
||||||
|
Loading…
Reference in New Issue
Block a user