code tidy
This commit is contained in:
parent
5d914bdbd8
commit
919696be2e
@ -19,6 +19,7 @@ if not ENABLE_SWIMMERS then
|
||||
l_spawn_chance = l_spawn_chance - 20000
|
||||
end
|
||||
|
||||
|
||||
-- no float
|
||||
if ENABLE_WALKERS then
|
||||
|
||||
@ -48,16 +49,21 @@ if ENABLE_WALKERS then
|
||||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
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
|
||||
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 = {
|
||||
{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}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
@ -73,12 +79,13 @@ if ENABLE_WALKERS then
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
min_height = 0,
|
||||
max_height = 10,
|
||||
max_height = 10
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_crocs:crocodile", "Crocodile", "default_grass.png", 1)
|
||||
end
|
||||
|
||||
|
||||
-- float
|
||||
if ENABLE_FLOATERS then
|
||||
|
||||
@ -107,16 +114,21 @@ if ENABLE_FLOATERS then
|
||||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
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
|
||||
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 = {
|
||||
{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}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
@ -130,13 +142,14 @@ if ENABLE_FLOATERS then
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
min_height = -3,
|
||||
max_height = 10,
|
||||
max_height = 10
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_crocs:crocodile_float", "Crocodile (floater)",
|
||||
"default_grass.png", 1)
|
||||
"default_grass.png", 1)
|
||||
end
|
||||
|
||||
|
||||
-- swim
|
||||
if ENABLE_SWIMMERS then
|
||||
|
||||
@ -167,16 +180,22 @@ if ENABLE_SWIMMERS then
|
||||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 0, stand_end = 80,
|
||||
walk_start = 81, walk_end = 170,
|
||||
fly_start = 81, fly_end = 170,
|
||||
run_start = 81, run_end = 170,
|
||||
punch_start = 205, punch_end = 220
|
||||
speed_normal = 24,
|
||||
speed_run = 24,
|
||||
stand_start = 0,
|
||||
stand_end = 80,
|
||||
walk_start = 81,
|
||||
walk_end = 170,
|
||||
fly_start = 81,
|
||||
fly_end = 170,
|
||||
run_start = 81,
|
||||
run_end = 170,
|
||||
punch_start = 205,
|
||||
punch_end = 220
|
||||
},
|
||||
drops = {
|
||||
{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}
|
||||
},
|
||||
})
|
||||
|
||||
@ -187,9 +206,9 @@ if ENABLE_SWIMMERS then
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
min_height = -8,
|
||||
max_height = 10,
|
||||
max_height = 10
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_crocs:crocodile_swim", "Crocodile (swimmer)",
|
||||
"default_grass.png", 1)
|
||||
"default_grass.png", 1)
|
||||
end
|
||||
|
@ -27,6 +27,7 @@ if SPRITE_VERSION then
|
||||
l_trop_textures = {{"animal_fish_blue_white_fish_blue_white_item.png"}}
|
||||
end
|
||||
|
||||
|
||||
-- Clownfish
|
||||
mobs:register_mob("mobs_fish:clownfish", {
|
||||
type = "animal",
|
||||
@ -84,6 +85,7 @@ mobs:register_mob("mobs_fish:clownfish", {
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_fish:clownfish",
|
||||
nodes = {
|
||||
@ -98,8 +100,10 @@ mobs:spawn({
|
||||
active_object_count = 5
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("mobs_fish:clownfish", "Clownfish",
|
||||
"animal_clownfish_clownfish_item.png", 0)
|
||||
"animal_clownfish_clownfish_item.png", 0)
|
||||
|
||||
|
||||
-- Tropical fish
|
||||
mobs:register_mob("mobs_fish:tropical", {
|
||||
@ -156,6 +160,7 @@ mobs:register_mob("mobs_fish:tropical", {
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_fish:tropical",
|
||||
nodes = {
|
||||
@ -170,8 +175,9 @@ mobs:spawn({
|
||||
active_object_count = 5
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("mobs_fish:tropical", "Tropical fish",
|
||||
"animal_fish_blue_white_fish_blue_white_item.png", 0)
|
||||
"animal_fish_blue_white_fish_blue_white_item.png", 0)
|
||||
|
||||
|
||||
local function add_food_group(item)
|
||||
|
@ -26,11 +26,11 @@ mobs:register_mob("mobs_jellyfish:jellyfish", {
|
||||
light_damage = 0,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:capture_mob(self, clicker, 80, 100, 0,
|
||||
true, "mobs_jellyfish:jellyfish")
|
||||
mobs:capture_mob(self, clicker, 80, 100, 0, true, "mobs_jellyfish:jellyfish")
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_jellyfish:jellyfish",
|
||||
nodes = {"default:water_source"},
|
||||
@ -38,7 +38,8 @@ mobs:spawn({
|
||||
min_light = 5,
|
||||
interval = 30,
|
||||
chance = 10000,
|
||||
max_height = 0,
|
||||
max_height = 0
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("mobs_jellyfish:jellyfish", "Jellyfish", "jellyfish_inv.png", 0)
|
||||
|
@ -77,8 +77,8 @@ if ENABLE_SHARK_LARGE then
|
||||
jump = false,
|
||||
stepheight = 0,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||
},
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
@ -90,13 +90,14 @@ if ENABLE_SHARK_LARGE then
|
||||
},
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
max_height = 0,
|
||||
max_height = 0
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_sharks:shark_lg", "Shark (large)",
|
||||
"mob_shark_shark_item.png", 0)
|
||||
end
|
||||
|
||||
|
||||
-- medium
|
||||
if ENABLE_SHARK_MEDIUM then
|
||||
|
||||
@ -137,8 +138,8 @@ if ENABLE_SHARK_MEDIUM then
|
||||
jump = false,
|
||||
stepheight = 0,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||
},
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
@ -150,13 +151,14 @@ if ENABLE_SHARK_MEDIUM then
|
||||
},
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
max_height = 0,
|
||||
max_height = 0
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_sharks:shark_md", "Shark (medium)",
|
||||
"mob_shark_shark_item.png", 0)
|
||||
end
|
||||
|
||||
|
||||
-- small
|
||||
if ENABLE_SHARK_SMALL then
|
||||
|
||||
@ -197,8 +199,8 @@ if ENABLE_SHARK_SMALL then
|
||||
jump = false,
|
||||
stepheight = 0,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||
},
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
}
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
@ -210,7 +212,7 @@ if ENABLE_SHARK_SMALL then
|
||||
},
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
max_height = 0,
|
||||
max_height = 0
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_sharks:shark_sm", "Shark (small)",
|
||||
|
@ -11,6 +11,7 @@ local l_skins = {
|
||||
|
||||
local l_spawn_chance = 30000
|
||||
|
||||
|
||||
-- land turtle
|
||||
mobs:register_mob("mobs_turtles:turtle", {
|
||||
type = "animal",
|
||||
@ -47,13 +48,13 @@ mobs:register_mob("mobs_turtles:turtle", {
|
||||
hide_end = 100
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3}
|
||||
},
|
||||
follow = "farming:carrot",
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
self.state = "hide" -- was ""
|
||||
self.state = "hide"
|
||||
|
||||
mobs:set_velocity(self, 0)
|
||||
|
||||
@ -62,6 +63,7 @@ mobs:register_mob("mobs_turtles:turtle", {
|
||||
self.animation.speed_normal, 0)
|
||||
|
||||
minetest.after(5, function()
|
||||
|
||||
if self and self.object then
|
||||
self.state = "stand"
|
||||
end
|
||||
@ -78,6 +80,7 @@ mobs:register_mob("mobs_turtles:turtle", {
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_turtles:turtle",
|
||||
nodes = {
|
||||
@ -93,11 +96,13 @@ mobs:spawn({
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
min_height = 1,
|
||||
max_height = 10,
|
||||
max_height = 10
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("mobs_turtles:turtle", "Turtle", "default_grass.png", 1)
|
||||
|
||||
|
||||
-- sea turtle
|
||||
mobs:register_mob("mobs_turtles:seaturtle", {
|
||||
type = "animal",
|
||||
@ -138,13 +143,14 @@ mobs:register_mob("mobs_turtles:seaturtle", {
|
||||
hide_end = 100
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 1, max = 3},
|
||||
{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
|
||||
})
|
||||
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_turtles:seaturtle",
|
||||
nodes = {"default:water_flowing","default:water_source"},
|
||||
@ -155,7 +161,8 @@ mobs:spawn({
|
||||
min_light = 5,
|
||||
interval = 30,
|
||||
chance = l_spawn_chance,
|
||||
max_height = 0,
|
||||
max_height = 0
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("mobs_turtles:seaturtle", "Sea Turtle", "default_water.png", 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user