fix tameable and drops for logical mobs animals
* reported at the fork https://notabug.org/TenPlus1/dmobs/issues/6 * fix the follows tameable for almost logical animals * fix the drops of animals that are meal when dies * by example also elephant drops grass ? seriously.. * do not force forcing farming mod due commit about drop items * do not force mobs_animals neither so detect the mod if any
This commit is contained in:
parent
2aa8bc0304
commit
73fef41a81
@ -1,3 +1,11 @@
|
||||
local followf = {}
|
||||
|
||||
-- detect common minetest famous mobs
|
||||
if minetest.get_modpath("farming") then
|
||||
table.insert(followf, "farming:wheat")
|
||||
table.insert(followf, "farming:seed_cotton")
|
||||
end
|
||||
|
||||
mobs:register_mob("dmobs:elephant", {
|
||||
type = "animal",
|
||||
passive = false,
|
||||
@ -29,10 +37,10 @@ mobs:register_mob("dmobs:elephant", {
|
||||
replace_rate = 10,
|
||||
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"},
|
||||
replace_with = "air",
|
||||
follow = {"farming:wheat"},
|
||||
follow = followf,
|
||||
view_range = 14,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||
{name = "mobs:meat_raw", chance = 2, min = 1, max = 3},
|
||||
},
|
||||
animation = {
|
||||
speed_normal = 5,
|
||||
|
10
mobs/fox.lua
10
mobs/fox.lua
@ -1,3 +1,11 @@
|
||||
local followf = {}
|
||||
|
||||
table.insert(followf, "mobs:meat_raw")
|
||||
|
||||
if minetest.get_modpath("mobs_animal") then
|
||||
table.insert(followf, "mobs_animal:muttom_raw")
|
||||
end
|
||||
|
||||
-- Fox
|
||||
mobs:register_mob("dmobs:fox", {
|
||||
type = "monster",
|
||||
@ -39,7 +47,7 @@ mobs:register_mob("dmobs:fox", {
|
||||
replace_rate = 10,
|
||||
replace_what = {"farming:wheat_5", "default:fence_wood", "default:grass_5", "default:dirt_with_grass"},
|
||||
replace_with = "air",
|
||||
follow = {"mobs:meat_raw"},
|
||||
follow = followf,
|
||||
view_range = 14,
|
||||
animation = {
|
||||
speed_normal = 6,
|
||||
|
@ -28,6 +28,10 @@ mobs:register_mob("dmobs:gnorm", {
|
||||
fall_damage = 1,
|
||||
fall_speed = -6,
|
||||
fear_height = 4,
|
||||
drops = {
|
||||
{name = "default:wood", chance = 1, min = 1, max = 1},
|
||||
{name = "default:apple", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
replace_rate = 10,
|
||||
replace_what = {"default:apple", "default:stone", "default:stone_with_coal", "default:fence_wood"},
|
||||
replace_with = "air",
|
||||
|
@ -22,6 +22,7 @@ mobs:register_mob("dmobs:golem", {
|
||||
run_velocity = 2.5,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:stone", chance = 1, min = 1, max = 5},
|
||||
{name = "dmobs:golemstone", chance = 30, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
|
@ -15,6 +15,9 @@ mobs:register_mob("dmobs:golem_friendly", {
|
||||
{"dmobs_golem.png"},
|
||||
},
|
||||
follow = "default:cobble",
|
||||
drops = {
|
||||
{name = "default:cobble", chance = 1, min = 1, max = 3},
|
||||
},
|
||||
blood_texture = "default_stone.png",
|
||||
visual_size = {x=1, y=1},
|
||||
makes_footstep_sound = true,
|
||||
|
@ -1,3 +1,12 @@
|
||||
|
||||
local followf = {}
|
||||
|
||||
-- detect common minetest famous mobs
|
||||
if minetest.get_modpath("farming") then
|
||||
table.insert(followf, "farming:wheat")
|
||||
table.insert(followf, "farming:seed_cotton")
|
||||
end
|
||||
|
||||
mobs:register_mob("dmobs:hedgehog", {
|
||||
type = "animal",
|
||||
passive = true,
|
||||
@ -25,7 +34,10 @@ mobs:register_mob("dmobs:hedgehog", {
|
||||
fall_speed = -6,
|
||||
fear_height = 4,
|
||||
view_range = 14,
|
||||
follow = {"farming:bread"},
|
||||
follow = followf,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 2, min = 1, max = 3},
|
||||
},
|
||||
animation = {
|
||||
speed_normal = 5,
|
||||
speed_run = 10,
|
||||
|
@ -25,7 +25,7 @@ mobs:register_mob("dmobs:nyan", {
|
||||
run_chance = 20,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:nyan_cat", chance = 2, min = 1, max = 1},
|
||||
{name = "mobs:meat_raw", chance = 2, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
|
@ -35,7 +35,10 @@ mobs:register_mob("dmobs:panda", {
|
||||
replace_rate = 10,
|
||||
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"},
|
||||
replace_with = "air",
|
||||
follow = {"default:papyrus"},
|
||||
follow = {
|
||||
{"default:papyrus"},
|
||||
{"default:apple"}
|
||||
}
|
||||
view_range = 14,
|
||||
animation = {
|
||||
speed_normal = 6,
|
||||
|
@ -43,7 +43,11 @@ mobs:register_mob("dmobs:pig", {
|
||||
lava_damage = 2,
|
||||
fire_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"default:apple"},
|
||||
follow = {
|
||||
{"default:apple"},
|
||||
{"default:leaves"},
|
||||
{"mobs:meat_raw"},
|
||||
}
|
||||
view_range = 14,
|
||||
animation = {
|
||||
speed_normal = 10,
|
||||
|
@ -42,7 +42,10 @@ local pigdef = {
|
||||
lava_damage = 2,
|
||||
fire_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"default:apple"},
|
||||
follow = {
|
||||
{"default:apple"},
|
||||
{"default:leaves"},
|
||||
}
|
||||
view_range = 14,
|
||||
animation = {
|
||||
speed_normal = 10,
|
||||
|
12
mobs/rat.lua
12
mobs/rat.lua
@ -1,5 +1,15 @@
|
||||
--Rat
|
||||
|
||||
local followf = {}
|
||||
|
||||
-- detect common minetest famous mobs
|
||||
if minetest.get_modpath("farming") then
|
||||
table.insert(followf, "farming:wheat")
|
||||
end
|
||||
if minetest.get_modpath("mobs_animal") then
|
||||
table.insert(followf, "mobs_animal:cheese")
|
||||
end
|
||||
|
||||
mobs:register_mob("dmobs:rat", {
|
||||
type = "monster",
|
||||
reach = 2,
|
||||
@ -33,7 +43,7 @@ mobs:register_mob("dmobs:rat", {
|
||||
replace_rate = 10,
|
||||
replace_what = {"farming:wheat_5", "farming:wheat_4", "farming:wheat_2", "farming:wheat_3"},
|
||||
replace_with = "air",
|
||||
follow = {"mobs_animal:cheese"},
|
||||
follow = followf,
|
||||
view_range = 14,
|
||||
animation = {
|
||||
speed_normal = 10,
|
||||
|
@ -1,4 +1,15 @@
|
||||
|
||||
local dropstor
|
||||
|
||||
dropstor = {{name = "default:stick", chance = 1, min = 1, max = 1},}
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
dropstor = {
|
||||
{name = "default:stick", chance = 1, min = 1, max = 1},
|
||||
{name = "farming:string", chance = 2, min = 0, max = 1},
|
||||
}
|
||||
end
|
||||
|
||||
mobs:register_mob("dmobs:tortoise", {
|
||||
type = "animal",
|
||||
passive = false,
|
||||
@ -22,9 +33,7 @@ mobs:register_mob("dmobs:tortoise", {
|
||||
jump = false,
|
||||
jump_height = 0.5,
|
||||
floats = true,
|
||||
drops = {
|
||||
{name = "default:stick", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
drops = dropstor,
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
fire_damage = 2,
|
||||
@ -32,7 +41,9 @@ mobs:register_mob("dmobs:tortoise", {
|
||||
fall_damage = 1,
|
||||
fall_speed = -10,
|
||||
fear_height = 4,
|
||||
follow = {"default:papyrus"},
|
||||
follow = {
|
||||
{"default:papyrus"},
|
||||
{"default:leaves"}
|
||||
view_range = 14,
|
||||
animation = {
|
||||
speed_normal = 6,
|
||||
|
Loading…
x
Reference in New Issue
Block a user