add several integrations

master
A. Demant 2018-12-18 19:08:54 +01:00
parent fe42b040a9
commit fc71cfe1fc
5 changed files with 30 additions and 2 deletions

6
ethereal.lua Normal file
View File

@ -0,0 +1,6 @@
if minetest.get_modpath("ethereal") ~= nil then
farming.add_soil("ethereal:jungle_dirt")
farming.add_soil("ethereal:gray_dirt")
farming.add_soil("ethereal:cold_dirt")
farming.add_soil("ethereal:bamboo_dirt")
end

13
init.lua Normal file
View File

@ -0,0 +1,13 @@
minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- start loading from "..minetest.get_modpath(minetest.get_current_modname()))
if minetest.get_modpath("moretrees") ~= nil then
dofile(minetest.get_modpath("farming_integrate") .. "/moretrees.lua")
end
if minetest.get_modpath("woodsoil") ~= nil then
dofile(minetest.get_modpath("farming_integrate") .. "/woodsoil.lua")
end
if minetest.get_modpath("ethereal") ~= nil then
dofile(minetest.get_modpath("farming_integrate") .. "/ethereal.lua")
end
minetest.log("action", "[MOD]"..minetest.get_current_modname().." -- loaded ")

View File

@ -2,7 +2,6 @@ name = farming_integrate
title = Farming Integrate
author = ademant
description = Integrate items from other mods into farming without creating circular dependencies
optional_depends = intllib
optional_depends = farming,ethereal,moretrees
optional_depends = farming,ethereal,moretrees,woodsoil
license = MIT
version = 1.0.0

4
moretrees.lua Normal file
View File

@ -0,0 +1,4 @@
if minetest.get_modpath("moretrees") ~= nil then
end

6
woodsoil.lua Normal file
View File

@ -0,0 +1,6 @@
if minetest.get_modpath("woodsoil") ~= nil then
farming.add_soil("woodsoils:dirt_with_leaves_1")
farming.add_soil("woodsoils:dirt_with_leaves_2")
farming.add_soil("woodsoils:grass_with_leaves_1")
farming.add_soil("woodsoils:grass_with_leaves_2")
end