Skip to content

Commit

Permalink
Fix problems with TNT
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekdohibs committed May 12, 2015
1 parent 8bc8dd6 commit 4bd1094
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions mods/doors/init.lua
Expand Up @@ -121,15 +121,15 @@ function doors.register_door(name, def)
else
if door_type == "_b_1" or door_type == "_b_2" then
return function(pos, intensity)
check_and_blast(pos, name..door_type)
check_and_blast(pos, base_name .. door_type)
pos.y = pos.y + 1
check_and_blast(pos, name..other_door_type)
check_and_blast(pos, base_name .. other_door_type)
end
elseif door_type == "_t_1" or door_type == "_t_2" then
return function(pos, intensity)
check_and_blast(pos, name..door_type)
check_and_blast(pos, base_name .. door_type)
pos.y = pos.y - 1
check_and_blast(pos, name..other_door_type)
check_and_blast(pos, base_name .. other_door_type)
end
end
end
Expand Down
13 changes: 6 additions & 7 deletions mods/tnt/init.lua
Expand Up @@ -80,16 +80,15 @@ local function destroy(drops, pos, cid)
return
end
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
print(dump(def), dump(pos), cid)
minetest.set_node(pos, fire_node)
else
local on_blast = def.on_blast
if on_blast ~= nil then
on_blast(pos, 1)
return
else
minetest.remove_node(pos)
end
minetest.remove_node(pos)
if def then
local node_drops = minetest.get_node_drops(def.name, "")
for _, item in ipairs(node_drops) do
Expand Down

0 comments on commit 4bd1094

Please sign in to comment.