Prevent warning for accessing missing global (#11)

This commit is contained in:
Olivier Dragon 2022-07-26 22:53:26 -04:00 committed by GitHub
parent 0724b0dda9
commit 40b911e184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

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