1
0
mirror of https://github.com/blert2112/mobs_water.git synced 2025-09-09 12:05:25 +02:00

Compare commits

12 Commits

Author SHA1 Message Date
22eb27be02 Delete depends.txt, add mod.conf 2022-07-07 19:46:10 +02:00
246e7100d2 Merge remote-tracking branch 'github-rone/master' 2021-03-02 22:52:22 +01:00
sys4-fr
bb28270f65 Ajoute messages de chargement des mods dans le journal "action" 2018-12-27 19:07:12 +01:00
sys4-fr
6ce28cc28a Ajout d'alias pour les requins pour garder la compatibilité avec ceux de MFF. 2018-09-29 12:11:51 +02:00
sys4-fr
a1c3603056 Fix turtles crash when right click on it. 2018-09-29 11:32:33 +02:00
R-one
f1a9b5b8c1 Fix crash when right click on turtle ... 82746827a9 2017-12-24 20:27:50 +01:00
R-one
bd513c34bf remove minetest.setting_* functions are deprecated 2017-12-24 20:26:35 +01:00
R-one
d09a4960fb Turtle drops mobs:meat_raw when they die 2017-12-24 20:01:30 +01:00
R-one
7fec3a1146 Crocs drops mobs:meat_raw and mobs:leather when they die 2017-12-24 19:53:32 +01:00
R-one
0562049b24 sharks falls the mobs:meat_raw when they die 2017-12-24 19:47:16 +01:00
R-One
dbfbd09df1 Update README.md
add mobs-redo framewok link
2017-12-24 13:30:32 +01:00
R-one
18c07cf7ae fix grounding on sharks beach 2017-12-24 13:20:51 +01:00
16 changed files with 95 additions and 17 deletions

View File

@@ -1,4 +1,6 @@
A few water critters ported from other mob frameworks to "Mobs-Redo". 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 License information for the models and textures can be found inside
the respective folders. the respective folders.

View File

@@ -1,2 +0,0 @@
default
mobs

View File

@@ -48,6 +48,10 @@ if mobs.mod and mobs.mod == "redo" then
visual_size = {x=4, y=4}, visual_size = {x=4, y=4},
sounds = l_sounds, sounds = l_sounds,
fly = false, fly = false,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 1, max = 2},
},
floats = 0, floats = 0,
stepheight = 1, stepheight = 1,
view_range = 10, view_range = 10,
@@ -82,6 +86,10 @@ if mobs.mod and mobs.mod == "redo" then
visual_size = {x=3, y=3}, visual_size = {x=3, y=3},
sounds = l_sounds, sounds = l_sounds,
fly = false, fly = false,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
{name = "mobs:leather", chance = 1, min = 1, max = 2},
},
stepheight = 1, stepheight = 1,
view_range = 10, view_range = 10,
water_damage = 0, water_damage = 0,
@@ -116,6 +124,10 @@ if mobs.mod and mobs.mod == "redo" then
sounds = l_sounds, sounds = l_sounds,
fly = true, fly = true,
fly_in = "default:water_source", 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, fall_speed = -1,
floats = 0, floats = 0,
view_range = 10, view_range = 10,
@@ -133,3 +145,5 @@ if mobs.mod and mobs.mod == "redo" then
end end
end end
minetest.log("action","[mobs_crocs] loaded.")

4
mobs_crocs/mod.conf Normal file
View File

@@ -0,0 +1,4 @@
name = mobs_crocs
title = Crocs mobs
description = Add Crocs
depends = default,mobs

View File

