Prevent warning for accessing missing global

This commit is contained in:
Olivier Dragon 2022-07-26 22:42:33 -04:00 committed by GitHub
parent 0724b0dda9
commit 82fb4906aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ if minetest.get_modpath("default") then
},
})
end
if farming and farming.mod == "redo" then
if minetest.global_exists("farming") and farming.mod == "redo" then
minetest.register_craft({
output = "home_vending_machines:sweet_machine",
recipe = {
@ -29,4 +29,4 @@ if minetest.get_modpath("default") then
},
})
end
end
end