diff --git a/depends.txt b/depends.txt index 9778ae9..7d23713 100644 --- a/depends.txt +++ b/depends.txt @@ -1,7 +1,6 @@ default subterrane -farming -harderstone? +farming? cottages? bucket? dynamic_liquid? \ No newline at end of file diff --git a/plants.lua b/plants.lua index 64951b8..50372aa 100644 --- a/plants.lua +++ b/plants.lua @@ -142,21 +142,24 @@ local grow_underground_plant = function(pos, node) end dfcaverns.register_grow_abm = function(names, interval, chance) - minetest.register_abm({ - nodenames = names, - interval = interval, - chance = chance, - catch_up = true, - neighbors = {"farming:soil_wet"}, - action = function(pos, node) - pos.y = pos.y-1 - if minetest.get_node(pos).name ~= "farming:soil_wet" then - return + + if minetest.get_modpath("farming") then + minetest.register_abm({ + nodenames = names, + interval = interval, + chance = chance, + catch_up = true, + neighbors = {"farming:soil_wet"}, + action = function(pos, node) + pos.y = pos.y-1 + if minetest.get_node(pos).name ~= "farming:soil_wet" then + return + end + pos.y = pos.y+1 + grow_underground_plant(pos, node) end - pos.y = pos.y+1 - grow_underground_plant(pos, node) - end - }) + }) + end minetest.register_abm({ nodenames = names, diff --git a/textures/dfcaverns_spore_tree_spores.png b/textures/dfcaverns_spore_tree_spores.png new file mode 100644 index 0000000..a9031fb Binary files /dev/null and b/textures/dfcaverns_spore_tree_spores.png differ diff --git a/textures/license.txt b/textures/license.txt index a9e946d..85540e7 100644 --- a/textures/license.txt +++ b/textures/license.txt @@ -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 diff --git a/trees/spore_tree.lua b/trees/spore_tree.lua index 0ddc30a..5e6cf0c 100644 --- a/trees/spore_tree.lua +++ b/trees/spore_tree.lua @@ -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,