diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index 3b5fd9c4..5273fa72 100755 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -1,4 +1,4 @@ --- Mobs Api (18th August 2015) +-- Mobs Api (28th August 2015) mobs = {} mobs.mod = "redo" @@ -606,7 +606,8 @@ function mobs:register_mob(name, def) if self.type == "npc" and self.order == "follow" - and self.state ~= "attack" and self.owner ~= "" then --/MFF (Crabman|07/14/2015) follow diamond if has not owner + and self.state ~= "attack" + and self.owner ~= "" then -- npc stop following player if not owner if self.following and self.owner @@ -1319,7 +1320,6 @@ function mobs:explosion(pos, radius, fire, smoke, sound) if not fire then fire = 0 end if not smoke then smoke = 0 end local pos = vector.round(pos) - local radius = 1 local vm = VoxelManip() local minp, maxp = vm:read_from_map(vector.subtract(pos, radius), vector.add(pos, radius)) local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) @@ -1350,21 +1350,27 @@ function mobs:explosion(pos, radius, fire, smoke, sound) p.y = pos.y + y p.z = pos.z + z if p.y >= 19600 --MFF - and data[vi] ~= c_air and data[vi] ~= c_ignore - and data[vi] ~= c_obsidian and data[vi] ~= c_brick + and data[vi] ~= c_air + and data[vi] ~= c_ignore + and data[vi] ~= c_obsidian + and data[vi] ~= c_brick and data[vi] ~= c_chest then local n = minetest.get_node(p).name if not minetest.is_protected(p, "") --/MFF (Crabman|06/23/2015) re-added node protected in areas and minetest.get_item_group(n, "unbreakable") ~= 1 then -- if chest then drop items inside - if n == "default:chest" or n == "3dchest:chest" then + if n == "default:chest" + or n == "3dchest:chest" then local meta = minetest.get_meta(p) local inv = meta:get_inventory() for i = 1,32 do local m_stack = inv:get_stack("main", i) - local obj = minetest.add_item(pos, m_stack) + local obj = minetest.add_item(p, m_stack) if obj then - obj:setvelocity({x = math.random(-2, 2), y = 7, z = math.random(-2, 2)}) + obj:setvelocity({ + x = math.random(-2, 2), + y = 7, + z = math.random(-2, 2)}) end end end @@ -1506,7 +1512,9 @@ function mobs:register_arrow(name, def) end if self.hit_mob and player:get_luaentity().name ~= self.object:get_luaentity().name - and player:get_luaentity().name ~= "__builtin:item" then + and player:get_luaentity().name ~= "__builtin:item" + and player:get_luaentity().name ~= "gauges:hp_bar" + and player:get_luaentity().name ~= "signs:text" then self.hit_mob(self, player) self.object:remove() ; -- print ("hit mob") return @@ -1604,28 +1612,22 @@ end -- follow what I'm holding ? function follow_holding(self, clicker) local item = clicker:get_wielded_item() - local follow_item = false local t = type(self.follow) -- single item if t == "string" and item:get_name() == self.follow then - follow_item = true + return true -- multiple items elseif t == "table" then for no = 1, #self.follow do if self.follow[no] == item:get_name() then - follow_item = true + return true end end end - -- true if can eat/tame with item - if follow_item == true then - return true - end - return false end diff --git a/mods/mobs/init.lua b/mods/mobs/init.lua index baa8bec2..6ea789a4 100755 --- a/mods/mobs/init.lua +++ b/mods/mobs/init.lua @@ -60,6 +60,4 @@ dofile(path.."/crafts.lua") -- Mob menu spawner special MFF dofile(path.."/mff_menu.lua") -if minetest.setting_get("log_mods") then - minetest.log("action", "mobs loaded") -end +print ("[MOD] Mobs Redo loaded") diff --git a/mods/mobs/npc.lua b/mods/mobs/npc.lua index 93821cba..c2f48814 100755 --- a/mods/mobs/npc.lua +++ b/mods/mobs/npc.lua @@ -100,7 +100,9 @@ mobs:register_mob("mobs:npc", { end local pos = self.object:getpos() pos.y = pos.y + 0.5 - minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]}) + minetest.add_item(pos, { + name = mobs.npc_drops[math.random(1,#mobs.npc_drops)] + }) return -- if owner switch between follow and stand elseif self.owner and self.owner == clicker:get_player_name() then diff --git a/mods/mobs/sounds/default_punch.ogg b/mods/mobs/sounds/default_punch.ogg index 28a500bf..1c5dce32 100755 Binary files a/mods/mobs/sounds/default_punch.ogg and b/mods/mobs/sounds/default_punch.ogg differ diff --git a/mods/mobs/sounds/mobs_bee.ogg b/mods/mobs/sounds/mobs_bee.ogg index 1a8b235b..00516053 100755 Binary files a/mods/mobs/sounds/mobs_bee.ogg and b/mods/mobs/sounds/mobs_bee.ogg differ diff --git a/mods/mobs/sounds/mobs_chicken.ogg b/mods/mobs/sounds/mobs_chicken.ogg index 97189013..4aa7d6ac 100755 Binary files a/mods/mobs/sounds/mobs_chicken.ogg and b/mods/mobs/sounds/mobs_chicken.ogg differ diff --git a/mods/mobs/sounds/mobs_cow.ogg b/mods/mobs/sounds/mobs_cow.ogg index 714bf581..4efd259e 100755 Binary files a/mods/mobs/sounds/mobs_cow.ogg and b/mods/mobs/sounds/mobs_cow.ogg differ diff --git a/mods/mobs/sounds/mobs_dirtmonster.1.ogg b/mods/mobs/sounds/mobs_dirtmonster.1.ogg index cf1d5c52..ea956424 100755 Binary files a/mods/mobs/sounds/mobs_dirtmonster.1.ogg and b/mods/mobs/sounds/mobs_dirtmonster.1.ogg differ diff --git a/mods/mobs/sounds/mobs_dirtmonster.2.ogg b/mods/mobs/sounds/mobs_dirtmonster.2.ogg index ba72e5c4..1e152417 100755 Binary files a/mods/mobs/sounds/mobs_dirtmonster.2.ogg and b/mods/mobs/sounds/mobs_dirtmonster.2.ogg differ diff --git a/mods/mobs/sounds/mobs_dungeonmaster.1.ogg b/mods/mobs/sounds/mobs_dungeonmaster.1.ogg index ac08570b..c6f0b82b 100755 Binary files a/mods/mobs/sounds/mobs_dungeonmaster.1.ogg and b/mods/mobs/sounds/mobs_dungeonmaster.1.ogg differ diff --git a/mods/mobs/sounds/mobs_dungeonmaster.2.ogg b/mods/mobs/sounds/mobs_dungeonmaster.2.ogg index 4af2fc2a..1e2d1bec 100755 Binary files a/mods/mobs/sounds/mobs_dungeonmaster.2.ogg and b/mods/mobs/sounds/mobs_dungeonmaster.2.ogg differ diff --git a/mods/mobs/sounds/mobs_dungeonmaster.3.ogg b/mods/mobs/sounds/mobs_dungeonmaster.3.ogg index 43447535..e113a136 100755 Binary files a/mods/mobs/sounds/mobs_dungeonmaster.3.ogg and b/mods/mobs/sounds/mobs_dungeonmaster.3.ogg differ diff --git a/mods/mobs/sounds/mobs_eerie.ogg b/mods/mobs/sounds/mobs_eerie.ogg index 52627c63..41ffa4d7 100755 Binary files a/mods/mobs/sounds/mobs_eerie.ogg and b/mods/mobs/sounds/mobs_eerie.ogg differ diff --git a/mods/mobs/sounds/mobs_fireball.ogg b/mods/mobs/sounds/mobs_fireball.ogg index ef9ac492..6f8f7021 100755 Binary files a/mods/mobs/sounds/mobs_fireball.ogg and b/mods/mobs/sounds/mobs_fireball.ogg differ diff --git a/mods/mobs/sounds/mobs_howl.ogg b/mods/mobs/sounds/mobs_howl.ogg index 83936db4..aff34212 100755 Binary files a/mods/mobs/sounds/mobs_howl.ogg and b/mods/mobs/sounds/mobs_howl.ogg differ diff --git a/mods/mobs/sounds/mobs_kitten.1.ogg b/mods/mobs/sounds/mobs_kitten.1.ogg index 94474058..e19af4a3 100755 Binary files a/mods/mobs/sounds/mobs_kitten.1.ogg and b/mods/mobs/sounds/mobs_kitten.1.ogg differ diff --git a/mods/mobs/sounds/mobs_kitten.2.ogg b/mods/mobs/sounds/mobs_kitten.2.ogg index 5bb98b8e..a4ed80a4 100755 Binary files a/mods/mobs/sounds/mobs_kitten.2.ogg and b/mods/mobs/sounds/mobs_kitten.2.ogg differ diff --git a/mods/mobs/sounds/mobs_kitten.3.ogg b/mods/mobs/sounds/mobs_kitten.3.ogg index 5d9b90f8..56ac4452 100755 Binary files a/mods/mobs/sounds/mobs_kitten.3.ogg and b/mods/mobs/sounds/mobs_kitten.3.ogg differ diff --git a/mods/mobs/sounds/mobs_kitten.4.ogg b/mods/mobs/sounds/mobs_kitten.4.ogg index 59c20403..01e6522f 100755 Binary files a/mods/mobs/sounds/mobs_kitten.4.ogg and b/mods/mobs/sounds/mobs_kitten.4.ogg differ diff --git a/mods/mobs/sounds/mobs_kitten.5.ogg b/mods/mobs/sounds/mobs_kitten.5.ogg index d6ee490e..2f5d2bd4 100755 Binary files a/mods/mobs/sounds/mobs_kitten.5.ogg and b/mods/mobs/sounds/mobs_kitten.5.ogg differ diff --git a/mods/mobs/sounds/mobs_kitten.6.ogg b/mods/mobs/sounds/mobs_kitten.6.ogg index bfaf9df2..da8587b2 100755 Binary files a/mods/mobs/sounds/mobs_kitten.6.ogg and b/mods/mobs/sounds/mobs_kitten.6.ogg differ diff --git a/mods/mobs/sounds/mobs_lavaflan.1.ogg b/mods/mobs/sounds/mobs_lavaflan.1.ogg index 902b4e75..02b4c247 100755 Binary files a/mods/mobs/sounds/mobs_lavaflan.1.ogg and b/mods/mobs/sounds/mobs_lavaflan.1.ogg differ diff --git a/mods/mobs/sounds/mobs_lavaflan.2.ogg b/mods/mobs/sounds/mobs_lavaflan.2.ogg index 2e8424c5..3e7ab3ff 100755 Binary files a/mods/mobs/sounds/mobs_lavaflan.2.ogg and b/mods/mobs/sounds/mobs_lavaflan.2.ogg differ diff --git a/mods/mobs/sounds/mobs_mesemonster.1.ogg b/mods/mobs/sounds/mobs_mesemonster.1.ogg index f35983bd..910e61e7 100755 Binary files a/mods/mobs/sounds/mobs_mesemonster.1.ogg and b/mods/mobs/sounds/mobs_mesemonster.1.ogg differ diff --git a/mods/mobs/sounds/mobs_mesemonster.2.ogg b/mods/mobs/sounds/mobs_mesemonster.2.ogg index de0a6ae4..22180838 100755 Binary files a/mods/mobs/sounds/mobs_mesemonster.2.ogg and b/mods/mobs/sounds/mobs_mesemonster.2.ogg differ diff --git a/mods/mobs/sounds/mobs_npc.1.ogg b/mods/mobs/sounds/mobs_npc.1.ogg index 6758267e..e473c8e8 100755 Binary files a/mods/mobs/sounds/mobs_npc.1.ogg and b/mods/mobs/sounds/mobs_npc.1.ogg differ diff --git a/mods/mobs/sounds/mobs_npc.2.ogg b/mods/mobs/sounds/mobs_npc.2.ogg index 332e19cf..9d7c1a88 100755 Binary files a/mods/mobs/sounds/mobs_npc.2.ogg and b/mods/mobs/sounds/mobs_npc.2.ogg differ diff --git a/mods/mobs/sounds/mobs_npc_attack.ogg b/mods/mobs/sounds/mobs_npc_attack.ogg index 07b987c6..44bf448b 100755 Binary files a/mods/mobs/sounds/mobs_npc_attack.ogg and b/mods/mobs/sounds/mobs_npc_attack.ogg differ diff --git a/mods/mobs/sounds/mobs_npc_death.ogg b/mods/mobs/sounds/mobs_npc_death.ogg index d63d313d..ccb4906f 100755 Binary files a/mods/mobs/sounds/mobs_npc_death.ogg and b/mods/mobs/sounds/mobs_npc_death.ogg differ diff --git a/mods/mobs/sounds/mobs_npc_hit.ogg b/mods/mobs/sounds/mobs_npc_hit.ogg index 1c17403e..a4073902 100755 Binary files a/mods/mobs/sounds/mobs_npc_hit.ogg and b/mods/mobs/sounds/mobs_npc_hit.ogg differ diff --git a/mods/mobs/sounds/mobs_oerkki.1.ogg b/mods/mobs/sounds/mobs_oerkki.1.ogg index 86ace835..55d5dbaf 100755 Binary files a/mods/mobs/sounds/mobs_oerkki.1.ogg and b/mods/mobs/sounds/mobs_oerkki.1.ogg differ diff --git a/mods/mobs/sounds/mobs_oerkki.2.ogg b/mods/mobs/sounds/mobs_oerkki.2.ogg index df4928a6..84fd702d 100755 Binary files a/mods/mobs/sounds/mobs_oerkki.2.ogg and b/mods/mobs/sounds/mobs_oerkki.2.ogg differ diff --git a/mods/mobs/sounds/mobs_oerkki_attack.ogg b/mods/mobs/sounds/mobs_oerkki_attack.ogg index 82051dd5..df916a9e 100755 Binary files a/mods/mobs/sounds/mobs_oerkki_attack.ogg and b/mods/mobs/sounds/mobs_oerkki_attack.ogg differ diff --git a/mods/mobs/sounds/mobs_pig.ogg b/mods/mobs/sounds/mobs_pig.ogg index e7c7591e..d9ae5f9d 100755 Binary files a/mods/mobs/sounds/mobs_pig.ogg and b/mods/mobs/sounds/mobs_pig.ogg differ diff --git a/mods/mobs/sounds/mobs_pig_angry.ogg b/mods/mobs/sounds/mobs_pig_angry.ogg index 2a4f47b4..70257882 100755 Binary files a/mods/mobs/sounds/mobs_pig_angry.ogg and b/mods/mobs/sounds/mobs_pig_angry.ogg differ diff --git a/mods/mobs/sounds/mobs_rat.1.ogg b/mods/mobs/sounds/mobs_rat.1.ogg index 51484163..9062e8c5 100755 Binary files a/mods/mobs/sounds/mobs_rat.1.ogg and b/mods/mobs/sounds/mobs_rat.1.ogg differ diff --git a/mods/mobs/sounds/mobs_rat.2.ogg b/mods/mobs/sounds/mobs_rat.2.ogg index 15bfd76b..1669ae72 100755 Binary files a/mods/mobs/sounds/mobs_rat.2.ogg and b/mods/mobs/sounds/mobs_rat.2.ogg differ diff --git a/mods/mobs/sounds/mobs_sandmonster.1.ogg b/mods/mobs/sounds/mobs_sandmonster.1.ogg index 91e77f95..e588afce 100755 Binary files a/mods/mobs/sounds/mobs_sandmonster.1.ogg and b/mods/mobs/sounds/mobs_sandmonster.1.ogg differ diff --git a/mods/mobs/sounds/mobs_sandmonster.2.ogg b/mods/mobs/sounds/mobs_sandmonster.2.ogg index 577cfa30..532b3cee 100755 Binary files a/mods/mobs/sounds/mobs_sandmonster.2.ogg and b/mods/mobs/sounds/mobs_sandmonster.2.ogg differ diff --git a/mods/mobs/sounds/mobs_sheep.ogg b/mods/mobs/sounds/mobs_sheep.ogg index 54f62cd6..7cc52625 100755 Binary files a/mods/mobs/sounds/mobs_sheep.ogg and b/mods/mobs/sounds/mobs_sheep.ogg differ diff --git a/mods/mobs/sounds/mobs_slimes_attack.ogg b/mods/mobs/sounds/mobs_slimes_attack.ogg index 7afa4cbb..b4c7b5d0 100755 Binary files a/mods/mobs/sounds/mobs_slimes_attack.ogg and b/mods/mobs/sounds/mobs_slimes_attack.ogg differ diff --git a/mods/mobs/sounds/mobs_slimes_damage.ogg b/mods/mobs/sounds/mobs_slimes_damage.ogg index 966ff77e..4246e98c 100755 Binary files a/mods/mobs/sounds/mobs_slimes_damage.ogg and b/mods/mobs/sounds/mobs_slimes_damage.ogg differ diff --git a/mods/mobs/sounds/mobs_slimes_death.ogg b/mods/mobs/sounds/mobs_slimes_death.ogg index 7eef1f4c..212148df 100755 Binary files a/mods/mobs/sounds/mobs_slimes_death.ogg and b/mods/mobs/sounds/mobs_slimes_death.ogg differ diff --git a/mods/mobs/sounds/mobs_slimes_jump.ogg b/mods/mobs/sounds/mobs_slimes_jump.ogg index 2c836e41..6abfbf62 100755 Binary files a/mods/mobs/sounds/mobs_slimes_jump.ogg and b/mods/mobs/sounds/mobs_slimes_jump.ogg differ diff --git a/mods/mobs/sounds/mobs_spider.ogg b/mods/mobs/sounds/mobs_spider.ogg index 17c740cd..335918bf 100755 Binary files a/mods/mobs/sounds/mobs_spider.ogg and b/mods/mobs/sounds/mobs_spider.ogg differ diff --git a/mods/mobs/sounds/mobs_spider_attack.ogg b/mods/mobs/sounds/mobs_spider_attack.ogg index a495666a..dcb0fbaa 100755 Binary files a/mods/mobs/sounds/mobs_spider_attack.ogg and b/mods/mobs/sounds/mobs_spider_attack.ogg differ diff --git a/mods/mobs/sounds/mobs_stonemonster.1.ogg b/mods/mobs/sounds/mobs_stonemonster.1.ogg index 53714bce..e6dce88a 100755 Binary files a/mods/mobs/sounds/mobs_stonemonster.1.ogg and b/mods/mobs/sounds/mobs_stonemonster.1.ogg differ diff --git a/mods/mobs/sounds/mobs_stonemonster.2.ogg b/mods/mobs/sounds/mobs_stonemonster.2.ogg index 88c53f54..4f2c074f 100755 Binary files a/mods/mobs/sounds/mobs_stonemonster.2.ogg and b/mods/mobs/sounds/mobs_stonemonster.2.ogg differ diff --git a/mods/mobs/sounds/mobs_stonemonster_attack.ogg b/mods/mobs/sounds/mobs_stonemonster_attack.ogg index 2d2b9f14..a87ac55c 100755 Binary files a/mods/mobs/sounds/mobs_stonemonster_attack.ogg and b/mods/mobs/sounds/mobs_stonemonster_attack.ogg differ diff --git a/mods/mobs/sounds/mobs_treemonster.1.ogg b/mods/mobs/sounds/mobs_treemonster.1.ogg index 7d156c5f..a5458045 100755 Binary files a/mods/mobs/sounds/mobs_treemonster.1.ogg and b/mods/mobs/sounds/mobs_treemonster.1.ogg differ diff --git a/mods/mobs/sounds/mobs_treemonster.2.ogg b/mods/mobs/sounds/mobs_treemonster.2.ogg index cfcf8010..ffad9be8 100755 Binary files a/mods/mobs/sounds/mobs_treemonster.2.ogg and b/mods/mobs/sounds/mobs_treemonster.2.ogg differ diff --git a/mods/mobs/sounds/mobs_wolf.ogg b/mods/mobs/sounds/mobs_wolf.ogg index 22ef3d50..d2ab9771 100755 Binary files a/mods/mobs/sounds/mobs_wolf.ogg and b/mods/mobs/sounds/mobs_wolf.ogg differ diff --git a/mods/mobs/sounds/mobs_wolf_attack.ogg b/mods/mobs/sounds/mobs_wolf_attack.ogg index 170481bc..740c26d2 100755 Binary files a/mods/mobs/sounds/mobs_wolf_attack.ogg and b/mods/mobs/sounds/mobs_wolf_attack.ogg differ diff --git a/mods/mobs/sounds/mobs_zombie.1.ogg b/mods/mobs/sounds/mobs_zombie.1.ogg index 413ba241..44130f4e 100755 Binary files a/mods/mobs/sounds/mobs_zombie.1.ogg and b/mods/mobs/sounds/mobs_zombie.1.ogg differ diff --git a/mods/mobs/sounds/mobs_zombie.2.ogg b/mods/mobs/sounds/mobs_zombie.2.ogg index 415c187c..3b12398d 100755 Binary files a/mods/mobs/sounds/mobs_zombie.2.ogg and b/mods/mobs/sounds/mobs_zombie.2.ogg differ diff --git a/mods/mobs/sounds/mobs_zombie_attack.ogg b/mods/mobs/sounds/mobs_zombie_attack.ogg index a6397693..b503d96b 100755 Binary files a/mods/mobs/sounds/mobs_zombie_attack.ogg and b/mods/mobs/sounds/mobs_zombie_attack.ogg differ diff --git a/mods/mobs/sounds/mobs_zombie_death.ogg b/mods/mobs/sounds/mobs_zombie_death.ogg index 39128de4..50f5a862 100755 Binary files a/mods/mobs/sounds/mobs_zombie_death.ogg and b/mods/mobs/sounds/mobs_zombie_death.ogg differ diff --git a/mods/mobs/sounds/mobs_zombie_hit.ogg b/mods/mobs/sounds/mobs_zombie_hit.ogg index 30217b10..602b89b0 100755 Binary files a/mods/mobs/sounds/mobs_zombie_hit.ogg and b/mods/mobs/sounds/mobs_zombie_hit.ogg differ diff --git a/mods/mobs/sounds/tnt_explode.ogg b/mods/mobs/sounds/tnt_explode.ogg index cdf059bf..1c483415 100755 Binary files a/mods/mobs/sounds/tnt_explode.ogg and b/mods/mobs/sounds/tnt_explode.ogg differ