From ce957e321b181c947df23544a2d57b7092164141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B5=D1=80=D1=85=D0=B0=D1=80=D0=B4=20PICCORO=20Len?= =?UTF-8?q?z=20McKAY?= Date: Fri, 21 Jan 2022 13:48:05 -0400 Subject: [PATCH 1/3] added fire_damage to mobs, backported from tenplus1 fork * backported from https://notabug.org/TenPlus1/dmobs/commit/d44a25a6f49b1cec2696f43584e1d8d76a8a8f48 --- dragons/dragon1.lua | 1 + dragons/dragon2.lua | 1 + dragons/dragon3.lua | 1 + dragons/dragon4.lua | 1 + dragons/dragon_normal.lua | 1 + dragons/great_dragon.lua | 1 + dragons/water_dragon.lua | 1 + dragons/wyvern.lua | 1 + mobs/badger.lua | 1 + mobs/elephant.lua | 1 + mobs/fox.lua | 1 + mobs/gnorm.lua | 1 + mobs/golem.lua | 1 + mobs/golem_friendly.lua | 1 + mobs/hedgehog.lua | 1 + mobs/nyan.lua | 1 + mobs/ogre.lua | 1 + mobs/orc.lua | 1 + mobs/owl.lua | 1 + mobs/panda.lua | 1 + mobs/pig.lua | 1 + mobs/pig_evil.lua | 1 + mobs/rat.lua | 1 + mobs/skeleton.lua | 1 + mobs/tortoise.lua | 1 + mobs/treeman.lua | 1 + mobs/wasps.lua | 1 + mobs/whale.lua | 1 + 28 files changed, 28 insertions(+) diff --git a/dragons/dragon1.lua b/dragons/dragon1.lua index b0e32bf..2c2d56a 100644 --- a/dragons/dragon1.lua +++ b/dragons/dragon1.lua @@ -48,6 +48,7 @@ local dragondef = { stepheight = 10, water_damage = 3, lava_damage = 1, + fire_damage = 1, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/dragon2.lua b/dragons/dragon2.lua index 7931769..cdd5622 100644 --- a/dragons/dragon2.lua +++ b/dragons/dragon2.lua @@ -48,6 +48,7 @@ local dragondef = { stepheight = 10, water_damage = 2, lava_damage = 0, + fire_damage = 0, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/dragon3.lua b/dragons/dragon3.lua index 30b98e9..8db87ab 100644 --- a/dragons/dragon3.lua +++ b/dragons/dragon3.lua @@ -48,6 +48,7 @@ local dragondef = { stepheight = 10, water_damage = 2, lava_damage = 0, + fire_damage = 0, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/dragon4.lua b/dragons/dragon4.lua index 22ba68e..dd72d23 100644 --- a/dragons/dragon4.lua +++ b/dragons/dragon4.lua @@ -48,6 +48,7 @@ local dragondef = { stepheight = 10, water_damage = 1, lava_damage = 2, + fire_damage = 2, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/dragon_normal.lua b/dragons/dragon_normal.lua index 6ad7e46..cdbe7ee 100644 --- a/dragons/dragon_normal.lua +++ b/dragons/dragon_normal.lua @@ -50,6 +50,7 @@ mobs:register_mob("dmobs:dragon", { stepheight = 10, water_damage = 2, lava_damage = 0, + fire_damage = 0, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/great_dragon.lua b/dragons/great_dragon.lua index 1c1b8ab..d6021a2 100644 --- a/dragons/great_dragon.lua +++ b/dragons/great_dragon.lua @@ -45,6 +45,7 @@ local gdragon_base = { stepheight = 10, water_damage = 2, lava_damage = 0, + fire_damage = 0, light_damage = 0, view_range = 20, animation = { diff --git a/dragons/water_dragon.lua b/dragons/water_dragon.lua index 19604c9..812a200 100644 --- a/dragons/water_dragon.lua +++ b/dragons/water_dragon.lua @@ -117,6 +117,7 @@ mobs:register_mob("dmobs:waterdragon_2", { jump = false, water_damage = 0, lava_damage = 5, + fire_damage = 4, light_damage = 0, animation = { speed_normal = 15, diff --git a/dragons/wyvern.lua b/dragons/wyvern.lua index 0b7a7d6..7a2645a 100644 --- a/dragons/wyvern.lua +++ b/dragons/wyvern.lua @@ -42,6 +42,7 @@ mobs:register_mob("dmobs:wyvern", { }, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, view_range = 20, animation = { diff --git a/mobs/badger.lua b/mobs/badger.lua index e0d524d..70a40b5 100644 --- a/mobs/badger.lua +++ b/mobs/badger.lua @@ -25,6 +25,7 @@ mobs:register_mob("dmobs:badger", { water_damage = 0, lava_damage = 2, light_damage = 0, + fire_damage = 2, fall_damage = 1, fall_speed = -8, fear_height = 4, diff --git a/mobs/elephant.lua b/mobs/elephant.lua index 5dd7a08..0250c31 100644 --- a/mobs/elephant.lua +++ b/mobs/elephant.lua @@ -21,6 +21,7 @@ mobs:register_mob("dmobs:elephant", { jump = false, water_damage = 2, lava_damage = 2, + fire_damage = 2, light_damage = 0, fall_damage = 1, fall_speed = -20, -- extra heavy! diff --git a/mobs/fox.lua b/mobs/fox.lua index 9661f98..78a505b 100644 --- a/mobs/fox.lua +++ b/mobs/fox.lua @@ -33,6 +33,7 @@ mobs:register_mob("dmobs:fox", { water_damage = 0, lava_damage = 2, light_damage = 0, + fire_damage = 2, fall_damage = 1, fear_height = 4, replace_rate = 10, diff --git a/mobs/gnorm.lua b/mobs/gnorm.lua index ff6ab0e..f6d5f26 100644 --- a/mobs/gnorm.lua +++ b/mobs/gnorm.lua @@ -23,6 +23,7 @@ mobs:register_mob("dmobs:gnorm", { jump = true, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, fall_damage = 1, fall_speed = -6, diff --git a/mobs/golem.lua b/mobs/golem.lua index d3242f6..9d5c3ff 100644 --- a/mobs/golem.lua +++ b/mobs/golem.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:golem", { }, water_damage = 0, lava_damage = 2, + fire_damage = 1, light_damage = 1, fall_damage = 0, fear_height = 10, diff --git a/mobs/golem_friendly.lua b/mobs/golem_friendly.lua index fe411c5..ca94792 100644 --- a/mobs/golem_friendly.lua +++ b/mobs/golem_friendly.lua @@ -23,6 +23,7 @@ mobs:register_mob("dmobs:golem_friendly", { jump = true, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, fall_damage = 0, fear_height = 10, diff --git a/mobs/hedgehog.lua b/mobs/hedgehog.lua index 81572cc..c9dc87d 100644 --- a/mobs/hedgehog.lua +++ b/mobs/hedgehog.lua @@ -19,6 +19,7 @@ mobs:register_mob("dmobs:hedgehog", { jump_height = 0.6, water_damage = 2, lava_damage = 2, + fire_damage = 1, light_damage = 0, fall_damage = 1, fall_speed = -6, diff --git a/mobs/nyan.lua b/mobs/nyan.lua index 7d7a7c3..92b5aef 100644 --- a/mobs/nyan.lua +++ b/mobs/nyan.lua @@ -29,6 +29,7 @@ mobs:register_mob("dmobs:nyan", { }, water_damage = 0, lava_damage = 2, + fire_damage = 1, light_damage = 0, follow = {"default:mese"}, view_range = 14, diff --git a/mobs/ogre.lua b/mobs/ogre.lua index c5044a4..add875d 100644 --- a/mobs/ogre.lua +++ b/mobs/ogre.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:ogre", { rotate = 180, water_damage = 0, lava_damage = 2, + fire_damage = 1, light_damage = 0, fall_damage = 1, fall_speed = -14, diff --git a/mobs/orc.lua b/mobs/orc.lua index f319cbf..2f4b002 100644 --- a/mobs/orc.lua +++ b/mobs/orc.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:orc", { jump = true, water_damage = 0, lava_damage = 2, + fire_damage = 1, light_damage = 0, fall_damage = 1, fall_speed = -13, diff --git a/mobs/owl.lua b/mobs/owl.lua index d2d8fb8..82d5c3f 100644 --- a/mobs/owl.lua +++ b/mobs/owl.lua @@ -18,6 +18,7 @@ mobs:register_mob("dmobs:owl", { jump = false, water_damage = 2, lava_damage = 2, + fire_damage = 2, light_damage = 0, view_range = 1, do_custom = function(self) diff --git a/mobs/panda.lua b/mobs/panda.lua index 73e85ab..07bc8b5 100644 --- a/mobs/panda.lua +++ b/mobs/panda.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:panda", { }, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, fall_damage = 1, fall_speed = -10, diff --git a/mobs/pig.lua b/mobs/pig.lua index f59041b..c851ee7 100644 --- a/mobs/pig.lua +++ b/mobs/pig.lua @@ -41,6 +41,7 @@ mobs:register_mob("dmobs:pig", { end, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, follow = {"default:apple"}, view_range = 14, diff --git a/mobs/pig_evil.lua b/mobs/pig_evil.lua index a3d1eda..8e12da2 100644 --- a/mobs/pig_evil.lua +++ b/mobs/pig_evil.lua @@ -40,6 +40,7 @@ local pigdef = { end, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, follow = {"default:apple"}, view_range = 14, diff --git a/mobs/rat.lua b/mobs/rat.lua index fb18727..b603784 100644 --- a/mobs/rat.lua +++ b/mobs/rat.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:rat", { }, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, fall_damage = 1, fear_height = 5, diff --git a/mobs/skeleton.lua b/mobs/skeleton.lua index a66c0a8..69874af 100644 --- a/mobs/skeleton.lua +++ b/mobs/skeleton.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:skeleton", { }, water_damage = 0, lava_damage = 2, + fire_damage = 1, light_damage = 1, fall_damage = 0, fear_height = 10, diff --git a/mobs/tortoise.lua b/mobs/tortoise.lua index dd1e057..89ad538 100644 --- a/mobs/tortoise.lua +++ b/mobs/tortoise.lua @@ -27,6 +27,7 @@ mobs:register_mob("dmobs:tortoise", { }, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, fall_damage = 1, fall_speed = -10, diff --git a/mobs/treeman.lua b/mobs/treeman.lua index b5329d6..c7b7820 100644 --- a/mobs/treeman.lua +++ b/mobs/treeman.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:treeman", { }, water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, fall_damage = 1, fear_height = 10, diff --git a/mobs/wasps.lua b/mobs/wasps.lua index 663168a..6c0f562 100644 --- a/mobs/wasps.lua +++ b/mobs/wasps.lua @@ -27,6 +27,7 @@ mobs:register_mob("dmobs:wasp", { jump = true, water_damage = 2, lava_damage = 2, + fire_damage = 2, light_damage = 0, view_range = 14, animation = { diff --git a/mobs/whale.lua b/mobs/whale.lua index 9d5d0d2..f35516e 100644 --- a/mobs/whale.lua +++ b/mobs/whale.lua @@ -26,6 +26,7 @@ mobs:register_mob("dmobs:whale", { fly_in = "default:water_source", water_damage = 0, lava_damage = 2, + fire_damage = 2, light_damage = 0, follow = {"fishing:fish_cooked"}, view_range = 14, From 73fef41a8131159731617ae5dbf39d22b5da1f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B5=D1=80=D1=85=D0=B0=D1=80=D0=B4=20PICCORO=20Len?= =?UTF-8?q?z=20McKAY?= Date: Mon, 24 Jan 2022 09:46:49 -0400 Subject: [PATCH 2/3] 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 --- mobs/elephant.lua | 12 ++++++++++-- mobs/fox.lua | 10 +++++++++- mobs/gnorm.lua | 4 ++++ mobs/golem.lua | 1 + mobs/golem_friendly.lua | 3 +++ mobs/hedgehog.lua | 14 +++++++++++++- mobs/nyan.lua | 4 ++-- mobs/panda.lua | 5 ++++- mobs/pig.lua | 6 +++++- mobs/pig_evil.lua | 5 ++++- mobs/rat.lua | 12 +++++++++++- mobs/tortoise.lua | 19 +++++++++++++++---- 12 files changed, 81 insertions(+), 14 deletions(-) diff --git a/mobs/elephant.lua b/mobs/elephant.lua index 0250c31..e692974 100644 --- a/mobs/elephant.lua +++ b/mobs/elephant.lua @@ -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, diff --git a/mobs/fox.lua b/mobs/fox.lua index 78a505b..200cddd 100644 --- a/mobs/fox.lua +++ b/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, diff --git a/mobs/gnorm.lua b/mobs/gnorm.lua index f6d5f26..fcfe9fd 100644 --- a/mobs/gnorm.lua +++ b/mobs/gnorm.lua @@ -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", diff --git a/mobs/golem.lua b/mobs/golem.lua index 9d5c3ff..2275ed8 100644 --- a/mobs/golem.lua +++ b/mobs/golem.lua @@ -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, diff --git a/mobs/golem_friendly.lua b/mobs/golem_friendly.lua index ca94792..6fd494e 100644 --- a/mobs/golem_friendly.lua +++ b/mobs/golem_friendly.lua @@ -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, diff --git a/mobs/hedgehog.lua b/mobs/hedgehog.lua index c9dc87d..84193ea 100644 --- a/mobs/hedgehog.lua +++ b/mobs/hedgehog.lua @@ -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, diff --git a/mobs/nyan.lua b/mobs/nyan.lua index 92b5aef..f29a7b9 100644 --- a/mobs/nyan.lua +++ b/mobs/nyan.lua @@ -12,7 +12,7 @@ mobs:register_mob("dmobs:nyan", { textures = { {"dmobs_nyancat.png"}, }, - jump = true, + jump = true, fly = true, fall_speed = 0, stepheight = 1.5, @@ -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, diff --git a/mobs/panda.lua b/mobs/panda.lua index 07bc8b5..7d4bf01 100644 --- a/mobs/panda.lua +++ b/mobs/panda.lua @@ -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, diff --git a/mobs/pig.lua b/mobs/pig.lua index c851ee7..4e2596a 100644 --- a/mobs/pig.lua +++ b/mobs/pig.lua @@ -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, diff --git a/mobs/pig_evil.lua b/mobs/pig_evil.lua index 8e12da2..fda16d1 100644 --- a/mobs/pig_evil.lua +++ b/mobs/pig_evil.lua @@ -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, diff --git a/mobs/rat.lua b/mobs/rat.lua index b603784..306f269 100644 --- a/mobs/rat.lua +++ b/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, diff --git a/mobs/tortoise.lua b/mobs/tortoise.lua index 89ad538..d56d22a 100644 --- a/mobs/tortoise.lua +++ b/mobs/tortoise.lua @@ -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, From ed69b463021e5806ae271b9c74e62d2ed7e900a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B5=D1=80=D1=85=D0=B0=D1=80=D0=B4=20PICCORO=20Len?= =?UTF-8?q?z=20McKAY?= Date: Mon, 24 Jan 2022 10:08:27 -0400 Subject: [PATCH 3/3] fix missing depends bones due skeleton, mobs_animal and fix forced ones due farming * missing depends on mobs_animal due rats and fox * missing forced depends on farming https://notabug.org/TenPlus1/dmobs/issues/9 there's too many references on so must be forced * fix missing depends on bones due skeleton * add missing depends on mod.conf --- depends.txt | 4 +++- mobs/owl.lua | 1 + mobs/rat.lua | 5 ++++- mobs/skeleton.lua | 10 +++++++--- mod.conf | 2 ++ 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/depends.txt b/depends.txt index 5b6e05b..2113ba5 100644 --- a/depends.txt +++ b/depends.txt @@ -1,6 +1,8 @@ default mobs wool -farming? +farming +bones? ethereal? caverealms? +mobs_animal? diff --git a/mobs/owl.lua b/mobs/owl.lua index 514c439..13aa709 100644 --- a/mobs/owl.lua +++ b/mobs/owl.lua @@ -18,6 +18,7 @@ if minetest.get_modpath("mobs_animal") then table.insert(follow, "mobs_animal:bee") table.insert(follow, "mobs_animal:bunny") table.insert(follow, "mobs_animal:chicken") + table.insert(follow, "mobs_animal:muttom_raw") end -- compatibility with those made specially for other games if minetest.get_modpath("mobs_bugslive") then diff --git a/mobs/rat.lua b/mobs/rat.lua index 306f269..eeeb5a2 100644 --- a/mobs/rat.lua +++ b/mobs/rat.lua @@ -2,12 +2,15 @@ local followf = {} +table.insert(followf, "default:apple") + -- 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") + table.insert(followf, "mobs_animal:muttom_raw") + table.insert(followf, "mobs:meat_raw") end mobs:register_mob("dmobs:rat", { diff --git a/mobs/skeleton.lua b/mobs/skeleton.lua index 69874af..42d1037 100644 --- a/mobs/skeleton.lua +++ b/mobs/skeleton.lua @@ -1,5 +1,11 @@ --skeleton +local dropsf = {} + +-- detect common minetest famous mobs +if minetest.get_modpath("bones") then + table.insert(dropsf, "bones:bones") +end mobs:register_mob("dmobs:skeleton", { type = "monster", @@ -21,9 +27,7 @@ mobs:register_mob("dmobs:skeleton", { walk_velocity = 1, run_velocity = 2.5, jump = true, - drops = { - {name = "bones:bones", chance = 5, min = 3, max = 6}, - }, + drops = dropsf, water_damage = 0, lava_damage = 2, fire_damage = 1, diff --git a/mod.conf b/mod.conf index a9812b9..cd29655 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,3 @@ name = dmobs +depends = default, mobs, wool, farming +optional_depends = bones, ethereal, caverealms, mobs_animal