diff --git a/mod_sources.txt b/mod_sources.txt index ace6a6e..6247e68 100644 --- a/mod_sources.txt +++ b/mod_sources.txt @@ -132,10 +132,18 @@ origin https://github.com/Skandarella/Animal-World.git (fetch) * main d999da3 [origin/main] Add files via upload Mod: mobs/mobs_mobs/Animal-World +origin https://github.com/hkzorman/advanced_npc.git (fetch) +* master a43233f [origin/master] Merge pull request #53 from hkzorman/clean_api +Mod: mobs/mobs_mobs/advanced_npc + origin https://github.com/FreeLikeGNU/goblins.git (fetch) * master a680780 [origin/master] fix issue #14 Mod: mobs/mobs_mobs/goblins +origin https://github.com/hkzorman/mg_villages_npc.git (fetch) +* master 10478a5 [origin/master] Commit +Mod: mobs/mobs_mobs/mg_villages_npc + origin https://codeberg.org/Hamlet/mobs_ghost_redo (fetch) * master ac9c013 [origin/master] v0.7.0 Mod: mobs/mobs_mobs/mobs_ghost_redo @@ -145,7 +153,7 @@ origin https://codeberg.org/Hamlet/mobs_humans (fetch) Mod: mobs/mobs_mobs/mobs_humans origin https://notabug.org/TenPlus1/mobs_monster.git (fetch) -* master 9835105 [origin/master] fix typo in mod.conf +* master 57f40cf [origin/master] make cave spider tiny Mod: mobs/mobs_mobs/mobs_monster origin https://github.com/berengma/aerotest (fetch) @@ -161,7 +169,7 @@ origin https://github.com/berengma/water_life (fetch) Mod: mobs/mobs_mobkit/water_life origin https://github.com/minetest-mods/3d_armor (fetch) -* master 42f7dac [origin/master] Update fire and water protection (#42) +* master 31aa979 [origin/master] 3darmor sfinv spanish translation Mod: player/3d_armor origin https://github.com/appgurueu/character_anim (fetch) diff --git a/mods/mobs/mobs_mobs/mobs_monster/dirt_monster.lua b/mods/mobs/mobs_mobs/mobs_monster/dirt_monster.lua index 518116a..31e515a 100644 --- a/mods/mobs/mobs_mobs/mobs_monster/dirt_monster.lua +++ b/mods/mobs/mobs_mobs/mobs_monster/dirt_monster.lua @@ -1,6 +1,16 @@ local S = mobs.intllib +local dirt_types = { + + { nodes = {"ethereal:dry_dirt"}, + skins = {"mobs_dirt_monster3.png"}, + drops = { + {name = "ethereal:dry_dirt", chance = 1, min = 0, max = 2} + } + } +} + -- Dirt Monster by PilzAdam @@ -19,6 +29,7 @@ mobs:register_mob("mobs_monster:dirt_monster", { mesh = "mobs_stone_monster.b3d", textures = { {"mobs_dirt_monster.png"}, + {"mobs_dirt_monster2.png"}, }, blood_texture = "default_dirt.png", makes_footstep_sound = true, @@ -48,19 +59,39 @@ mobs:register_mob("mobs_monster:dirt_monster", { punch_start = 40, punch_end = 63, }, + + -- check surrounding nodes and spawn a specific spider + on_spawn = function(self) + + local pos = self.object:get_pos() ; pos.y = pos.y - 1 + local tmp + + for n = 1, #dirt_types do + + tmp = dirt_types[n] + + if minetest.find_node_near(pos, 1, tmp.nodes) then + + self.base_texture = tmp.skins + self.object:set_properties({textures = tmp.skins}) + + if tmp.drops then + self.drops = tmp.drops + end + + return true + end + end + + return true -- run only once, false/nil runs every activation + end }) -local spawn_on = "default:dirt_with_grass" - -if minetest.get_modpath("ethereal") then - spawn_on = "ethereal:gray_dirt" -end - if not mobs.custom_spawn_monster then mobs:spawn({ name = "mobs_monster:dirt_monster", - nodes = {spawn_on}, + nodes = {"default:dirt_with_grass", "ethereal:gray_dirt", "ethereal:dry_dirt"}, min_light = 0, max_light = 7, chance = 6000, diff --git a/mods/mobs/mobs_mobs/mobs_monster/oerkki.lua b/mods/mobs/mobs_mobs/mobs_monster/oerkki.lua index 6e42c42..f706b43 100644 --- a/mods/mobs/mobs_mobs/mobs_monster/oerkki.lua +++ b/mods/mobs/mobs_mobs/mobs_monster/oerkki.lua @@ -20,6 +20,7 @@ mobs:register_mob("mobs_monster:oerkki", { textures = { {"mobs_oerkki.png"}, {"mobs_oerkki2.png"}, + {"mobs_oerkki3.png"}, }, makes_footstep_sound = false, sounds = { diff --git a/mods/mobs/mobs_mobs/mobs_monster/spider.lua b/mods/mobs/mobs_mobs/mobs_monster/spider.lua index 9cb4ae1..4a74b3b 100644 --- a/mods/mobs/mobs_mobs/mobs_monster/spider.lua +++ b/mods/mobs/mobs_mobs/mobs_monster/spider.lua @@ -11,6 +11,47 @@ local get_velocity = function(self) return (v.x * v.x + v.z * v.z) ^ 0.5 end + +local spider_types = { + + { nodes = {"default:snow", "default:snowblock", "default:dirt_with_snow"}, + skins = {"mobs_spider_snowy.png"}, + docile = true, + drops = nil + }, + + { nodes = {"default:dirt_with_rainforest_litter", "default:jungletree"}, + skins = {"mobs_spider_orange.png"}, + docile = true, + drops = nil, + shoot = true + }, + + { nodes = {"default:stone", "default:gravel"}, + skins = {"mobs_spider_grey.png"}, + docile = nil, + drops = nil, + small = true + }, + + { nodes = {"default:mese", "default:stone_with_mese"}, + skins = {"mobs_spider_mese.png"}, + docile = nil, + drops = { + {name = "farming:string", chance = 1, min = 0, max = 2}, + {name = "default:mese_crystal_fragment", chance = 2, min = 1, max = 4}} + }, + + { nodes = {"ethereal:crystal_dirt", "ethereal:crystal_spike"}, + skins = {"mobs_spider_crystal.png"}, + docile = true, + drops = { + {name = "farming:string", chance = 1, min = 0, max = 2}, + {name = "ethereal:crystal_spike", chance = 15, min = 1, max = 2}} + } +} + + -- Spider by AspireMint (CC-BY-SA 3.0 license) mobs:register_mob("mobs_monster:spider", { @@ -53,7 +94,7 @@ mobs:register_mob("mobs_monster:spider", { light_damage = 0, animation = { speed_normal = 15, - speed_run = 20,--15, + speed_run = 20, stand_start = 0, stand_end = 0, walk_start = 1, @@ -63,42 +104,46 @@ mobs:register_mob("mobs_monster:spider", { punch_start = 25, punch_end = 45, }, - -- what kind of spider are we spawning? + + -- check surrounding nodes and spawn a specific spider on_spawn = function(self) local pos = self.object:get_pos() ; pos.y = pos.y - 1 + local tmp - -- snowy spider - if minetest.find_node_near(pos, 1, - {"default:snow", "default:snowblock", "default:dirt_with_snow"}) then - self.base_texture = {"mobs_spider_snowy.png"} - self.object:set_properties({textures = self.base_texture}) - self.docile_by_day = true - -- tarantula - elseif minetest.find_node_near(pos, 1, - {"default:dirt_with_rainforest_litter", "default:jungletree"}) then - self.base_texture = {"mobs_spider_orange.png"} - self.object:set_properties({textures = self.base_texture}) - self.docile_by_day = true - -- grey spider - elseif minetest.find_node_near(pos, 1, - {"default:stone", "default:gravel"}) then - self.base_texture = {"mobs_spider_grey.png"} - self.object:set_properties({textures = self.base_texture}) - -- mese spider - elseif minetest.find_node_near(pos, 1, - {"default:mese", "default:stone_with_mese"}) then - self.base_texture = {"mobs_spider_mese.png"} - self.object:set_properties({textures = self.base_texture}) - elseif minetest.find_node_near(pos, 1, - {"ethereal:crystal_dirt", "ethereal:crystal_spike"}) then - self.base_texture = {"mobs_spider_crystal.png"} - self.object:set_properties({textures = self.base_texture}) - self.docile_by_day = true - self.drops = { - {name = "farming:string", chance = 1, min = 0, max = 2}, - {name = "ethereal:crystal_spike", chance = 15, min = 1, max = 2}, - } + for n = 1, #spider_types do + + tmp = spider_types[n] + + if minetest.find_node_near(pos, 1, tmp.nodes) then + + self.base_texture = tmp.skins + self.object:set_properties({textures = tmp.skins}) + self.docile_by_day = tmp.docile + + if tmp.drops then + self.drops = tmp.drops + end + + if tmp.shoot then + self.attack_type = "dogshoot" + self.arrow = "mobs_monster:cobweb" + self.dogshoot_switch = 1 + self.dogshoot_count_max = 60 + self.dogshoot_count2_max = 20 + self.shoot_interval = 2 + self.shoot_offset = 2 + end + + if tmp.small then + self.object:set_properties({ + collisionbox = {-0.2, -0.2, -0.2, 0.2, 0, 0.2}, + visual_size = {x = 0.25, y = 0.25} + }) + end + + return true + end end return true -- run only once, false/nil runs every activation @@ -233,7 +278,7 @@ minetest.register_node(":mobs:cobweb", { walkable = false, groups = {snappy = 1, disable_jump = 1}, drop = "farming:string", - sounds = default.node_sound_leaves_defaults(), + sounds = default.node_sound_leaves_defaults() }) minetest.register_craft({ @@ -244,3 +289,48 @@ minetest.register_craft({ {"farming:string", "", "farming:string"}, } }) + + +local web_place = function(pos) + + local pos2 = minetest.find_node_near(pos, 1, {"air", "group:leaves"}, true) + + if pos2 then + minetest.swap_node(pos2, {name = "mobs:cobweb"}) + end +end + +mobs:register_arrow("mobs_monster:cobweb", { + visual = "sprite", + visual_size = {x = 1, y = 1}, + textures = {"mobs_cobweb.png"}, + collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + velocity = 15, + tail = 1, + tail_texture = "mobs_cobweb.png", + tail_size = 5, + glow = 2, + expire = 0.1, + + hit_player = function(self, player) + + player:punch(self.object, 1.0, { + full_punch_interval = 2.0, + damage_groups = {fleshy = 3}, + }, nil) + + web_place(self.object:get_pos()) + end, + + hit_node = function(self, pos, node) + web_place(pos) + end, + + hit_mob = function(self, player) + + player:punch(self.object, 1.0, { + full_punch_interval = 2.0, + damage_groups = {fleshy = 3}, + }, nil) + end +}) diff --git a/mods/mobs/mobs_mobs/mobs_monster/stone_monster.lua b/mods/mobs/mobs_mobs/mobs_monster/stone_monster.lua index 34197d7..eb8d650 100644 --- a/mods/mobs/mobs_mobs/mobs_monster/stone_monster.lua +++ b/mods/mobs/mobs_mobs/mobs_monster/stone_monster.lua @@ -1,6 +1,18 @@ local S = mobs.intllib +local stone_types = { + + { nodes = {"default:desert_stone"}, + skins = {"mobs_stone_monster3.png"}, + drops = { + {name = "default:desert_cobble", chance = 1, min = 0, max = 2}, + {name = "default:iron_lump", chance = 5, min = 0, max = 2}, + {name = "default:gold_lump", chance = 5, min = 0, max = 2} + } + } +} + -- Stone Monster by PilzAdam @@ -34,7 +46,7 @@ mobs:register_mob("mobs_monster:stone_monster", { drops = { {name = "default:cobble", chance = 1, min = 0, max = 2}, {name = "default:coal_lump", chance = 3, min = 0, max = 2}, - {name = "default:iron_lump", chance = 5, min = 0, max = 2}, + {name = "default:iron_lump", chance = 5, min = 0, max = 2} }, water_damage = 0, lava_damage = 1, @@ -59,6 +71,32 @@ mobs:register_mob("mobs_monster:stone_monster", { {"default:pick_mese", 6}, {"default:pick_diamond", 7}, }, + + -- check surrounding nodes and spawn a specific spider + on_spawn = function(self) + + local pos = self.object:get_pos() ; pos.y = pos.y - 1 + local tmp + + for n = 1, #stone_types do + + tmp = stone_types[n] + + if minetest.find_node_near(pos, 1, tmp.nodes) then + + self.base_texture = tmp.skins + self.object:set_properties({textures = tmp.skins}) + + if tmp.drops then + self.drops = tmp.drops + end + + return true + end + end + + return true -- run only once, false/nil runs every activation + end }) diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_dirt_monster2.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_dirt_monster2.png new file mode 100644 index 0000000..964698c Binary files /dev/null and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_dirt_monster2.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_dirt_monster3.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_dirt_monster3.png new file mode 100644 index 0000000..f11faee Binary files /dev/null and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_dirt_monster3.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_oerkki3.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_oerkki3.png new file mode 100644 index 0000000..8c24d5c Binary files /dev/null and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_oerkki3.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_stone_monster2.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_stone_monster2.png index 70bfc6e..9c76b83 100644 Binary files a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_stone_monster2.png and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_stone_monster2.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_stone_monster3.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_stone_monster3.png new file mode 100644 index 0000000..70bfc6e Binary files /dev/null and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_stone_monster3.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster3.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster3.png new file mode 100644 index 0000000..9e18fb2 Binary files /dev/null and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster3.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster4.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster4.png new file mode 100644 index 0000000..6299e32 Binary files /dev/null and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster4.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster5.png b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster5.png new file mode 100644 index 0000000..67cd508 Binary files /dev/null and b/mods/mobs/mobs_mobs/mobs_monster/textures/mobs_tree_monster5.png differ diff --git a/mods/mobs/mobs_mobs/mobs_monster/tree_monster.lua b/mods/mobs/mobs_mobs/mobs_monster/tree_monster.lua index c1abbea..1708e46 100644 --- a/mods/mobs/mobs_mobs/mobs_monster/tree_monster.lua +++ b/mods/mobs/mobs_mobs/mobs_monster/tree_monster.lua @@ -1,6 +1,39 @@ local S = mobs.intllib +local tree_types = { + + { nodes = {"ethereal:sakura_leaves", "ethereal:sakura_leaves2"}, + skins = {"mobs_tree_monster5.png"}, + drops = { + {name = "default:stick", chance = 1, min = 1, max = 3}, + {name = "ethereal:sakura_leaves", chance = 1, min = 1, max = 2}, + {name = "ethereal:sakura_trunk", chance = 2, min = 1, max = 2}, + {name = "ethereal:sakura_tree_sapling", chance = 2, min = 0, max = 2}, + } + }, + + { nodes = {"ethereal:frost_leaves"}, + skins = {"mobs_tree_monster3.png"}, + drops = { + {name = "default:stick", chance = 1, min = 1, max = 3}, + {name = "ethereal:frost_leaves", chance = 1, min = 1, max = 2}, + {name = "ethereal:frost_tree", chance = 2, min = 1, max = 2}, + {name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2}, + } + }, + + { nodes = {"ethereal:yellowleaves"}, + skins = {"mobs_tree_monster4.png"}, + drops = { + {name = "default:stick", chance = 1, min = 1, max = 3}, + {name = "ethereal:yellowleaves", chance = 1, min = 1, max = 2}, + {name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2}, + {name = "ethereal:golden_apple", chance = 3, min = 0, max = 2}, + } + } +} + -- Tree Monster (or Tree Gollum) by PilzAdam @@ -64,13 +97,39 @@ mobs:register_mob("mobs_monster:tree_monster", { punch_start = 48, punch_end = 62, }, + + -- check surrounding nodes and spawn a specific spider + on_spawn = function(self) + + local pos = self.object:get_pos() ; pos.y = pos.y - 1 + local tmp + + for n = 1, #tree_types do + + tmp = tree_types[n] + + if minetest.find_node_near(pos, 1, tmp.nodes) then + + self.base_texture = tmp.skins + self.object:set_properties({textures = tmp.skins}) + + if tmp.drops then + self.drops = tmp.drops + end + + return true + end + end + + return true -- run only once, false/nil runs every activation + end }) if not mobs.custom_spawn_monster then mobs:spawn({ name = "mobs_monster:tree_monster", - nodes = {"default:leaves", "default:jungleleaves"}, + nodes = {"group:leaves"}, --{"default:leaves", "default:jungleleaves"}, max_light = 7, chance = 7000, min_height = 0,