@@ -1,2 +0,0 @@
default
mobs

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_spawn_chance = 10000
local l_cc_hand = 25 local l_cc_hand = 25
local l_cc_net = 80 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 = { local l_anims = {
speed_normal = 24, speed_run = 24, speed_normal = 24, speed_run = 24,
stand_start = 1, stand_end = 80, 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 = "upright_sprite"
l_visual_size = {x=.5, y=.5} l_visual_size = {x=.5, y=.5}
l_clown_mesh = nil l_clown_mesh = nil
l_trop_mesh = nil l_trop_mesh = nil
l_clown_textures = {{"animal_clownfish_clownfish_item.png"}} l_clown_textures = {{"animal_clownfish_clownfish_item.png"}}
l_trop_textures = {{"animal_fish_blue_white_fish_blue_white_item.png"}} l_trop_textures = {{"animal_fish_blue_white_fish_blue_white_item.png"}}
end end
@@ -102,3 +102,5 @@ local SPRITE_VERSION = false -- set to true to use upright sprites instead of me
mobs:register_egg("mobs_fish:tropical", "Tropical fish", "animal_fish_blue_white_fish_blue_white_item.png", 0) mobs:register_egg("mobs_fish:tropical", "Tropical fish", "animal_fish_blue_white_fish_blue_white_item.png", 0)
end end
minetest.log("action", "[mobs_fish] loaded.")

4
mobs_fish/mod.conf Normal file
View File

@@ -0,0 +1,4 @@
name = mobs_fish
title = Fish mobs
description = Add some fish
depends = default,mobs

View File

@@ -1,3 +0,0 @@
default
mobs

View File

@@ -38,3 +38,4 @@ if mobs.mod and mobs.mod == "redo" then
end end
minetest.log("action", "[mobs_jellyfish] loaded.")

4
mobs_jellyfish/mod.conf Normal file
View File

@@ -0,0 +1,4 @@
name = mobs_jellyfish
title = Jellyfish Mobs
description = Add Jellyfish
depends = default,mobs

View File

@@ -1,2 +0,0 @@
default
mobs

View File

@@ -54,6 +54,11 @@ if mobs.mod and mobs.mod == "redo" then
makes_footstep_sound = false, makes_footstep_sound = false,
walk_velocity = 4, walk_velocity = 4,
run_velocity = 6, run_velocity = 6,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
fly = true, fly = true,
fly_in = "default:water_source", fly_in = "default:water_source",
fall_speed = 0, fall_speed = 0,
@@ -63,7 +68,7 @@ if mobs.mod and mobs.mod == "redo" then
lava_damage = 10, lava_damage = 10,
light_damage = 0, light_damage = 0,
animation = l_anims, animation = l_anims,
do_custom = function(self) --[[do_custom = function(self)
if HELP_WITH_EXPERIMENT then if HELP_WITH_EXPERIMENT then
local p = self.object:getpos() local p = self.object:getpos()
local a = self.object:getvelocity() local a = self.object:getvelocity()
@@ -78,11 +83,12 @@ if mobs.mod and mobs.mod == "redo" then
end end
self.object:setvelocity(a) self.object:setvelocity(a)
end end
end end]]
}) })
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height --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) mobs:spawn_specific("mobs_sharks:shark_lg", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)
mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)", l_egg_texture, 0) mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)", l_egg_texture, 0)
mobs:alias_mob("mobs:shark_lg", "mobs_sharks:shark_lg")
end end
-- medium -- medium
@@ -103,6 +109,11 @@ if mobs.mod and mobs.mod == "redo" then
makes_footstep_sound = false, makes_footstep_sound = false,
walk_velocity = 2, walk_velocity = 2,
run_velocity = 4, run_velocity = 4,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
fly = true, fly = true,
fly_in = "default:water_source", fly_in = "default:water_source",
fall_speed = -1, fall_speed = -1,
@@ -116,6 +127,7 @@ if mobs.mod and mobs.mod == "redo" then
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height --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) mobs:spawn_specific("mobs_sharks:shark_md", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)
mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)", l_egg_texture, 0) mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)", l_egg_texture, 0)
mobs:alias_mob("mobs:shark_md", "mobs_sharks:shark_md")
end end
-- small -- small
@@ -136,6 +148,11 @@ if mobs.mod and mobs.mod == "redo" then
makes_footstep_sound = false, makes_footstep_sound = false,
walk_velocity = 2, walk_velocity = 2,
run_velocity = 4, run_velocity = 4,
jump = false,
stepheight = 0.1,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
fly = true, fly = true,
fly_in = "default:water_source", fly_in = "default:water_source",
fall_speed = -1, fall_speed = -1,
@@ -149,6 +166,9 @@ if mobs.mod and mobs.mod == "redo" then
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height --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) mobs:spawn_specific("mobs_sharks:shark_sm", l_spawn_in, l_spawn_near, -1, 20, 30, l_spawn_chance, 1, -31000, 0)
mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)", l_egg_texture, 0) mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)", l_egg_texture, 0)
mobs:alias_mob("mobs:shark_sm", "mobs_sharks:shark_sm")
end end
end end
minetest.log("action", "[mobs_sharks] loaded.")

4
mobs_sharks/mod.conf Normal file
View File

@@ -0,0 +1,4 @@
name = mobs_sharks
title = Sharks mobs
description = Add some sharks
depends = default,mobs

View File

@@ -1,2 +0,0 @@
default
mobs

View File

@@ -1,6 +1,22 @@
if mobs.mod and mobs.mod == "redo" then if mobs.mod and mobs.mod == "redo" then
local sin = math.sin
local cos = math.cos
-- move mob in facing direction
local set_velocity = function(self, v)
local yaw = (self.object:get_yaw() or 0) + self.rotate
self.object:setvelocity(
{
x = sin(yaw) * -v,
y = self.object:getvelocity().y,
z = cos(yaw) * v
})
end
local l_colors = { local l_colors = {
"#604000:175", --brown "#604000:175", --brown
"#604000:100", --brown2 "#604000:100", --brown2
@@ -42,6 +58,9 @@ if mobs.mod and mobs.mod == "redo" then
run_velocity = 0.3, run_velocity = 0.3,
jump = false, jump = false,
fly = false, fly = false,
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
floats = 1, floats = 1,
water_damage = 0, water_damage = 0,
lava_damage = 5, lava_damage = 5,
@@ -51,9 +70,15 @@ if mobs.mod and mobs.mod == "redo" then
follow = "farming:carrot", follow = "farming:carrot",
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)
self.state = "" 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) 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" self.state = "stand"
end) end)
mobs:capture_mob(self, clicker, 0, 80, 100, true, nil) mobs:capture_mob(self, clicker, 0, 80, 100, true, nil)
@@ -87,6 +112,9 @@ if mobs.mod and mobs.mod == "redo" then
jump = false, jump = false,
fly = true, fly = true,
fly_in = "default:water_source", fly_in = "default:water_source",
drops = {
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
},
fall_speed = 0, fall_speed = 0,
floats = 1, floats = 1,
water_damage = 0, water_damage = 0,
@@ -106,3 +134,5 @@ if mobs.mod and mobs.mod == "redo" then
mobs:register_egg("mobs_turtles:seaturtle", "Sea Turtle", "default_water.png", 1) mobs:register_egg("mobs_turtles:seaturtle", "Sea Turtle", "default_water.png", 1)
end end
minetest.log("action", "[mobs_turtles] loaded.")

4
mobs_turtles/mod.conf Normal file
View File

@@ -0,0 +1,4 @@
name = mobs_turtles
title = Turtles Mobs
description = Add some turtles
depends = default,mobs