2012-09-19 23:30:14 +02:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- Mob Framework Mod by Sapier
|
|
|
|
--
|
|
|
|
-- You may copy, use, modify or do nearly anything except removing this
|
|
|
|
-- copyright notice.
|
|
|
|
-- And of course you are NOT allow to pretend you have written it.
|
|
|
|
--
|
|
|
|
--! @file compatibility.lua
|
|
|
|
--! @brief contains compatibility/transition code thats to be removed
|
|
|
|
--! @copyright Sapier
|
|
|
|
--! @author Sapier
|
|
|
|
--! @date 2012-08-09
|
|
|
|
--
|
|
|
|
-- Contact sapier a t gmx net
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = { "animalmaterials:wool_white" },
|
|
|
|
interval = 1,
|
|
|
|
chance = 1,
|
|
|
|
|
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
2013-05-26 13:35:33 +02:00
|
|
|
minetest.remove_node(pos)
|
|
|
|
minetest.add_node(pos,{name="wool:white"})
|
2012-09-19 23:30:14 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = { "animalmaterials:wool_grey" },
|
|
|
|
interval = 1,
|
|
|
|
chance = 1,
|
|
|
|
|
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
2013-05-26 13:35:33 +02:00
|
|
|
minetest.remove_node(pos)
|
|
|
|
minetest.add_node(pos,{name="wool:grey"})
|
2012-09-19 23:30:14 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = { "animalmaterials:wool_brown" },
|
|
|
|
interval = 1,
|
|
|
|
chance = 1,
|
|
|
|
|
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
2013-05-26 13:35:33 +02:00
|
|
|
minetest.remove_node(pos)
|
|
|
|
minetest.add_node(pos,{name="wool:brown"})
|
2012-09-19 23:30:14 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
nodenames = { "animalmaterials:wool_black" },
|
|
|
|
interval = 1,
|
|
|
|
chance = 1,
|
|
|
|
|
|
|
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
2013-05-26 13:35:33 +02:00
|
|
|
minetest.remove_node(pos)
|
|
|
|
minetest.add_node(pos,{name="wool:black"})
|
2012-09-19 23:30:14 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- compatibility functions to make transition to new name easier
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
function animals_add_animal(animal)
|
|
|
|
mobf_add_mob(animal)
|
|
|
|
end
|