From 8c410bd87e3c1a31b4187ceaa93c62585eb54050 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 26 Jan 2024 13:06:11 +0000 Subject: [PATCH 01/10] set self.node_damage to false for spiders --- spider.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/spider.lua b/spider.lua index 3b2c9e5..db23d47 100644 --- a/spider.lua +++ b/spider.lua @@ -92,6 +92,7 @@ mobs:register_mob("mobs_monster:spider", { water_damage = 5, lava_damage = 5, light_damage = 0, + node_damage = false, -- disable damage_per_second node damage animation = { speed_normal = 15, speed_run = 20, From 83a9a1dc27f8017e685bed6da009bf3e183a6bec Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 27 Feb 2024 08:01:22 +0000 Subject: [PATCH 02/10] set is_ground_content for cobweb (thx SwissAlpS) --- spider.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/spider.lua b/spider.lua index db23d47..14f7e54 100644 --- a/spider.lua +++ b/spider.lua @@ -283,6 +283,7 @@ minetest.register_node(":mobs:cobweb", { liquid_range = 0, walkable = false, groups = {snappy = 1, disable_jump = 1}, + is_ground_content = false, drop = "farming:string", sounds = default and default.node_sound_leaves_defaults() }) From 1e224174ae66cda45756afc3929bc84b313333cb Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 1 Apr 2024 10:48:53 +0100 Subject: [PATCH 03/10] oerkki model fixed (thx blaboing) --- models/mobs_oerkki.b3d | Bin 42149 -> 28944 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/models/mobs_oerkki.b3d b/models/mobs_oerkki.b3d index 6290af38b43133f638ad787af1663013e015ac64..73047690d7934c878640c894085909395b619be9 100644 GIT binary patch literal 28944 zcmbVT2Ygh;*A2ZT^xhIW1PFo9likUN7C<`EK|qiqBtd#J0YOj^Q9x9JAR?j^ksu`` zY=ZPE2-xUS6!|MsRGNI}EOVFTxo`LJ<@YwdfLiJUk%aA%41b?%E}=#v`{3C@aw5+$`sajEooP|oL;Z_~4>5l<Yu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{v(#WtXb&}3oT(sZj zs;@m=5gC?JOIlk(v||s~)>_?-40|yq={A%U?cvUKwVgd8!-79cT3brAQIG3t85>51 zO>C01wzOzV9;l~fm>L;Ys%Fyd4HE6GUu$clMn{I78kMxRjA%>EtD{-_MTWiUlC-w0 zXxG)Pt!?=>GVIycNw>G0Xn*WiTT3}EGOX#BN#_j~ty({L8V|acWaYe8#HX`fe;O4w zaMc`FgF{l=?ZcO3|NW0-m|$R-JYbj@V7TdFxS?UVSz)*lVYta)xPf4}Ibaz0FbrxK z1}qGN5r%;V!ytlTfWUC^Vdd@kAALzCe{f;TCx383YGkO5|GgyZz<%gRenEC3JCj|= zu4Ff|JK2NmN%kUplM!Sj8AbLX`;z_0{^S61AUTK}Ob#K3lEcX10 zxtLr+E+vF$H^1qN%9nVnmj}PNS-Cn zk>|;u$e+mz^aBr1f;&d<wD}BZ^Bd6m8PNJ0&;}UL7BHX< zG@vbLKwHRwwy*(h5hrb{n0c}sPWmNT?V;(d@$aL;j!rgJPfA-%@?QMJ+dA-aRM^~z z*j-6!i;Fg9Z(3{ES<(8wO;TGzvts~3F{k{JtV2TB}F@UKssyW?@?i0MoyL` zy!&%2CEC*uysi80M1=+4ZIWagN{co}c5iF<3sGUYPXCysHb}H>fA_Ka=Ij#|yv8TV z_LdQC_VD!9DsQBJ+or0XRC~*ccGfgsYq Date: Wed, 15 May 2024 07:28:45 +0100 Subject: [PATCH 04/10] use optipng to fix image warnings --- textures/zmobs_lava_flan.png | Bin 1438 -> 1294 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/textures/zmobs_lava_flan.png b/textures/zmobs_lava_flan.png index 23ab2667c411f11bf781826665d6fafbf3a00066..8cf37238fe1fdd8e11ffab67b1c1d8d2663a7ac3 100644 GIT binary patch delta 1275 zcmVW!V?AB?2>w*~ZW;EXF7wmiRJ_$&7Kym>UTg zVnkzrB_qq@InPU5D08hh=fmxDfB$>VJ?Gq8=3cW#?&R~mVt=Mwye))WCGe+aRl*}l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ava_flan.lua b/lava_flan.lua index 9ffaa26..98a1d4a 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -138,11 +138,8 @@ local old_handle_node_drops = minetest.handle_node_drops function minetest.handle_node_drops(pos, drops, digger) - -- does player exist? - if not digger then return end - -- are we holding Lava Pick? - if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then + if digger and digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then return old_handle_node_drops(pos, drops, digger) end From 50039fe67d14afedea93629718959fb38bd675a2 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 27 Jun 2024 15:25:28 +0100 Subject: [PATCH 06/10] fix on_dig function when using lava pick --- lava_flan.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lava_flan.lua b/lava_flan.lua index 98a1d4a..84574f8 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -138,8 +138,9 @@ local old_handle_node_drops = minetest.handle_node_drops function minetest.handle_node_drops(pos, drops, digger) - -- are we holding Lava Pick? - if digger and digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then + -- are we the player holding a Lava Pick? + if not digger + or (digger and digger:get_wielded_item():get_name() ~= ("mobs:pick_lava")) then return old_handle_node_drops(pos, drops, digger) end From 4ab678d7ec8bbd4ea3a1af711c44b05238aebb67 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 28 Jun 2024 11:31:26 +0100 Subject: [PATCH 07/10] refactor lava pick dig function --- lava_flan.lua | 53 ++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/lava_flan.lua b/lava_flan.lua index 84574f8..068cd7e 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -138,46 +138,43 @@ local old_handle_node_drops = minetest.handle_node_drops function minetest.handle_node_drops(pos, drops, digger) - -- are we the player holding a Lava Pick? - if not digger - or (digger and digger:get_wielded_item():get_name() ~= ("mobs:pick_lava")) then - return old_handle_node_drops(pos, drops, digger) - end + -- are we a player using the lava pick? + if digger and digger:get_wielded_item():get_name() == ("mobs:pick_lava") then - -- reset new smelted drops - local hot_drops = {} + local hot_drops = {} - -- loop through current node drops - for _, drop in ipairs(drops) do + for _, drop in ipairs(drops) do - -- get cooked output of current drops - local stack = ItemStack(drop) + local stack = ItemStack(drop) - while not stack:is_empty() do + while not stack:is_empty() do - local output, decremented_input = minetest.get_craft_result({ - method = "cooking", - width = 1, - items = {stack} - }) + local output, decremented_input = minetest.get_craft_result({ + method = "cooking", + width = 1, + items = {stack} + }) - if output.item:is_empty() then + if output.item:is_empty() then - table.insert_all(hot_drops, decremented_input.items) - break - else - if not output.item:is_empty() then - table.insert(hot_drops, output.item) + table.insert_all(hot_drops, decremented_input.items) + break + else + if not output.item:is_empty() then + table.insert(hot_drops, output.item) + end + + table.insert_all(hot_drops, output.replacements) + + stack = decremented_input.items[1] or ItemStack() end - - table.insert_all(hot_drops, output.replacements) - - stack = decremented_input.items[1] or ItemStack() end end + + drops = hot_drops -- replace normal drops with cooked versions end - return old_handle_node_drops(pos, hot_drops, digger) + return old_handle_node_drops(pos, drops, digger) end minetest.register_tool(":mobs:pick_lava", { From 68ae991ca6bbc24875d06789d1f271389a169211 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 1 Jul 2024 09:25:52 +0100 Subject: [PATCH 08/10] add particle effect and sound when lava pick cooks node --- lava_flan.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lava_flan.lua b/lava_flan.lua index 068cd7e..2ac9a78 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -142,6 +142,7 @@ function minetest.handle_node_drops(pos, drops, digger) if digger and digger:get_wielded_item():get_name() == ("mobs:pick_lava") then local hot_drops = {} + local is_cooked for _, drop in ipairs(drops) do @@ -156,10 +157,11 @@ function minetest.handle_node_drops(pos, drops, digger) }) if output.item:is_empty() then - table.insert_all(hot_drops, decremented_input.items) break else + is_cooked = true + if not output.item:is_empty() then table.insert(hot_drops, output.item) end @@ -172,6 +174,14 @@ function minetest.handle_node_drops(pos, drops, digger) end drops = hot_drops -- replace normal drops with cooked versions + + if is_cooked then + + mobs:effect(pos, 1, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false) + + minetest.sound_play("fire_extinguish_flame", + {pos = pos, max_hear_distance = 8, gain = 0.15}, true) + end end return old_handle_node_drops(pos, drops, digger) From ad470a4ad280b48dd3ea9af83dbb2a5b5bc818f3 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 9 Aug 2024 07:59:41 +0100 Subject: [PATCH 09/10] fix default check and invalid texture name --- spider.lua | 6 +++++- ...template).png => mobs_tree_monster_template.png} | Bin 2 files changed, 5 insertions(+), 1 deletion(-) rename textures/{mobs_tree_monster(template).png => mobs_tree_monster_template.png} (100%) diff --git a/spider.lua b/spider.lua index 14f7e54..c8a144b 100644 --- a/spider.lua +++ b/spider.lua @@ -1,6 +1,10 @@ -- Translation support local S = minetest.get_translator("mobs_monster") +-- check for default mod +local mod_def = minetest.get_modpath("default") + +-- helper local get_velocity = function(self) local v = self.object:get_velocity() @@ -285,7 +289,7 @@ minetest.register_node(":mobs:cobweb", { groups = {snappy = 1, disable_jump = 1}, is_ground_content = false, drop = "farming:string", - sounds = default and default.node_sound_leaves_defaults() + sounds = mod_def and default.node_sound_leaves_defaults() }) minetest.register_craft({ diff --git a/textures/mobs_tree_monster(template).png b/textures/mobs_tree_monster_template.png similarity index 100% rename from textures/mobs_tree_monster(template).png rename to textures/mobs_tree_monster_template.png From 5c956edfe3c42f7e60506dac6de5f62c2bc5186d Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 10 Aug 2024 14:39:51 +0100 Subject: [PATCH 10/10] tweak and tidy code --- dirt_monster.lua | 33 +++-- dungeon_master.lua | 36 +++--- fire_spirit.lua | 14 +-- init.lua | 15 ++- land_guard.lua | 49 ++++---- lava_flan.lua | 90 ++++++-------- lucky_block.lua | 5 + mese_monster.lua | 298 ++++++++++++++++++++++----------------------- oerkki.lua | 26 ++-- sand_monster.lua | 29 ++--- spider.lua | 48 +++----- stone_monster.lua | 33 +++-- tree_monster.lua | 34 +++--- 13 files changed, 330 insertions(+), 380 deletions(-) diff --git a/dirt_monster.lua b/dirt_monster.lua index 7f26efb..3001784 100644 --- a/dirt_monster.lua +++ b/dirt_monster.lua @@ -1,6 +1,8 @@ --- Translation support + local S = minetest.get_translator("mobs_monster") +-- custom dirt monster type + local dirt_types = { { nodes = {"ethereal:dry_dirt"}, @@ -11,7 +13,6 @@ local dirt_types = { } } - -- Dirt Monster by PilzAdam mobs:register_mob("mobs_monster:dirt_monster", { @@ -33,9 +34,7 @@ mobs:register_mob("mobs_monster:dirt_monster", { }, blood_texture = "default_dirt.png", makes_footstep_sound = true, - sounds = { - random = "mobs_dirtmonster" - }, + sounds = {random = "mobs_dirtmonster"}, view_range = 15, walk_velocity = 1, run_velocity = 3, @@ -48,16 +47,11 @@ mobs:register_mob("mobs_monster:dirt_monster", { light_damage = 3, fear_height = 4, animation = { - speed_normal = 15, - speed_run = 15, - stand_start = 0, - stand_end = 14, - walk_start = 15, - walk_end = 38, - run_start = 40, - run_end = 63, - punch_start = 40, - punch_end = 63 + speed_normal = 15, speed_run = 15, + stand_start = 0, stand_end = 14, + walk_start = 15, walk_end = 38, + run_start = 40, run_end = 63, + punch_start = 40, punch_end = 63 }, -- check surrounding nodes and spawn a specific monster @@ -75,9 +69,7 @@ mobs:register_mob("mobs_monster:dirt_monster", { self.base_texture = tmp.skins self.object:set_properties({textures = tmp.skins}) - if tmp.drops then - self.drops = tmp.drops - end + if tmp.drops then self.drops = tmp.drops end return true end @@ -87,6 +79,7 @@ mobs:register_mob("mobs_monster:dirt_monster", { end }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -102,8 +95,10 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1) +-- compatibility with older mobs mod -mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") -- compatibility +mobs:alias_mob("mobs:dirt_monster", "mobs_monster:dirt_monster") diff --git a/dungeon_master.lua b/dungeon_master.lua index b1cdbba..61ec815 100644 --- a/dungeon_master.lua +++ b/dungeon_master.lua @@ -1,6 +1,8 @@ --- Translation support + local S = minetest.get_translator("mobs_monster") +-- custom dungeon master types + local master_types = { { nodes = {"nether:rack"}, @@ -11,7 +13,6 @@ local master_types = { } } - -- Dungeon Master by PilzAdam mobs:register_mob("mobs_monster:dungeon_master", { @@ -59,16 +60,11 @@ mobs:register_mob("mobs_monster:dungeon_master", { light_damage = 0, fear_height = 3, animation = { - stand_start = 0, - stand_end = 19, - walk_start = 20, - walk_end = 35, - punch_start = 36, - punch_end = 48, - shoot_start = 36, - shoot_end = 48, - speed_normal = 15, - speed_run = 15 + stand_start = 0, stand_end = 19, + walk_start = 20, walk_end = 35, + punch_start = 36, punch_end = 48, + shoot_start = 36, shoot_end = 48, + speed_normal = 15, speed_run = 15 }, -- check surrounding nodes and spawn a specific monster @@ -86,9 +82,7 @@ mobs:register_mob("mobs_monster:dungeon_master", { self.base_texture = tmp.skins self.object:set_properties({textures = tmp.skins}) - if tmp.drops then - self.drops = tmp.drops - end + if tmp.drops then self.drops = tmp.drops end return true end @@ -98,6 +92,7 @@ mobs:register_mob("mobs_monster:dungeon_master", { end }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -111,14 +106,17 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg -mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true) +mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), + "fire_basic_flame.png", 1, true) +-- old mobs mod compatibility -mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") -- compatibility +mobs:alias_mob("mobs:dungeon_master", "mobs_monster:dungeon_master") +-- fireball arrow --- fireball (weapon) mobs:register_arrow("mobs_monster:fireball", { visual = "sprite", visual_size = {x = 1, y = 1}, @@ -159,6 +157,7 @@ mobs:register_arrow("mobs_monster:fireball", { -- direct hit, no fire... just plenty of pain hit_player = function(self, player) + player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8} @@ -166,6 +165,7 @@ mobs:register_arrow("mobs_monster:fireball", { end, hit_mob = function(self, player) + player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8} diff --git a/fire_spirit.lua b/fire_spirit.lua index b6b62ce..dcd975d 100644 --- a/fire_spirit.lua +++ b/fire_spirit.lua @@ -1,4 +1,6 @@ --- Translation support + +-- transpation and drops + local S = minetest.get_translator("mobs_monster") local mob_drops = { @@ -26,9 +28,7 @@ mobs:register_mob("mobs_monster:fire_spirit", { collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, visual_scale = {x = 0.5, y = 0.5, z = 0.5}, visual = "sprite", - textures = { - {"mobs_fire_spirit.png"} - }, + textures = {{"mobs_fire_spirit.png"}}, glow = 14, blood_texture = "fire_basic_flame.png", immune_to = { @@ -67,9 +67,7 @@ mobs:register_mob("mobs_monster:fire_spirit", { self.flame_timer = (self.flame_timer or 0) + dtime - if self.flame_timer < 0.25 then - return - end + if self.flame_timer < 0.25 then return end self.flame_timer = 0 @@ -80,6 +78,7 @@ mobs:register_mob("mobs_monster:fire_spirit", { end }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -95,5 +94,6 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:fire_spirit", S("Fire Spirit"), "fire_basic_flame.png", 1) diff --git a/init.lua b/init.lua index 01dc580..c4a7d32 100644 --- a/init.lua +++ b/init.lua @@ -1,11 +1,10 @@ --- Load support for intllib. +-- transpation and get mod path +local S = minetest.get_translator("mobs_monster") local path = minetest.get_modpath(minetest.get_current_modname()) .. "/" --- Translation support -local S = minetest.get_translator("mobs_monster") - -- Check for custom mob spawn file + local input = io.open(path .. "spawn.lua", "r") if input then @@ -14,8 +13,8 @@ if input then input = nil end - -- helper function + local function ddoo(mob) if minetest.settings:get_bool("mobs_monster." .. mob) == false then @@ -27,6 +26,7 @@ local function ddoo(mob) end -- Monsters + ddoo("dirt_monster") -- PilzAdam ddoo("dungeon_master") ddoo("oerkki") @@ -39,17 +39,16 @@ ddoo("spider") -- AspireMint ddoo("land_guard") ddoo("fire_spirit") +-- Load custom spawning if found --- Load custom spawning if mobs.custom_spawn_monster then dofile(path .. "spawn.lua") end - -- Lucky Blocks + if minetest.get_modpath("lucky_block") then dofile(path .. "lucky_block.lua") end - print ("[MOD] Mobs Monster loaded") diff --git a/land_guard.lua b/land_guard.lua index 3e9ce2c..950c52e 100644 --- a/land_guard.lua +++ b/land_guard.lua @@ -1,4 +1,6 @@ --- Translation support + +-- translation and custom land guard types + local S = minetest.get_translator("mobs_monster") local guard_types = { @@ -50,9 +52,7 @@ mobs:register_mob("mobs_monster:land_guard", { {"mobs_land_guard3.png"} }, makes_footstep_sound = true, - sounds = { - random = "mobs_dungeonmaster", - }, + sounds = {random = "mobs_dungeonmaster"}, walk_velocity = 1.5, run_velocity = 3.4, jump = true, @@ -69,14 +69,10 @@ mobs:register_mob("mobs_monster:land_guard", { light_damage = 0, fear_height = 8, animation = { - stand_start = 0, - stand_end = 19, - walk_start = 20, - walk_end = 35, - punch_start = 36, - punch_end = 48, - speed_normal = 15, - speed_run = 20, + stand_start = 0, stand_end = 19, + walk_start = 20, walk_end = 35, + punch_start = 36, punch_end = 48, + speed_normal = 15, speed_run = 20, }, -- check surrounding nodes and spawn a specific guard @@ -95,9 +91,7 @@ mobs:register_mob("mobs_monster:land_guard", { self.object:set_properties({textures = self.base_texture}) self.docile_by_day = tmp.docile - if tmp.drops then - self.drops = tmp.drops - end + if tmp.drops then self.drops = tmp.drops end return true end @@ -107,20 +101,23 @@ mobs:register_mob("mobs_monster:land_guard", { end, }) +-- where to spawn if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:land_guard", - nodes = { - "default:snow", "default:ice", "default:stone", - "default:dry_dirt_with_dry_grass", "ethereal:dry_dirt" - }, - max_light = 7, - chance = 25000, - min_height = 0, - active_object_count = 1, -}) + + mobs:spawn({ + name = "mobs_monster:land_guard", + nodes = { + "default:snow", "default:ice", "default:stone", + "default:dry_dirt_with_dry_grass", "ethereal:dry_dirt" + }, + max_light = 7, + chance = 25000, + min_height = 0, + active_object_count = 1, + }) end +-- spawn egg mobs:register_egg("mobs_monster:land_guard", S("Land Guard"), "default_ice.png", 1) diff --git a/lava_flan.lua b/lava_flan.lua index 2ac9a78..5c006c3 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -1,4 +1,4 @@ --- Translation support + local S = minetest.get_translator("mobs_monster") -- Lava Flan by Zeg9 (additional textures by JurajVajda) @@ -79,8 +79,8 @@ mobs:register_mob("mobs_monster:lava_flan", { mobs:effect(pos, 40, "fire_basic_flame.png", 2, 3, 2, 5, 10, nil) local nods = minetest.find_nodes_in_area( - {x = pos.x, y = pos.y + 1, z = pos.z}, - {x = pos.x, y = pos.y, z = pos.z}, "air") + {x = pos.x, y = pos.y + 1, z = pos.z}, + {x = pos.x, y = pos.y, z = pos.z}, "air") -- place flame if position empty and flame exists if nods and #nods > 0 @@ -96,27 +96,29 @@ mobs:register_mob("mobs_monster:lava_flan", { glow = 10 }) +-- where to spawn if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:lava_flan", - nodes = {"default:lava_source"}, - chance = 1500, - active_object_count = 1, - max_height = 0 -}) + + mobs:spawn({ + name = "mobs_monster:lava_flan", + nodes = {"default:lava_source"}, + chance = 1500, + active_object_count = 1, + max_height = 0 + }) end +-- spawn egg --- add spawn egg mobs:register_egg("mobs_monster:lava_flan", S("Lava Flan"), "default_lava.png", 1) +-- compatibility for old mobs mod --- compatibility alias, only needed for servers who used the old mobs mod mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") - -- lava orb + minetest.register_craftitem(":mobs:lava_orb", { description = S("Lava orb"), inventory_image = "zmobs_lava_orb.png", @@ -131,8 +133,7 @@ minetest.register_craft({ burntime = 80 }) - --- Lava Pick (digs and smelts at same time) +-- backup and replace old function local old_handle_node_drops = minetest.handle_node_drops @@ -151,10 +152,7 @@ function minetest.handle_node_drops(pos, drops, digger) while not stack:is_empty() do local output, decremented_input = minetest.get_craft_result({ - method = "cooking", - width = 1, - items = {stack} - }) + method = "cooking", width = 1, items = {stack}}) if output.item:is_empty() then table.insert_all(hot_drops, decremented_input.items) @@ -187,6 +185,8 @@ function minetest.handle_node_drops(pos, drops, digger) return old_handle_node_drops(pos, drops, digger) end +-- lava pick, smelts nodes when you dig + minetest.register_tool(":mobs:pick_lava", { description = S("Lava Pickaxe"), inventory_image = "mobs_pick_lava.png", @@ -195,9 +195,7 @@ minetest.register_tool(":mobs:pick_lava", { max_drop_level = 3, groupcaps = { cracky = { - times = {[1] = 1.80, [2] = 0.80, [3] = 0.40}, - uses = 40, - maxlevel = 3 + times = {[1] = 1.80, [2] = 0.80, [3] = 0.40}, uses = 40, maxlevel = 3 } }, damage_groups = {fleshy = 6, fire = 1}, @@ -206,6 +204,8 @@ minetest.register_tool(":mobs:pick_lava", { light_source = 14 }) +-- recipe + minetest.register_craft({ output = "mobs:pick_lava", recipe = { @@ -215,16 +215,16 @@ minetest.register_craft({ } }) --- Add [toolranks] mod support if found +-- Add [toolranks] mod support + if minetest.get_modpath("toolranks") then -minetest.override_item("mobs:pick_lava", { - original_description = "Lava Pickaxe", - description = toolranks.create_description("Lava Pickaxe", 0, 1), - after_use = toolranks.new_afteruse}) + minetest.override_item("mobs:pick_lava", { + original_description = "Lava Pickaxe", + description = toolranks.create_description("Lava Pickaxe", 0, 1), + after_use = toolranks.new_afteruse}) end - -- obsidian flan mobs:register_mob("mobs_monster:obsidian_flan", { @@ -243,14 +243,10 @@ mobs:register_mob("mobs_monster:obsidian_flan", { collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.8, 0.3}, visual = "mesh", mesh = "zmobs_lava_flan.x", - textures = { - {"mobs_obsidian_flan.png"} - }, + textures = {{"mobs_obsidian_flan.png"}}, blood_texture = "default_obsidian.png", makes_footstep_sound = true, - sounds = { - random = "mobs_lavaflan" - }, + sounds = {random = "mobs_lavaflan"}, walk_velocity = 0.1, run_velocity = 0.5, jump = false, @@ -265,28 +261,22 @@ mobs:register_mob("mobs_monster:obsidian_flan", { fire_damage = 0, light_damage = 0, animation = { - speed_normal = 15, - speed_run = 15, - stand_start = 0, - stand_end = 8, - walk_start = 10, - walk_end = 18, - run_start = 20, - run_end = 28, - punch_start = 20, - punch_end = 28 + speed_normal = 15, speed_run = 15, + stand_start = 0, stand_end = 8, + walk_start = 10, walk_end = 18, + run_start = 20, run_end = 28, + punch_start = 20, punch_end = 28 } }) - --- add spawn egg +-- spawn egg mobs:register_egg("mobs_monster:obsidian_flan", S("Obsidian Flan"), "default_obsidian.png", 1) +-- obsidian arrow and grief setting check local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false --- mese arrow (weapon) mobs:register_arrow("mobs_monster:obsidian_arrow", { visual = "sprite", visual_size = {x = 0.5, y = 0.5}, @@ -294,6 +284,7 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", { velocity = 6, hit_player = function(self, player) + player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8}, @@ -301,6 +292,7 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", { end, hit_mob = function(self, player) + player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8}, @@ -317,9 +309,7 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", { local radius = 1 local def = node and minetest.registered_nodes[node.name] - if not def then - return - end + if not def then return end if def and def.tiles and def.tiles[1] then texture = def.tiles[1] diff --git a/lucky_block.lua b/lucky_block.lua index 9954b8c..ca86b2b 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -1,3 +1,6 @@ + +-- web trap schematic + local web = {name = "mobs:cobweb"} local web_trap = { size = {x = 3, y = 3, z = 3}, @@ -20,6 +23,8 @@ lucky_block:add_schematics({ {"webtrap", web_trap, {x = 1, y = 0, z = 1}}, }) +-- add lucky blocks + lucky_block:add_blocks({ {"sch", "webtrap", 1, true}, {"spw", "mobs:dungeon_master", 1, nil, nil, 3, "Billy"}, diff --git a/mese_monster.lua b/mese_monster.lua index 2ad1a2e..b3ab5e2 100644 --- a/mese_monster.lua +++ b/mese_monster.lua @@ -1,140 +1,139 @@ --- Translation support + +-- translation and custom mese monster types + local S = minetest.get_translator("mobs_monster") local mese_monster_types = { --- mese_monster_red -{ - y_min = -20, - y_max = -1000, - damage = 2, - reach = 3, - hp_min = 15, - hp_max = 25, - armor = 80, - skins = {"mobs_mese_monster_red.png"}, - immune_to = { - {"default:pick_wood", 0}, - {"default:shovel_wood", 0}, - {"default:axe_wood", 0}, - {"default:sword_wood", 0} + { -- red + y_min = -20, + y_max = -1000, + damage = 2, + reach = 3, + hp_min = 15, + hp_max = 25, + armor = 80, + skins = {"mobs_mese_monster_red.png"}, + immune_to = { + {"default:pick_wood", 0}, + {"default:shovel_wood", 0}, + {"default:axe_wood", 0}, + {"default:sword_wood", 0} + }, + drops = { + {name = "default:mese_crystal", chance = 15, min = 0, max = 1}, + {name = "default:mese_crystal_fragment", chance = 2, min = 0, max = 1} + }, + arrow_override = function(self) + self.velocity = 6 + self.damage = 2 + end }, - drops = { - {name = "default:mese_crystal", chance = 15, min = 0, max = 1}, - {name = "default:mese_crystal_fragment", chance = 2, min = 0, max = 1} - }, - arrow_override = function(self) - self.velocity = 6 - self.damage = 2 - end -}, --- mese_monster_green -{ - y_min = -1001, - y_max = -2000, - damage = 3, - reach = 3, - hp_min = 20, - hp_max = 30, - armor = 75, - skins = {"mobs_mese_monster_green.png"}, - immune_to = { - {"default:pick_wood", 0}, - {"default:shovel_wood", 0}, - {"default:axe_wood", 0}, - {"default:sword_wood", 0}, - {"default:pick_stone", 0}, - {"default:shovel_stone", 0}, - {"default:axe_stone", 0}, - {"default:sword_stone", 0} + { -- green + y_min = -1001, + y_max = -2000, + damage = 3, + reach = 3, + hp_min = 20, + hp_max = 30, + armor = 75, + skins = {"mobs_mese_monster_green.png"}, + immune_to = { + {"default:pick_wood", 0}, + {"default:shovel_wood", 0}, + {"default:axe_wood", 0}, + {"default:sword_wood", 0}, + {"default:pick_stone", 0}, + {"default:shovel_stone", 0}, + {"default:axe_stone", 0}, + {"default:sword_stone", 0} + }, + drops = { + {name = "default:mese_crystal", chance = 12, min = 0, max = 1}, + {name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 1} + }, + arrow_override = function(self) + self.velocity = 6 + self.damage = 2 + end }, - drops = { - {name = "default:mese_crystal", chance = 12, min = 0, max = 1}, - {name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 1} - }, - arrow_override = function(self) - self.velocity = 6 - self.damage = 2 - end -}, --- mese_monster_blue -{ - y_min = -2001, - y_max = -3000, - damage = 3, - reach = 4, - hp_min = 25, - hp_max = 35, - armor = 70, - skins = {"mobs_mese_monster_blue.png"}, - immune_to = { - {"default:pick_wood", 0}, - {"default:shovel_wood", 0}, - {"default:axe_wood", 0}, - {"default:sword_wood", 0}, - {"default:pick_stone", 0}, - {"default:shovel_stone", 0}, - {"default:axe_stone", 0}, - {"default:sword_stone", 0}, - {"default:pick_bronze", 0}, - {"default:shovel_bronze", 0}, - {"default:axe_bronze", 0}, - {"default:sword_bronze", 0} + { -- blue + y_min = -2001, + y_max = -3000, + damage = 3, + reach = 4, + hp_min = 25, + hp_max = 35, + armor = 70, + skins = {"mobs_mese_monster_blue.png"}, + immune_to = { + {"default:pick_wood", 0}, + {"default:shovel_wood", 0}, + {"default:axe_wood", 0}, + {"default:sword_wood", 0}, + {"default:pick_stone", 0}, + {"default:shovel_stone", 0}, + {"default:axe_stone", 0}, + {"default:sword_stone", 0}, + {"default:pick_bronze", 0}, + {"default:shovel_bronze", 0}, + {"default:axe_bronze", 0}, + {"default:sword_bronze", 0} + }, + drops = { + {name = "default:mese", chance = 15, min = 0, max = 1}, + {name = "default:mese_crystal", chance = 9, min = 0, max = 2}, + {name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 2} + }, + arrow_override = function(self) + self.velocity = 7 + self.damage = 3 + end }, - drops = { - {name = "default:mese", chance = 15, min = 0, max = 1}, - {name = "default:mese_crystal", chance = 9, min = 0, max = 2}, - {name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 2} - }, - arrow_override = function(self) - self.velocity = 7 - self.damage = 3 - end -}, - --- mese_monster_purple -{ - y_min = -3000, - y_max = -31000, - damage = 4, - reach = 5, - hp_min = 30, - hp_max = 40, - armor = 60, - skins = {"mobs_mese_monster_purple.png"}, - immune_to = { - {"default:pick_wood", 0}, - {"default:shovel_wood", 0}, - {"default:axe_wood", 0}, - {"default:sword_wood", 0}, - {"default:pick_stone", 0}, - {"default:shovel_stone", 0}, - {"default:axe_stone", 0}, - {"default:sword_stone", 0}, - {"default:pick_bronze", 0}, - {"default:shovel_bronze", 0}, - {"default:axe_bronze", 0}, - {"default:sword_bronze", 0}, - {"default:pick_steel", 0}, - {"default:shovel_steel", 0}, - {"default:axe_steel", 0}, - {"default:sword_steel", 0} - }, - drops = { - {name = "default:mese", chance = 9, min = 0, max = 1}, - {name = "default:mese_crystal", chance = 6, min = 0, max = 2}, - {name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 3} - }, - arrow_override = function(self) - self.velocity = 8 - self.damage = 4 - end -}} + { -- purple + y_min = -3000, + y_max = -31000, + damage = 4, + reach = 5, + hp_min = 30, + hp_max = 40, + armor = 60, + skins = {"mobs_mese_monster_purple.png"}, + immune_to = { + {"default:pick_wood", 0}, + {"default:shovel_wood", 0}, + {"default:axe_wood", 0}, + {"default:sword_wood", 0}, + {"default:pick_stone", 0}, + {"default:shovel_stone", 0}, + {"default:axe_stone", 0}, + {"default:sword_stone", 0}, + {"default:pick_bronze", 0}, + {"default:shovel_bronze", 0}, + {"default:axe_bronze", 0}, + {"default:sword_bronze", 0}, + {"default:pick_steel", 0}, + {"default:shovel_steel", 0}, + {"default:axe_steel", 0}, + {"default:sword_steel", 0} + }, + drops = { + {name = "default:mese", chance = 9, min = 0, max = 1}, + {name = "default:mese_crystal", chance = 6, min = 0, max = 2}, + {name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 3} + }, + arrow_override = function(self) + self.velocity = 8 + self.damage = 4 + end + } +} -- Mese Monster by SirrobZeroone + mobs:register_mob("mobs_monster:mese_monster", { type = "monster", visual_size = {x = 10, y = 10}, -- Got scale wrong in blender by factor of 10 - S01 @@ -155,9 +154,7 @@ mobs:register_mob("mobs_monster:mese_monster", { collisionbox = {-0.75, -0.5, -0.75, 0.75, 2.5, 0.75}, visual = "mesh", mesh = "mobs_mese_monster.b3d", - textures = { - {"mobs_mese_monster_purple.png"} - }, + textures = {{"mobs_mese_monster_purple.png"}}, blood_texture = "default_mese_crystal_fragment.png", makes_footstep_sound = false, sounds = { @@ -187,36 +184,21 @@ mobs:register_mob("mobs_monster:mese_monster", { lava_damage = 1, light_damage = 0, animation = { - speed_normal = 18, - speed_run = 18, - walk_start = 10, - walk_end = 41, - walk_speed = 20, - run_start = 10, - run_end = 41, - run_speed = 30, - stand_start = 60, - stand_end = 83, - shoot_start = 100, - shoot_end = 113, - die_start = 125, - die_end = 141, - death_speed = 25, - die_loop = false, - jump_start = 150 , - jump_end = 168, - jump_loop = false, - punch_start = 175, - punch_end = 189 + speed_normal = 18, speed_run = 18, + walk_start = 10, walk_end = 41, walk_speed = 20, + run_start = 10, run_end = 41, run_speed = 30, + stand_start = 60, stand_end = 83, + shoot_start = 100, shoot_end = 113, + die_start = 125, die_end = 141, death_speed = 25, die_loop = false, + jump_start = 150 , jump_end = 168, jump_loop = false, + punch_start = 175, punch_end = 189 }, after_activate = function(self, staticdata, def, dtime) local tex = self and self.textures and self.textures[1] - if tex == "zmobs_mese_monster.png" then - self.object:remove() - end + if tex == "zmobs_mese_monster.png" then self.object:remove() end end, on_spawn = function(self) @@ -287,14 +269,15 @@ mobs:register_mob("mobs_monster:mese_monster", { end }) +-- mese arrow item --- mese arrow (weapon) minetest.register_craftitem("mobs_monster:mese_crystal_fragment_arrow", { description = S("Mese Monster Arrow"), inventory_image = "mobs_mese_arrow.png", groups = {not_in_creative_inventory = 1} }) +-- mese arrow mobs:register_arrow("mobs_monster:mese_arrow", { visual = "wielditem", @@ -305,6 +288,7 @@ mobs:register_arrow("mobs_monster:mese_arrow", { damage = 2, hit_player = function(self, player) + player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = self.damage} @@ -312,6 +296,7 @@ mobs:register_arrow("mobs_monster:mese_arrow", { end, hit_mob = function(self, player) + player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = self.damage} @@ -322,6 +307,7 @@ mobs:register_arrow("mobs_monster:mese_arrow", { end }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -335,14 +321,16 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:mese_monster", S("Mese Monster"), "default_mese_block.png", 1) +-- compatibility with older mobs mod -mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster") -- compatiblity +mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster") +-- 9x mese crystal fragments = 1x mese crystal recipe --- 9x mese crystal fragments = 1x mese crystal local f = "default:mese_crystal_fragment" minetest.register_craft({ diff --git a/oerkki.lua b/oerkki.lua index e8d02df..2bb4159 100644 --- a/oerkki.lua +++ b/oerkki.lua @@ -1,4 +1,4 @@ --- Translation support + local S = minetest.get_translator("mobs_monster") -- Oerkki by PilzAdam @@ -22,9 +22,7 @@ mobs:register_mob("mobs_monster:oerkki", { {"mobs_oerkki3.png"} }, makes_footstep_sound = false, - sounds = { - random = "mobs_oerkki" - }, + sounds = {random = "mobs_oerkki"}, walk_velocity = 1, run_velocity = 3, view_range = 10, @@ -38,16 +36,11 @@ mobs:register_mob("mobs_monster:oerkki", { light_damage = 1, fear_height = 4, animation = { - stand_start = 0, - stand_end = 23, - walk_start = 24, - walk_end = 36, - run_start = 37, - run_end = 49, - punch_start = 37, - punch_end = 49, - speed_normal = 15, - speed_run = 15 + stand_start = 0, stand_end = 23, + walk_start = 24, walk_end = 36, + run_start = 37, run_end = 49, + punch_start = 37, punch_end = 49, + speed_normal = 15, speed_run = 15 }, replace_rate = 5, replace_what = {"default:torch"}, @@ -59,6 +52,7 @@ mobs:register_mob("mobs_monster:oerkki", { }, }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -71,8 +65,10 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:oerkki", S("Oerkki"), "default_obsidian.png", 1) +-- compatibility with older mobs mod -mobs:alias_mob("mobs:oerkki", "mobs_monster:oerkki") -- compatiblity +mobs:alias_mob("mobs:oerkki", "mobs_monster:oerkki") diff --git a/sand_monster.lua b/sand_monster.lua index 3a7fb01..c8a9121 100644 --- a/sand_monster.lua +++ b/sand_monster.lua @@ -1,7 +1,8 @@ --- Translation support + local S = minetest.get_translator("mobs_monster") -- custom particle effects + local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow) radius = radius or 2 @@ -28,7 +29,6 @@ local effect = function(pos, amount, texture, min_size, max_size, radius, gravit }) end - -- Sand Monster by PilzAdam mobs:register_mob("mobs_monster:sand_monster", { @@ -52,9 +52,7 @@ mobs:register_mob("mobs_monster:sand_monster", { }, blood_texture = "default_desert_sand.png", makes_footstep_sound = true, - sounds = { - random = "mobs_sandmonster" - }, + sounds = {random = "mobs_sandmonster"}, walk_velocity = 1.5, run_velocity = 4, view_range = 8, @@ -68,16 +66,11 @@ mobs:register_mob("mobs_monster:sand_monster", { light_damage = 0, fear_height = 4, animation = { - speed_normal = 15, - speed_run = 15, - stand_start = 0, - stand_end = 39, - walk_start = 41, - walk_end = 72, - run_start = 74, - run_end = 105, - punch_start = 74, - punch_end = 105 + speed_normal = 15, speed_run = 15, + stand_start = 0, stand_end = 39, + walk_start = 41, walk_end = 72, + run_start = 74, run_end = 105, + punch_start = 74, punch_end = 105 }, immune_to = { {"default:shovel_wood", 3}, -- shovels deal more damage to sand monster @@ -116,6 +109,8 @@ mobs:register_mob("mobs_monster:sand_monster", { ]] }) +-- where to spawn + if not mobs.custom_spawn_monster then mobs:spawn({ @@ -127,9 +122,11 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1) +-- compatibility with older mobs mod -mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility +mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") diff --git a/spider.lua b/spider.lua index c8a144b..b3fe0c8 100644 --- a/spider.lua +++ b/spider.lua @@ -1,10 +1,8 @@ -- Translation support local S = minetest.get_translator("mobs_monster") --- check for default mod -local mod_def = minetest.get_modpath("default") +-- helper function --- helper local get_velocity = function(self) local v = self.object:get_velocity() @@ -15,6 +13,7 @@ local get_velocity = function(self) return (v.x * v.x + v.z * v.z) ^ 0.5 end +-- custom spider types local spider_types = { @@ -55,7 +54,6 @@ local spider_types = { } } - -- Spider by AspireMint (CC-BY-SA 3.0 license) mobs:register_mob("mobs_monster:spider", { @@ -98,16 +96,11 @@ mobs:register_mob("mobs_monster:spider", { light_damage = 0, node_damage = false, -- disable damage_per_second node damage animation = { - speed_normal = 15, - speed_run = 20, - stand_start = 0, - stand_end = 0, - walk_start = 1, - walk_end = 21, - run_start = 1, - run_end = 21, - punch_start = 25, - punch_end = 45 + speed_normal = 15, speed_run = 20, + stand_start = 0, stand_end = 0, + walk_start = 1, walk_end = 21, + run_start = 1, run_end = 21, + punch_start = 25, punch_end = 45 }, -- check surrounding nodes and spawn a specific spider @@ -126,9 +119,7 @@ mobs:register_mob("mobs_monster:spider", { self.object:set_properties({textures = tmp.skins}) self.docile_by_day = tmp.docile - if tmp.drops then - self.drops = tmp.drops - end + if tmp.drops then self.drops = tmp.drops end if tmp.shoot then self.attack_type = "dogshoot" @@ -141,6 +132,7 @@ mobs:register_mob("mobs_monster:spider", { 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} @@ -159,9 +151,7 @@ mobs:register_mob("mobs_monster:spider", { -- quarter second timer self.spider_timer = (self.spider_timer or 0) + dtime - if self.spider_timer < 0.25 then - return - end + if self.spider_timer < 0.25 then return end self.spider_timer = 0 -- need to be stopped to go onwards @@ -171,11 +161,7 @@ mobs:register_mob("mobs_monster:spider", { end local pos = self.object:get_pos() - local yaw = self.object:get_yaw() - - -- sanity check - if not yaw then return end - + local yaw = self.object:get_yaw() ; if not yaw then return end local prop = self.object:get_properties() pos.y = pos.y + prop.collisionbox[2] - 0.2 @@ -231,6 +217,7 @@ mobs:register_mob("mobs_monster:spider", { end }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -262,15 +249,17 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:spider", S("Spider"), "mobs_cobweb.png", 1) +-- compatibility with older mobs mod -mobs:alias_mob("mobs_monster:spider2", "mobs_monster:spider") -- compatibility +mobs:alias_mob("mobs_monster:spider2", "mobs_monster:spider") mobs:alias_mob("mobs:spider", "mobs_monster:spider") +-- cobweb and recipe --- cobweb minetest.register_node(":mobs:cobweb", { description = S("Cobweb"), drawtype = "plantlike", @@ -289,7 +278,7 @@ minetest.register_node(":mobs:cobweb", { groups = {snappy = 1, disable_jump = 1}, is_ground_content = false, drop = "farming:string", - sounds = mod_def and default.node_sound_leaves_defaults() + sounds = mobs.node_sound_leaves_defaults() }) minetest.register_craft({ @@ -301,6 +290,7 @@ minetest.register_craft({ } }) +-- cobweb place function local web_place = function(pos) @@ -313,6 +303,8 @@ local web_place = function(pos) end end +-- cobweb arrow + mobs:register_arrow("mobs_monster:cobweb", { visual = "sprite", visual_size = {x = 1, y = 1}, diff --git a/stone_monster.lua b/stone_monster.lua index e3d47ec..3aa6b93 100644 --- a/stone_monster.lua +++ b/stone_monster.lua @@ -1,4 +1,6 @@ --- Translation support + +-- translation and custom stone monster types + local S = minetest.get_translator("mobs_monster") local stone_types = { @@ -22,7 +24,6 @@ local stone_types = { } } - -- Stone Monster by PilzAdam mobs:register_mob("mobs_monster:stone_monster", { @@ -43,9 +44,7 @@ mobs:register_mob("mobs_monster:stone_monster", { {"mobs_stone_monster2.png"} -- by AMMOnym }, makes_footstep_sound = true, - sounds = { - random = "mobs_stonemonster" - }, + sounds = {random = "mobs_stonemonster"}, walk_velocity = 1, run_velocity = 2, jump_height = 0, @@ -61,16 +60,11 @@ mobs:register_mob("mobs_monster:stone_monster", { lava_damage = 1, light_damage = 0, animation = { - speed_normal = 15, - speed_run = 15, - stand_start = 0, - stand_end = 14, - walk_start = 15, - walk_end = 38, - run_start = 40, - run_end = 63, - punch_start = 40, - punch_end = 63 + speed_normal = 15, speed_run = 15, + stand_start = 0, stand_end = 14, + walk_start = 15, walk_end = 38, + run_start = 40, run_end = 63, + punch_start = 40, punch_end = 63 }, immune_to = { {"default:pick_wood", 0}, -- wooden pick doesnt hurt stone monster @@ -96,9 +90,7 @@ mobs:register_mob("mobs_monster:stone_monster", { self.base_texture = tmp.skins self.object:set_properties({textures = tmp.skins}) - if tmp.drops then - self.drops = tmp.drops - end + if tmp.drops then self.drops = tmp.drops end return true end @@ -108,6 +100,7 @@ mobs:register_mob("mobs_monster:stone_monster", { end }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -120,8 +113,10 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:stone_monster", S("Stone Monster"), "default_stone.png", 1) +-- compatibility with older mobs mod -mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") -- compatibility +mobs:alias_mob("mobs:stone_monster", "mobs_monster:stone_monster") diff --git a/tree_monster.lua b/tree_monster.lua index e28b8b5..5fb2130 100644 --- a/tree_monster.lua +++ b/tree_monster.lua @@ -1,4 +1,6 @@ --- Translation support + +-- translation and custom tree monster types + local S = minetest.get_translator("mobs_monster") local tree_types = { @@ -44,7 +46,6 @@ local tree_types = { } } - -- Tree Monster (or Tree Gollum) by PilzAdam mobs:register_mob("mobs_monster:tree_monster", { @@ -67,9 +68,7 @@ mobs:register_mob("mobs_monster:tree_monster", { }, blood_texture = "default_wood.png", makes_footstep_sound = true, - sounds = { - random = "mobs_treemonster" - }, + sounds = {random = "mobs_treemonster"}, walk_velocity = 1, run_velocity = 3, jump = true, @@ -96,16 +95,11 @@ mobs:register_mob("mobs_monster:tree_monster", { -- {"all", 0}, -- only weapons on list deal damage }, animation = { - speed_normal = 15, - speed_run = 15, - stand_start = 0, - stand_end = 24, - walk_start = 25, - walk_end = 47, - run_start = 48, - run_end = 62, - punch_start = 48, - punch_end = 62 + speed_normal = 15, speed_run = 15, + stand_start = 0, stand_end = 24, + walk_start = 25, walk_end = 47, + run_start = 48, run_end = 62, + punch_start = 48, punch_end = 62 }, -- check surrounding nodes and spawn a specific tree monster @@ -125,11 +119,10 @@ mobs:register_mob("mobs_monster:tree_monster", { self.base_texture = tmp.skins self.object:set_properties({textures = tmp.skins}) - if tmp.drops then - self.drops = tmp.drops - end + if tmp.drops then self.drops = tmp.drops end if tmp.explode then + self.attack_type = "explode" self.explosion_radius = 3 self.explosion_timer = 3 @@ -156,6 +149,7 @@ mobs:register_mob("mobs_monster:tree_monster", { end }) +-- where to spawn if not mobs.custom_spawn_monster then @@ -169,8 +163,10 @@ if not mobs.custom_spawn_monster then }) end +-- spawn egg mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1) +-- compatibility with older mobs mod -mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster") -- compatibility +mobs:alias_mob("mobs:tree_monster", "mobs_monster:tree_monster")