add mob drops for shark, turtle, croc - fix grounding shark issue

This commit is contained in:
TenPlus1 2019-07-01 15:47:07 +01:00
parent a1b797c63c
commit bb9e815db3
5 changed files with 43 additions and 24 deletions

View File

@ -1,4 +1,6 @@
A few water critters ported from other mob frameworks to "Mobs-Redo".
Depends on Mobs Redo API - https://notabug.org/TenPlus1/mobs_redo
License information for the models and textures can be found inside
the respective folders.

View File

@ -54,7 +54,11 @@ if mobs.mod and mobs.mod == "redo" then
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs_crocs:crocodile",
@ -87,7 +91,11 @@ if mobs.mod and mobs.mod == "redo" then
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs_crocs:crocodile_float",
@ -122,7 +130,11 @@ if mobs.mod and mobs.mod == "redo" then
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 0, max = 2},
},
})
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs_crocs:crocodile_swim",

View File

@ -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,
@ -19,7 +19,7 @@ local SPRITE_VERSION = false -- set to true to use upright sprites instead of me
local l_visual = "mesh"
local l_visual_size = {x=.75, y=.75}
local l_clown_mesh = "animal_clownfish.b3d"
local l_trop_mesh = "fish_blue_white.b3d"
local l_trop_mesh = "fish_blue_white.b3d"
local l_clown_textures = {
{"clownfish.png"},
{"clownfish2.png"}
@ -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

View File

@ -63,22 +63,11 @@ if mobs.mod and mobs.mod == "redo" then
lava_damage = 10,
light_damage = 0,
animation = l_anims,
do_custom = function(self)
if HELP_WITH_EXPERIMENT then
local p = self.object:getpos()
local a = self.object:getvelocity()
if p.y > 0 and a.y > 0 then
a.y = -1
else
local r = math.random(100)
if r >= 1 and r <=25 then a.y = 0.25
elseif r > 25 and r <= 50 then a.y = 0
elseif r > 50 and r <= 75 then a.y = -0.25
end
end
self.object:setvelocity(a)
end
end
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
--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)
@ -111,7 +100,12 @@ if mobs.mod and mobs.mod == "redo" then
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs_sharks:shark_md", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)
@ -144,7 +138,12 @@ if mobs.mod and mobs.mod == "redo" then
water_damage = 0,
lava_damage = 10,
light_damage = 0,
animation = l_anims
animation = l_anims,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
})
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
mobs:spawn_specific("mobs_sharks:shark_sm", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)

View File

@ -48,6 +48,9 @@ if mobs.mod and mobs.mod == "redo" then
light_damage = 0,
fall_damage = 1,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
follow = "farming:carrot",
on_rightclick = function(self, clicker)
self.state = ""
@ -94,6 +97,9 @@ if mobs.mod and mobs.mod == "redo" then
light_damage = 0,
fall_damage = 0,
animation = l_anims,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
on_rightclick = function(self, clicker)
mobs:capture_mob(self, clicker, 0, 0, 80, true, nil)
end