check technic and basic machines var content to avoid crash

master
Alexsandro Percy 2020-05-14 06:28:28 -03:00
parent 1aa6a1e4a5
commit 3b9b9de106
1 changed files with 12 additions and 8 deletions

View File

@ -5,18 +5,22 @@
local modname = "biofuel"
if minetest.get_modpath("technic") then
technic.register_extractor_recipe({input = {"farming:wheat 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"farming:corn 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"farming:potato 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"default:papyrus 99"}, output = "biofuel:biofuel 1"})
if technic then
technic.register_extractor_recipe({input = {"farming:wheat 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"farming:corn 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"farming:potato 33"}, output = "biofuel:biofuel 1"})
technic.register_extractor_recipe({input = {"default:papyrus 99"}, output = "biofuel:biofuel 1"})
end
end
if minetest.get_modpath("basic_machines") then
basic_machines.grinder_recipes["farming:wheat"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["farming:corn"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["farming:potato"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["default:papyrus"] = {70,"biofuel:biofuel",1}
if basic_machines then
basic_machines.grinder_recipes["farming:wheat"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["farming:corn"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["farming:potato"] = {50,"biofuel:biofuel",1}
basic_machines.grinder_recipes["default:papyrus"] = {70,"biofuel:biofuel",1}
end
end
if minetest.get_modpath("default") then