Fix bug with fire in Moontest

Moontest has no fire, yet CaveRealms references it.  Added conditionals.
master
Chris N 2015-01-06 12:39:51 -10:00
parent 368ce24d0e
commit 15ec743c43
1 changed files with 8 additions and 4 deletions

View File

@ -533,13 +533,17 @@ minetest.register_node("caverealms:constant_flame", {
damage_per_second = 4,
after_place_node = function(pos, placer)
fire.on_flame_add_at(pos)
if pos.y > DM_TOP then
minetest.remove_node(pos)
end
if (minetest.get_modpath("moontest")) then
fire.on_flame_add_at(pos)
end
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
fire.on_flame_remove_at(pos)
if pos.y > DM_TOP then
minetest.remove_node(pos)
if (minetest.get_modpath("moontest")) then
fire.on_flame_remove_at(pos)
end
end,
})