From 18c07cf7ae3d7ccf4f5328fc85be3635a54605b5 Mon Sep 17 00:00:00 2001 From: R-one Date: Sun, 24 Dec 2017 13:20:51 +0100 Subject: [PATCH 1/7] fix grounding on sharks beach --- mobs_sharks/init.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mobs_sharks/init.lua b/mobs_sharks/init.lua index 9e3ade0..0e73dca 100644 --- a/mobs_sharks/init.lua +++ b/mobs_sharks/init.lua @@ -54,6 +54,8 @@ if mobs.mod and mobs.mod == "redo" then makes_footstep_sound = false, walk_velocity = 4, run_velocity = 6, + jump = false, + stepheight = 0.1, fly = true, fly_in = "default:water_source", fall_speed = 0, @@ -63,7 +65,7 @@ if mobs.mod and mobs.mod == "redo" then lava_damage = 10, light_damage = 0, animation = l_anims, - do_custom = function(self) + --[[do_custom = function(self) if HELP_WITH_EXPERIMENT then local p = self.object:getpos() local a = self.object:getvelocity() @@ -78,7 +80,7 @@ if mobs.mod and mobs.mod == "redo" then end self.object:setvelocity(a) end - end + end]] }) --name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height mobs:spawn_specific("mobs_sharks:shark_lg", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0) @@ -103,6 +105,8 @@ if mobs.mod and mobs.mod == "redo" then makes_footstep_sound = false, walk_velocity = 2, run_velocity = 4, + jump = false, + stepheight = 0.1, fly = true, fly_in = "default:water_source", fall_speed = -1, @@ -136,6 +140,8 @@ if mobs.mod and mobs.mod == "redo" then makes_footstep_sound = false, walk_velocity = 2, run_velocity = 4, + jump = false, + stepheight = 0.1, fly = true, fly_in = "default:water_source", fall_speed = -1, From dbfbd09df17220d65ad005075b59a91d7694a5d9 Mon Sep 17 00:00:00 2001 From: R-One <34810409+R-0ne@users.noreply.github.com> Date: Sun, 24 Dec 2017 13:30:32 +0100 Subject: [PATCH 2/7] Update README.md add mobs-redo framewok link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ca6cea3..af00d0c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ A few water critters ported from other mob frameworks to "Mobs-Redo". +depends on Mobs-Redo framework: https://github.com/tenplus1/mobs_redo + License information for the models and textures can be found inside the respective folders. From 0562049b248c234376802c9ed607bfc35f740588 Mon Sep 17 00:00:00 2001 From: R-one Date: Sun, 24 Dec 2017 19:47:16 +0100 Subject: [PATCH 3/7] sharks falls the mobs:meat_raw when they die --- mobs_sharks/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mobs_sharks/init.lua b/mobs_sharks/init.lua index 0e73dca..8d4ea47 100644 --- a/mobs_sharks/init.lua +++ b/mobs_sharks/init.lua @@ -56,6 +56,9 @@ if mobs.mod and mobs.mod == "redo" then run_velocity = 6, jump = false, stepheight = 0.1, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + }, fly = true, fly_in = "default:water_source", fall_speed = 0, @@ -107,6 +110,9 @@ if mobs.mod and mobs.mod == "redo" then run_velocity = 4, jump = false, stepheight = 0.1, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + }, fly = true, fly_in = "default:water_source", fall_speed = -1, @@ -142,6 +148,9 @@ if mobs.mod and mobs.mod == "redo" then run_velocity = 4, jump = false, stepheight = 0.1, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + }, fly = true, fly_in = "default:water_source", fall_speed = -1, From 7fec3a1146374a53ac607751754fdc75b1870161 Mon Sep 17 00:00:00 2001 From: R-one Date: Sun, 24 Dec 2017 19:53:32 +0100 Subject: [PATCH 4/7] Crocs drops mobs:meat_raw and mobs:leather when they die --- mobs_crocs/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mobs_crocs/init.lua b/mobs_crocs/init.lua index d6ce5f6..677c284 100644 --- a/mobs_crocs/init.lua +++ b/mobs_crocs/init.lua @@ -48,6 +48,10 @@ if mobs.mod and mobs.mod == "redo" then visual_size = {x=4, y=4}, sounds = l_sounds, fly = false, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + {name = "mobs:leather", chance = 1, min = 1, max = 2}, + }, floats = 0, stepheight = 1, view_range = 10, @@ -82,6 +86,10 @@ if mobs.mod and mobs.mod == "redo" then visual_size = {x=3, y=3}, sounds = l_sounds, fly = false, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + {name = "mobs:leather", chance = 1, min = 1, max = 2}, + }, stepheight = 1, view_range = 10, water_damage = 0, @@ -116,6 +124,10 @@ if mobs.mod and mobs.mod == "redo" then sounds = l_sounds, fly = true, fly_in = "default:water_source", + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + {name = "mobs:leather", chance = 1, min = 1, max = 2}, + }, fall_speed = -1, floats = 0, view_range = 10, From d09a4960fb184bb0d8f6e0c18224399128c07754 Mon Sep 17 00:00:00 2001 From: R-one Date: Sun, 24 Dec 2017 20:01:30 +0100 Subject: [PATCH 5/7] Turtle drops mobs:meat_raw when they die --- mobs_turtles/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mobs_turtles/init.lua b/mobs_turtles/init.lua index c0f07c3..7b468ee 100644 --- a/mobs_turtles/init.lua +++ b/mobs_turtles/init.lua @@ -42,6 +42,9 @@ if mobs.mod and mobs.mod == "redo" then run_velocity = 0.3, jump = false, fly = false, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + }, floats = 1, water_damage = 0, lava_damage = 5, @@ -87,6 +90,9 @@ if mobs.mod and mobs.mod == "redo" then jump = false, fly = true, fly_in = "default:water_source", + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 3}, + }, fall_speed = 0, floats = 1, water_damage = 0, From bd513c34bf41c3d75f91b11d6c21d417f6e19c7c Mon Sep 17 00:00:00 2001 From: R-one Date: Sun, 24 Dec 2017 20:26:35 +0100 Subject: [PATCH 6/7] remove minetest.setting_* functions are deprecated --- mobs_fish/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobs_fish/init.lua b/mobs_fish/init.lua index e48ad45..f164f14 100644 --- a/mobs_fish/init.lua +++ b/mobs_fish/init.lua @@ -9,7 +9,7 @@ local SPRITE_VERSION = false -- set to true to use upright sprites instead of me local l_spawn_chance = 10000 local l_cc_hand = 25 local l_cc_net = 80 - local l_water_level = minetest.setting_get("water_level") - 1 + local l_water_level = minetest.settings:get("water_level") - 1 local l_anims = { speed_normal = 24, speed_run = 24, stand_start = 1, stand_end = 80, @@ -34,7 +34,7 @@ local SPRITE_VERSION = false -- set to true to use upright sprites instead of me l_visual = "upright_sprite" l_visual_size = {x=.5, y=.5} l_clown_mesh = nil - l_trop_mesh = nil + l_trop_mesh = nil l_clown_textures = {{"animal_clownfish_clownfish_item.png"}} l_trop_textures = {{"animal_fish_blue_white_fish_blue_white_item.png"}} end From f1a9b5b8c1d23417c70babdd43934a1c5c50a9a4 Mon Sep 17 00:00:00 2001 From: R-one Date: Sun, 24 Dec 2017 20:27:50 +0100 Subject: [PATCH 7/7] Fix crash when right click on turtle ... https://github.com/EdwardThorsten/mobs_water/commit/82746827a9dc2cf753a901d101e6d480550bf541 --- mobs_turtles/init.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mobs_turtles/init.lua b/mobs_turtles/init.lua index 7b468ee..220bb94 100644 --- a/mobs_turtles/init.lua +++ b/mobs_turtles/init.lua @@ -54,9 +54,15 @@ if mobs.mod and mobs.mod == "redo" then follow = "farming:carrot", on_rightclick = function(self, clicker) self.state = "" - set_velocity(self, 0) + --set_velocity(self, 0) + self.object:setvelocity({ + --local yaw = (self.object:get_yaw() or 0) + self.rotate + x = 0, --sin(yaw) * -v + y = self.object:getvelocity().y, + z = 0 --cos(yaw) * v + }) self.object:set_animation({x=self.animation.hide_start, y=self.animation.hide_end}, self.animation.speed_normal, 0) - minetest.after(5, function() + minetest.after(5, function() self.state = "stand" end) mobs:capture_mob(self, clicker, 0, 80, 100, true, nil)