Make owl tamable

master^2
Oversword 2021-12-23 05:37:10 +00:00
parent 34be057e41
commit 27e265a8ee
1 changed files with 47 additions and 0 deletions

View File

@ -1,3 +1,44 @@
local follow = {"mobs_doomed:hedgehog"}
if minetest.get_modpath("farming") then
table.insert(follow, "farming:seed_wheat")
table.insert(follow, "farming:seed_cotton")
end
if minetest.get_modpath("mobs_bugslive") then
table.insert(follow, "mobs_bugslive:bug")
end
if minetest.get_modpath("mobs_butterfly") then
table.insert(follow, "mobs_butterfly:butterfly")
end
if minetest.get_modpath("butterflies") then
table.insert(follow, "butterflies:butterfly_red")
table.insert(follow, "butterflies:butterfly_violet")
table.insert(follow, "butterflies:butterfly_white")
end
if minetest.get_modpath("fireflies") then
table.insert(follow, "fireflies:firefly")
end
if minetest.get_modpath("mobs_animal") then
table.insert(follow, "mobs_animal:rat")
table.insert(follow, "mobs_animal:bee")
table.insert(follow, "mobs_animal:bunny")
table.insert(follow, "mobs_animal:chicken")
end
if minetest.get_modpath("mobs_fish") then
table.insert(follow, "mobs_fish:tropical")
table.insert(follow, "mobs_fish:clownfish")
end
if minetest.get_modpath("mobs_better_rat") then
table.insert(follow, "mobs_better_rat:rat")
end
if minetest.get_modpath("mobs_bat") then
table.insert(follow, "mobs_bat:bat")
end
if minetest.get_modpath("mobs_birds") then
table.insert(follow, "mobs_birds:bird_sm")
end
mobs:register_mob("mobs_doomed:owl", {
type = "animal",
passive = true,
@ -20,6 +61,7 @@ mobs:register_mob("mobs_doomed:owl", {
lava_damage = 2,
light_damage = 0,
view_range = 1,
follow=follow,
do_custom = function(self)
local daytime = minetest.get_timeofday()*24000
if daytime <=6000 then
@ -34,6 +76,11 @@ mobs:register_mob("mobs_doomed:owl", {
})
end
end,
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 8, true, true) then return end
if mobs:protect(self, clicker) then return end
mobs:capture_mob(self, clicker, 0, 50, 5, false, nil)
end,
animation = {
speed_normal = 1,
walk_start = 1,