Use global_exists to test for the existence

This commit is contained in:
Rui 2018-01-05 18:28:44 +09:00 committed by GitHub
parent d2899c8672
commit a01a1a2cb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -13,6 +13,6 @@ dofile(maidroid_core.modpath .. "/cores/empty.lua")
dofile(maidroid_core.modpath .. "/cores/basic.lua")
dofile(maidroid_core.modpath .. "/cores/farming.lua")
dofile(maidroid_core.modpath .. "/cores/torcher.lua")
if pdisc then
if minetest.global_exists("pdisc") then
dofile(maidroid_core.modpath .. "/cores/ocr.lua")
end