make the farming mod optional

This commit is contained in:
FaceDeer 2017-03-25 21:26:18 -06:00
parent 33d88fe713
commit e2183ed03d
5 changed files with 20 additions and 18 deletions

View File

@ -1,7 +1,6 @@
default
subterrane
farming
harderstone?
farming?
cottages?
bucket?
dynamic_liquid?

View File

@ -142,6 +142,8 @@ local grow_underground_plant = function(pos, node)
end
dfcaverns.register_grow_abm = function(names, interval, chance)
if minetest.get_modpath("farming") then
minetest.register_abm({
nodenames = names,
interval = interval,
@ -157,6 +159,7 @@ dfcaverns.register_grow_abm = function(names, interval, chance)
grow_underground_plant(pos, node)
end
})
end
minetest.register_abm({
nodenames = names,

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

View File

@ -20,4 +20,4 @@ dfcaverns_flour - derived from farming
dfcaverns_bread - derived from farming
dfcaverns_pig_tail_thread - copied from farming
dfcaverns_sugar - derived from farming
dfcaverns_spore_tree_spores, dfcaverns_cave_wheat_seed, dfcaverns_pig_tail_seed - all derived from farming wheat seed

View File

@ -267,7 +267,7 @@ minetest.register_abm{
size = 10,
collisiondetection = false,
vertical = false,
texture = "farming_wheat_seed.png",
texture = "dfcaverns_spore_tree_spores.png",
})
end,