Audit code for possible nil value indexing with unregistered nodes.

This commit is contained in:
Anthony Zhang
2013-06-22 15:43:58 -04:00
parent ec63bd3abf
commit 96011bc718
6 changed files with 67 additions and 49 deletions

View File

@ -241,8 +241,7 @@ function mesecon:update_autoconnect(pos, secondcall, replace_old)
end
end
if minetest.registered_nodes["default:stone_with_mese"] == nil then
if not minetest.registered_nodes["default:stone_with_mese"] then --before MESE update, use old recipes
minetest.register_craft({
output = "mesecons:wire_00000000_off 18",
recipe = {