update license files and tidy code
This commit is contained in:
parent
fc95ed6457
commit
580bd43672
@ -1,4 +1,5 @@
|
|||||||
Licenses
|
Licenses
|
||||||
|
|
||||||
|
Code: MIT
|
||||||
Model/Textures: GPL v3
|
Model/Textures: GPL v3
|
||||||
Author: Team NPX
|
Author: Team NPX
|
||||||
|
@ -1,26 +1,5 @@
|
|||||||
|
|
||||||
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
|
|
||||||
minetest.log("error", "[mobs_crocs] mobs redo API not found!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- local variables
|
-- local variables
|
||||||
local l_skins = {
|
|
||||||
{"croco.png"},
|
|
||||||
{"croco2.png"}
|
|
||||||
}
|
|
||||||
|
|
||||||
local l_anims = {
|
|
||||||
speed_normal = 24, speed_run = 24,
|
|
||||||
stand_start = 0, stand_end = 80,
|
|
||||||
walk_start = 81, walk_end = 170,
|
|
||||||
run_start = 81, run_end = 170,
|
|
||||||
punch_start = 205, punch_end = 220
|
|
||||||
}
|
|
||||||
|
|
||||||
local l_model = "crocodile.x"
|
|
||||||
local l_sounds = {random = "croco"}
|
|
||||||
local l_egg_texture = "default_grass.png"
|
|
||||||
local l_spawn_chance = 60000
|
local l_spawn_chance = 60000
|
||||||
|
|
||||||
-- load settings
|
-- load settings
|
||||||
@ -31,9 +10,11 @@ local ENABLE_SWIMMERS = minetest.settings:get_bool("mobs_crocs.enable_swimmers",
|
|||||||
if not ENABLE_WALKERS then
|
if not ENABLE_WALKERS then
|
||||||
l_spawn_chance = l_spawn_chance - 20000
|
l_spawn_chance = l_spawn_chance - 20000
|
||||||
end
|
end
|
||||||
|
|
||||||
if not ENABLE_FLOATERS then
|
if not ENABLE_FLOATERS then
|
||||||
l_spawn_chance = l_spawn_chance - 20000
|
l_spawn_chance = l_spawn_chance - 20000
|
||||||
end
|
end
|
||||||
|
|
||||||
if not ENABLE_SWIMMERS then
|
if not ENABLE_SWIMMERS then
|
||||||
l_spawn_chance = l_spawn_chance - 20000
|
l_spawn_chance = l_spawn_chance - 20000
|
||||||
end
|
end
|
||||||
@ -52,10 +33,13 @@ if ENABLE_WALKERS then
|
|||||||
collisionbox = {-0.85, -0.30, -0.85, 0.85, 1.5, 0.85},
|
collisionbox = {-0.85, -0.30, -0.85, 0.85, 1.5, 0.85},
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = l_model,
|
mesh = "crocodile.x",
|
||||||
textures = l_skins,
|
textures = {
|
||||||
|
{"croco.png"},
|
||||||
|
{"croco2.png"}
|
||||||
|
},
|
||||||
visual_size = {x = 4, y = 4},
|
visual_size = {x = 4, y = 4},
|
||||||
sounds = l_sounds,
|
sounds = {random = "croco"},
|
||||||
fly = false,
|
fly = false,
|
||||||
floats = 0,
|
floats = 0,
|
||||||
stepheight = 1,
|
stepheight = 1,
|
||||||
@ -63,7 +47,13 @@ if ENABLE_WALKERS then
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24, speed_run = 24,
|
||||||
|
stand_start = 0, stand_end = 80,
|
||||||
|
walk_start = 81, walk_end = 170,
|
||||||
|
run_start = 81, run_end = 170,
|
||||||
|
punch_start = 205, punch_end = 220
|
||||||
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||||
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
||||||
@ -86,7 +76,7 @@ if ENABLE_WALKERS then
|
|||||||
max_height = 10,
|
max_height = 10,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_egg("mobs_crocs:crocodile", "Crocodile", l_egg_texture, 1)
|
mobs:register_egg("mobs_crocs:crocodile", "Crocodile", "default_grass.png", 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- float
|
-- float
|
||||||
@ -103,17 +93,26 @@ if ENABLE_FLOATERS then
|
|||||||
collisionbox = {-0.638, -0.23, -0.638, 0.638, 1.13, 0.638},
|
collisionbox = {-0.638, -0.23, -0.638, 0.638, 1.13, 0.638},
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = l_model,
|
mesh = "crocodile.x",
|
||||||
textures = l_skins,
|
textures = {
|
||||||
|
{"croco.png"},
|
||||||
|
{"croco2.png"}
|
||||||
|
},
|
||||||
visual_size = {x = 3, y = 3},
|
visual_size = {x = 3, y = 3},
|
||||||
sounds = l_sounds,
|
sounds = {random = "croco"},
|
||||||
fly = false,
|
fly = false,
|
||||||
stepheight = 1,
|
stepheight = 1,
|
||||||
view_range = 10,
|
view_range = 10,
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24, speed_run = 24,
|
||||||
|
stand_start = 0, stand_end = 80,
|
||||||
|
walk_start = 81, walk_end = 170,
|
||||||
|
run_start = 81, run_end = 170,
|
||||||
|
punch_start = 205, punch_end = 220
|
||||||
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||||
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
||||||
@ -135,7 +134,7 @@ if ENABLE_FLOATERS then
|
|||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_egg("mobs_crocs:crocodile_float", "Crocodile (floater)",
|
mobs:register_egg("mobs_crocs:crocodile_float", "Crocodile (floater)",
|
||||||
l_egg_texture, 1)
|
"default_grass.png", 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- swim
|
-- swim
|
||||||
@ -152,10 +151,13 @@ if ENABLE_SWIMMERS then
|
|||||||
collisionbox = {-0.425, -0.15, -0.425, 0.425, 0.75, 0.425},
|
collisionbox = {-0.425, -0.15, -0.425, 0.425, 0.75, 0.425},
|
||||||
drawtype = "front",
|
drawtype = "front",
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = l_model,
|
mesh = "crocodile.x",
|
||||||
textures = l_skins,
|
textures = {
|
||||||
|
{"croco.png"},
|
||||||
|
{"croco2.png"}
|
||||||
|
},
|
||||||
visual_size = {x = 2, y = 2},
|
visual_size = {x = 2, y = 2},
|
||||||
sounds = l_sounds,
|
sounds = {random = "croco"},
|
||||||
fly = true,
|
fly = true,
|
||||||
fly_in = "default:water_source",
|
fly_in = "default:water_source",
|
||||||
fall_speed = -1,
|
fall_speed = -1,
|
||||||
@ -164,7 +166,13 @@ if ENABLE_SWIMMERS then
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24, speed_run = 24,
|
||||||
|
stand_start = 0, stand_end = 80,
|
||||||
|
walk_start = 81, walk_end = 170,
|
||||||
|
run_start = 81, run_end = 170,
|
||||||
|
punch_start = 205, punch_end = 220
|
||||||
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||||
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
{name = "mobs:leather", chance = 1, min = 0, max = 2},
|
||||||
@ -182,5 +190,5 @@ if ENABLE_SWIMMERS then
|
|||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_egg("mobs_crocs:crocodile_swim", "Crocodile (swimmer)",
|
mobs:register_egg("mobs_crocs:crocodile_swim", "Crocodile (swimmer)",
|
||||||
l_egg_texture, 1)
|
"default_grass.png", 1)
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Licenses
|
Licenses
|
||||||
|
|
||||||
|
Code: MIT
|
||||||
Model/Textures: CC-BY-SA 3.0
|
Model/Textures: CC-BY-SA 3.0
|
||||||
Author: Sapier
|
Author: Sapier
|
||||||
|
|
||||||
|
@ -1,33 +1,9 @@
|
|||||||
|
|
||||||
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
|
local SPRITE_VERSION = false -- set to true to use upright sprites instead of meshes
|
||||||
minetest.log("error", "[mobs_fish] mobs redo API not found!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local SPRITE_VERSION = false -- set to true to use upright sprites instead of meshes
|
|
||||||
|
|
||||||
-- local variables
|
-- local variables
|
||||||
local l_spawn_in = {
|
|
||||||
"default:water_source", "default:water_flowing",
|
|
||||||
"default:river_water_source", "default:river_water_flowing"
|
|
||||||
}
|
|
||||||
local l_spawn_near = {
|
|
||||||
"default:sand","default:dirt","group:seaplants","group:seacoral"
|
|
||||||
}
|
|
||||||
local l_spawn_chance = 10000
|
local l_spawn_chance = 10000
|
||||||
local l_cc_hand = 25
|
|
||||||
local l_cc_net = 80
|
|
||||||
local l_water_level = minetest.settings: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,
|
|
||||||
walk_start = 81,
|
|
||||||
walk_end = 155,
|
|
||||||
run_start = 81,
|
|
||||||
run_end = 155
|
|
||||||
}
|
|
||||||
local l_visual = "mesh"
|
local l_visual = "mesh"
|
||||||
local l_visual_size = {x = .75, y = .75}
|
local l_visual_size = {x = .75, y = .75}
|
||||||
local l_clown_mesh = "animal_clownfish.b3d"
|
local l_clown_mesh = "animal_clownfish.b3d"
|
||||||
@ -71,14 +47,25 @@ mobs:register_mob("mobs_fish:clownfish", {
|
|||||||
fall_speed = 0,
|
fall_speed = 0,
|
||||||
view_range = 8,
|
view_range = 8,
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
air_damage = 1,
|
air_damage = 0,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24,
|
||||||
|
speed_run = 24,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 80,
|
||||||
|
walk_start = 81,
|
||||||
|
walk_end = 155,
|
||||||
|
run_start = 81,
|
||||||
|
run_end = 155
|
||||||
|
},
|
||||||
|
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
mobs:capture_mob(self, clicker, l_cc_hand, l_cc_net, 0, true,
|
mobs:capture_mob(self, clicker, 25, 80, 0, true,
|
||||||
"mobs_fish:clownfish")
|
"mobs_fish:clownfish")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_flop = function(self)
|
on_flop = function(self)
|
||||||
|
|
||||||
-- print("=== am on land, help!", self.state)
|
-- print("=== am on land, help!", self.state)
|
||||||
@ -97,8 +84,13 @@ mobs:register_mob("mobs_fish:clownfish", {
|
|||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_fish:clownfish",
|
name = "mobs_fish:clownfish",
|
||||||
nodes = l_spawn_in,
|
nodes = {
|
||||||
neighbors = l_spawn_near,
|
"default:water_source", "default:water_flowing",
|
||||||
|
"default:river_water_source", "default:river_water_flowing"
|
||||||
|
},
|
||||||
|
neighbors = {
|
||||||
|
"default:sand","default:dirt","group:seaplants","group:seacoral"
|
||||||
|
},
|
||||||
min_light = 5,
|
min_light = 5,
|
||||||
interval = 30,
|
interval = 30,
|
||||||
chance = l_spawn_chance,
|
chance = l_spawn_chance,
|
||||||
@ -131,12 +123,23 @@ mobs:register_mob("mobs_fish:tropical", {
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
air_damage = 1,
|
air_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24,
|
||||||
|
speed_run = 24,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 80,
|
||||||
|
walk_start = 81,
|
||||||
|
walk_end = 155,
|
||||||
|
run_start = 81,
|
||||||
|
run_end = 155
|
||||||
|
},
|
||||||
|
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
mobs:capture_mob(self, clicker, l_cc_hand, l_cc_net, 0, true,
|
mobs:capture_mob(self, clicker, 25, 80, 0, true,
|
||||||
"mobs_fish:tropical")
|
"mobs_fish:tropical")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_flop = function(self)
|
on_flop = function(self)
|
||||||
|
|
||||||
-- print("=== am on land, help!", self.state)
|
-- print("=== am on land, help!", self.state)
|
||||||
@ -155,8 +158,13 @@ mobs:register_mob("mobs_fish:tropical", {
|
|||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_fish:tropical",
|
name = "mobs_fish:tropical",
|
||||||
nodes = l_spawn_in,
|
nodes = {
|
||||||
neighbors = l_spawn_near,
|
"default:water_source", "default:water_flowing",
|
||||||
|
"default:river_water_source", "default:river_water_flowing"
|
||||||
|
},
|
||||||
|
neighbors = {
|
||||||
|
"default:sand","default:dirt","group:seaplants","group:seacoral"
|
||||||
|
},
|
||||||
min_light = 5,
|
min_light = 5,
|
||||||
interval = 30,
|
interval = 30,
|
||||||
chance = l_spawn_chance,
|
chance = l_spawn_chance,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Licenses
|
Licenses
|
||||||
|
|
||||||
|
Code: MIT
|
||||||
Model/Textures: WTFPL
|
Model/Textures: WTFPL
|
||||||
Author: blert2112
|
Author: blert2112
|
||||||
|
|
||||||
@ -18,4 +19,3 @@ Author: blert2112
|
|||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||||
|
|
@ -1,18 +1,14 @@
|
|||||||
|
|
||||||
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
|
|
||||||
minetest.log("error", "[mobs_jellyfish] mobs redo API not found!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
mobs:register_mob("mobs_jellyfish:jellyfish", {
|
mobs:register_mob("mobs_jellyfish:jellyfish", {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
|
passive = false,
|
||||||
damage = 5,
|
damage = 5,
|
||||||
reach = 1,
|
reach = 1,
|
||||||
hp_min = 5,
|
hp_min = 5,
|
||||||
hp_max = 10,
|
hp_max = 10,
|
||||||
armor = 100,
|
armor = 100,
|
||||||
collisionbox = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
|
collisionbox = {-0.1, -0.25, -0.1, 0.1, 0.25, 0.1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "jellyfish.b3d",
|
mesh = "jellyfish.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
@ -28,6 +24,7 @@ mobs:register_mob("mobs_jellyfish:jellyfish", {
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
|
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
mobs:capture_mob(self, clicker, 80, 100, 0,
|
mobs:capture_mob(self, clicker, 80, 100, 0,
|
||||||
true, "mobs_jellyfish:jellyfish")
|
true, "mobs_jellyfish:jellyfish")
|
||||||
@ -37,7 +34,7 @@ mobs:register_mob("mobs_jellyfish:jellyfish", {
|
|||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_jellyfish:jellyfish",
|
name = "mobs_jellyfish:jellyfish",
|
||||||
nodes = {"default:water_source"},
|
nodes = {"default:water_source"},
|
||||||
neighbors = {"default:water_flowing","default:water_source"},
|
neighbors = {"default:water_flowing", "default:water_source"},
|
||||||
min_light = 5,
|
min_light = 5,
|
||||||
interval = 30,
|
interval = 30,
|
||||||
chance = 10000,
|
chance = 10000,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Licenses
|
Licenses
|
||||||
|
|
||||||
|
Code: MIT
|
||||||
Model/Textures: CC-BY-SA 3.0
|
Model/Textures: CC-BY-SA 3.0
|
||||||
http://creativecommons.org/licenses/by-sa/3.0/de/legalcode
|
http://creativecommons.org/licenses/by-sa/3.0/de/legalcode
|
||||||
Author: Sapier
|
Author: Sapier
|
||||||
|
@ -1,64 +1,41 @@
|
|||||||
|
|
||||||
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
|
|
||||||
minetest.log("error", "[mobs_sharks] mobs redo API not found!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- local variables
|
-- local variables
|
||||||
local l_colors = {
|
|
||||||
"#604000:175", --brown
|
|
||||||
"#ffffff:150", --white
|
|
||||||
"#404040:150", --dark_grey
|
|
||||||
"#a0a0a0:150" --grey
|
|
||||||
}
|
|
||||||
local l_skins = {
|
local l_skins = {
|
||||||
{
|
{
|
||||||
"(shark_first.png^[colorize:" .. l_colors[3]
|
"(shark_first.png^[colorize:#404040:150" -- dark grey
|
||||||
.. ")^(shark_second.png^[colorize:" .. l_colors[4]
|
.. ")^(shark_second.png^[colorize:#a0a0a0:150" -- grey
|
||||||
.. ")^shark_third.png"
|
.. ")^shark_third.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"(shark_first.png^[colorize:" .. l_colors[1]
|
"(shark_first.png^[colorize:#604000:175" -- brown
|
||||||
.. ")^(shark_second.png^[colorize:" .. l_colors[2]
|
.. ")^(shark_second.png^[colorize:#ffffff:150" -- white
|
||||||
..")^shark_third.png"
|
..")^shark_third.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"(shark_first.png^[colorize:" .. l_colors[4]
|
"(shark_first.png^[colorize:#a0a0a0:150" -- grey
|
||||||
.. ")^(shark_second.png^[colorize:" .. l_colors[2]
|
.. ")^(shark_second.png^[colorize:#ffffff:150" -- white
|
||||||
.. ")^shark_third.png"
|
.. ")^shark_third.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local l_anims = {
|
|
||||||
speed_normal = 24,
|
|
||||||
speed_run = 24,
|
|
||||||
stand_start = 1,
|
|
||||||
stand_end = 80,
|
|
||||||
walk_start = 80,
|
|
||||||
walk_end = 160,
|
|
||||||
run_start = 80,
|
|
||||||
run_end = 160
|
|
||||||
}
|
|
||||||
local l_model = "mob_shark.b3d"
|
|
||||||
local l_egg_texture = "mob_shark_shark_item.png"
|
|
||||||
local l_spawn_in = {"default:water_flowing","default:water_source"}
|
|
||||||
local l_spawn_near = {
|
|
||||||
"default:water_flowing", "default:water_source",
|
|
||||||
"seawrecks:woodship", "seawrecks:uboot"
|
|
||||||
}
|
|
||||||
local l_spawn_chance = 60000
|
local l_spawn_chance = 60000
|
||||||
|
|
||||||
-- load settings
|
-- load settings
|
||||||
dofile(minetest.get_modpath("mobs_sharks").."/SETTINGS.txt")
|
dofile(minetest.get_modpath("mobs_sharks") .. "/SETTINGS.txt")
|
||||||
|
|
||||||
if not ENABLE_SHARK_LARGE then
|
if not ENABLE_SHARK_LARGE then
|
||||||
l_spawn_chance = l_spawn_chance - 20000
|
l_spawn_chance = l_spawn_chance - 20000
|
||||||
end
|
end
|
||||||
|
|
||||||
if not ENABLE_SHARK_MEDIUM then
|
if not ENABLE_SHARK_MEDIUM then
|
||||||
l_spawn_chance = l_spawn_chance - 20000
|
l_spawn_chance = l_spawn_chance - 20000
|
||||||
end
|
end
|
||||||
|
|
||||||
if not ENABLE_SHARK_SMALL then
|
if not ENABLE_SHARK_SMALL then
|
||||||
l_spawn_chance = l_spawn_chance - 20000
|
l_spawn_chance = l_spawn_chance - 20000
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- large
|
-- large
|
||||||
if ENABLE_SHARK_LARGE then
|
if ENABLE_SHARK_LARGE then
|
||||||
|
|
||||||
@ -72,7 +49,7 @@ if ENABLE_SHARK_LARGE then
|
|||||||
armor = 150,
|
armor = 150,
|
||||||
collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75},
|
collisionbox = {-0.75, -0.5, -0.75, 0.75, 0.5, 0.75},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = l_model,
|
mesh = "mob_shark.b3d",
|
||||||
textures = l_skins,
|
textures = l_skins,
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
walk_velocity = 4,
|
walk_velocity = 4,
|
||||||
@ -85,7 +62,16 @@ if ENABLE_SHARK_LARGE then
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24,
|
||||||
|
speed_run = 24,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 80,
|
||||||
|
walk_start = 80,
|
||||||
|
walk_end = 160,
|
||||||
|
run_start = 80,
|
||||||
|
run_end = 160
|
||||||
|
},
|
||||||
jump = false,
|
jump = false,
|
||||||
stepheight = 0,
|
stepheight = 0,
|
||||||
drops = {
|
drops = {
|
||||||
@ -95,14 +81,18 @@ if ENABLE_SHARK_LARGE then
|
|||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_sharks:shark_lg",
|
name = "mobs_sharks:shark_lg",
|
||||||
nodes = l_spawn_in,
|
nodes = {"default:water_flowing","default:water_source"},
|
||||||
neighbors = l_spawn_near,
|
neighbors = {
|
||||||
|
"default:water_flowing", "default:water_source",
|
||||||
|
"seawrecks:woodship", "seawrecks:uboot"
|
||||||
|
},
|
||||||
interval = 30,
|
interval = 30,
|
||||||
chance = l_spawn_chance,
|
chance = l_spawn_chance,
|
||||||
max_height = 0,
|
max_height = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)", l_egg_texture, 0)
|
mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)",
|
||||||
|
"mob_shark_shark_item.png", 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- medium
|
-- medium
|
||||||
@ -119,7 +109,7 @@ if ENABLE_SHARK_MEDIUM then
|
|||||||
collisionbox = {-0.57, -0.38, -0.57, 0.57, 0.38, 0.57},
|
collisionbox = {-0.57, -0.38, -0.57, 0.57, 0.38, 0.57},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x = 0.75, y = 0.75},
|
visual_size = {x = 0.75, y = 0.75},
|
||||||
mesh = l_model,
|
mesh = "mob_shark.b3d",
|
||||||
textures = l_skins,
|
textures = l_skins,
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -132,7 +122,16 @@ if ENABLE_SHARK_MEDIUM then
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24,
|
||||||
|
speed_run = 24,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 80,
|
||||||
|
walk_start = 80,
|
||||||
|
walk_end = 160,
|
||||||
|
run_start = 80,
|
||||||
|
run_end = 160
|
||||||
|
},
|
||||||
jump = false,
|
jump = false,
|
||||||
stepheight = 0,
|
stepheight = 0,
|
||||||
drops = {
|
drops = {
|
||||||
@ -142,14 +141,18 @@ if ENABLE_SHARK_MEDIUM then
|
|||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_sharks:shark_md",
|
name = "mobs_sharks:shark_md",
|
||||||
nodes = l_spawn_in,
|
nodes = {"default:water_flowing","default:water_source"},
|
||||||
neighbors = l_spawn_near,
|
neighbors = {
|
||||||
|
"default:water_flowing", "default:water_source",
|
||||||
|
"seawrecks:woodship", "seawrecks:uboot"
|
||||||
|
},
|
||||||
interval = 30,
|
interval = 30,
|
||||||
chance = l_spawn_chance,
|
chance = l_spawn_chance,
|
||||||
max_height = 0,
|
max_height = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)", l_egg_texture, 0)
|
mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)",
|
||||||
|
"mob_shark_shark_item.png", 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- small
|
-- small
|
||||||
@ -166,7 +169,7 @@ if ENABLE_SHARK_SMALL then
|
|||||||
collisionbox = {-0.38, -0.25, -0.38, 0.38, 0.25, 0.38},
|
collisionbox = {-0.38, -0.25, -0.38, 0.38, 0.25, 0.38},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x = 0.5, y = 0.5},
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
mesh = l_model,
|
mesh = "mob_shark.b3d",
|
||||||
textures = l_skins,
|
textures = l_skins,
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
@ -179,7 +182,16 @@ if ENABLE_SHARK_SMALL then
|
|||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 10,
|
lava_damage = 10,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24,
|
||||||
|
speed_run = 24,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 80,
|
||||||
|
walk_start = 80,
|
||||||
|
walk_end = 160,
|
||||||
|
run_start = 80,
|
||||||
|
run_end = 160
|
||||||
|
},
|
||||||
jump = false,
|
jump = false,
|
||||||
stepheight = 0,
|
stepheight = 0,
|
||||||
drops = {
|
drops = {
|
||||||
@ -189,12 +201,16 @@ if ENABLE_SHARK_SMALL then
|
|||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_sharks:shark_sm",
|
name = "mobs_sharks:shark_sm",
|
||||||
nodes = l_spawn_in,
|
nodes = {"default:water_flowing","default:water_source"},
|
||||||
neighbors = l_spawn_near,
|
neighbors = {
|
||||||
|
"default:water_flowing", "default:water_source",
|
||||||
|
"seawrecks:woodship", "seawrecks:uboot"
|
||||||
|
},
|
||||||
interval = 30,
|
interval = 30,
|
||||||
chance = l_spawn_chance,
|
chance = l_spawn_chance,
|
||||||
max_height = 0,
|
max_height = 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)", l_egg_texture, 0)
|
mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)",
|
||||||
|
"mob_shark_shark_item.png", 0)
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
Licenses
|
Licenses
|
||||||
|
|
||||||
|
Code: MIT
|
||||||
Model/textures: unknown
|
Model/textures: unknown
|
||||||
Author: AspireMint
|
Author: AspireMint
|
||||||
|
@ -1,40 +1,14 @@
|
|||||||
|
|
||||||
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
|
|
||||||
minetest.log("error", "[mobs_turtles] mobs redo API not found!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local l_colors = {
|
|
||||||
"#604000:175", --brown
|
|
||||||
"#604000:100", --brown2
|
|
||||||
"#ffffff:150", --white
|
|
||||||
"#404040:150", --dark_grey
|
|
||||||
"#a0a0a0:150", --grey
|
|
||||||
"#808000:150", --olive
|
|
||||||
"#ff0000:150" --red
|
|
||||||
}
|
|
||||||
local l_skins = {
|
local l_skins = {
|
||||||
{"turtle1.png^turtle2.png^turtle3.png^turtle4.png"
|
{"turtle1.png^turtle2.png^turtle3.png^turtle4.png"
|
||||||
.. "^turtle5.png^turtle6.png^turtle7.png"},
|
.. "^turtle5.png^turtle6.png^turtle7.png"},
|
||||||
{"turtle1.png^(turtle2.png^[colorize:" .. l_colors[5]
|
{"turtle1.png^(turtle2.png^[colorize:#a0a0a0:150" -- grey
|
||||||
.. ")^(turtle3.png^[colorize:" .. l_colors[4]
|
.. ")^(turtle3.png^[colorize:#404040:150" -- dark grey
|
||||||
.. ")^(turtle4.png^[colorize:" .. l_colors[1]
|
.. ")^(turtle4.png^[colorize:#604000:175" -- brown
|
||||||
.. ")^(turtle5.png^[colorize:" .. l_colors[2]
|
.. ")^(turtle5.png^[colorize:#604000:100" -- brown 2
|
||||||
.. ")^(turtle6.png^[colorize:" .. l_colors[6] .. ")^turtle7.png"}
|
.. ")^(turtle6.png^[colorize:#808000:150" .. ")^turtle7.png"} -- olive
|
||||||
}
|
}
|
||||||
local l_anims = {
|
|
||||||
speed_normal = 24,
|
|
||||||
speed_run = 24,
|
|
||||||
stand_start = 1,
|
|
||||||
stand_end = 50,
|
|
||||||
walk_start = 60,
|
|
||||||
walk_end = 90,
|
|
||||||
run_start = 60,
|
|
||||||
run_end = 90,
|
|
||||||
hide_start = 95,
|
|
||||||
hide_end = 100
|
|
||||||
}
|
|
||||||
local l_model = "mobf_turtle.x"
|
|
||||||
local l_spawn_chance = 30000
|
local l_spawn_chance = 30000
|
||||||
|
|
||||||
-- land turtle
|
-- land turtle
|
||||||
@ -46,7 +20,7 @@ mobs:register_mob("mobs_turtles:turtle", {
|
|||||||
armor = 200,
|
armor = 200,
|
||||||
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.35, 0.4},
|
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.35, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = l_model,
|
mesh = "mobf_turtle.x",
|
||||||
textures = l_skins,
|
textures = l_skins,
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 8,
|
view_range = 8,
|
||||||
@ -60,21 +34,47 @@ mobs:register_mob("mobs_turtles:turtle", {
|
|||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
fall_damage = 1,
|
fall_damage = 1,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24,
|
||||||
|
speed_run = 24,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 50,
|
||||||
|
walk_start = 60,
|
||||||
|
walk_end = 90,
|
||||||
|
run_start = 60,
|
||||||
|
run_end = 90,
|
||||||
|
hide_start = 95,
|
||||||
|
hide_end = 100
|
||||||
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||||
},
|
},
|
||||||
follow = "farming:carrot",
|
follow = "farming:carrot",
|
||||||
|
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
self.state = ""
|
|
||||||
|
self.state = "hide" -- was ""
|
||||||
|
|
||||||
mobs:set_velocity(self, 0)
|
mobs:set_velocity(self, 0)
|
||||||
|
|
||||||
self.object:set_animation(
|
self.object:set_animation(
|
||||||
{x = self.animation.hide_start, y = self.animation.hide_end},
|
{x = self.animation.hide_start, y = self.animation.hide_end},
|
||||||
self.animation.speed_normal, 0)
|
self.animation.speed_normal, 0)
|
||||||
|
|
||||||
minetest.after(5, function()
|
minetest.after(5, function()
|
||||||
self.state = "stand"
|
if self and self.object then
|
||||||
|
self.state = "stand"
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
mobs:capture_mob(self, clicker, 0, 80, 100, true, nil)
|
mobs:capture_mob(self, clicker, 0, 80, 100, true, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
do_custom = function(self, dtime)
|
||||||
|
|
||||||
|
if self.state == "hide" then
|
||||||
|
mobs:set_velocity(self, 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ mobs:register_mob("mobs_turtles:seaturtle", {
|
|||||||
collisionbox = {-0.8, 0.0, -0.8, 0.8, 0.7, 0.8},
|
collisionbox = {-0.8, 0.0, -0.8, 0.8, 0.7, 0.8},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x = 2, y = 2},
|
visual_size = {x = 2, y = 2},
|
||||||
mesh = l_model,
|
mesh = "mobf_turtle.x",
|
||||||
textures = l_skins,
|
textures = l_skins,
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 10,
|
view_range = 10,
|
||||||
@ -125,7 +125,18 @@ mobs:register_mob("mobs_turtles:seaturtle", {
|
|||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
fall_damage = 0,
|
fall_damage = 0,
|
||||||
animation = l_anims,
|
animation = {
|
||||||
|
speed_normal = 24,
|
||||||
|
speed_run = 24,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 50,
|
||||||
|
walk_start = 60,
|
||||||
|
walk_end = 90,
|
||||||
|
run_start = 60,
|
||||||
|
run_end = 90,
|
||||||
|
hide_start = 95,
|
||||||
|
hide_end = 100
|
||||||
|
},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||||
},
|
},
|
||||||
@ -139,7 +150,7 @@ mobs:spawn({
|
|||||||
nodes = {"default:water_flowing","default:water_source"},
|
nodes = {"default:water_flowing","default:water_source"},
|
||||||
neighbors = {
|
neighbors = {
|
||||||
"default:water_flowing", "default:water_source", "group:seaplants",
|
"default:water_flowing", "default:water_source", "group:seaplants",
|
||||||
"seawrecks:woodship", "seawrecks:uboot"
|
"seawrecks:woodship", "seawrecks:uboot"
|
||||||
},
|
},
|
||||||
min_light = 5,
|
min_light = 5,
|
||||||
interval = 30,
|
interval = 30,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user