update license files and tidy code
parent
29b8ac4a0a
commit
aa3e7a99ce
|
@ -1,5 +1,7 @@
|
|||
Licenses
|
||||
|
||||
Code: MIT
|
||||
|
||||
Model and textures:
|
||||
CC-BY-SA 3.0, Author sapier
|
||||
URL: http://creativecommons.org/licenses/by-sa/3.0/de/legalcode
|
||||
URL: http://creativecommons.org/licenses/by-sa/3.0/de/legalcode
|
||||
|
|
|
@ -1,52 +1,20 @@
|
|||
|
||||
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
|
||||
minetest.log("error", "[mobs_birds] mobs redo API not found!")
|
||||
return
|
||||
end
|
||||
|
||||
-- local variables
|
||||
local l_skins_gull = {
|
||||
{"animal_gull_mesh.png"},
|
||||
{"gull_black.png"},
|
||||
{"gull_gray.png"},
|
||||
{"gull_grayblue.png"}
|
||||
}
|
||||
local l_skins_bird = {
|
||||
{"bird_blueish.png"},
|
||||
{"bird_brown.png"},
|
||||
{"bird_gray.png"},
|
||||
{"bird_grayblue.png"},
|
||||
{"bird_red.png"},
|
||||
{"bird_redish.png"}
|
||||
}
|
||||
local l_anims = {
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 95,
|
||||
walk_start = 1, walk_end = 95,
|
||||
run_start = 1, run_end = 95
|
||||
}
|
||||
local l_model = "animal_gull.b3d"
|
||||
local l_egg_texture = "default_cloud.png"
|
||||
local l_capture_chance_h = 5
|
||||
local l_capture_chance_n = 60
|
||||
local l_spawn_in = {"air"}
|
||||
local l_spawn_near_gull = {"default:water_source", "default:water_flowing"}
|
||||
local l_spawn_near_bird = {
|
||||
"default:leaves", "default:pine_needles",
|
||||
"default:jungleleaves", "default:cactus"
|
||||
}
|
||||
local l_spawn_chance_gull = 24000
|
||||
local l_spawn_chance_bird = 36000
|
||||
|
||||
-- load settings
|
||||
dofile(minetest.get_modpath("mobs_birds").."/SETTINGS.txt")
|
||||
|
||||
if not ENABLE_LARGE_BIRDS then
|
||||
l_spawn_chance_bird = l_spawn_chance_bird - 18000
|
||||
end
|
||||
|
||||
if not ENABLE_SMALL_BIRDS then
|
||||
l_spawn_chance_bird = l_spawn_chance_bird - 18000
|
||||
end
|
||||
|
||||
|
||||
-- gulls
|
||||
if ENABLE_GULLS then
|
||||
|
||||
|
@ -58,8 +26,13 @@ if ENABLE_GULLS then
|
|||
armor = 100,
|
||||
collisionbox = {-1, -0.3, -1, 1, 0.3, 1},
|
||||
visual = "mesh",
|
||||
mesh = l_model,
|
||||
textures = l_skins_gull,
|
||||
mesh = "animal_gull.b3d",
|
||||
textures = {
|
||||
{"animal_gull_mesh.png"},
|
||||
{"gull_black.png"},
|
||||
{"gull_gray.png"},
|
||||
{"gull_grayblue.png"}
|
||||
},
|
||||
rotate = 270,
|
||||
walk_velocity = 4,
|
||||
run_velocity = 6,
|
||||
|
@ -71,24 +44,29 @@ if ENABLE_GULLS then
|
|||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
view_range = 14,
|
||||
animation = l_anims,
|
||||
animation = {
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 95,
|
||||
walk_start = 1, walk_end = 95,
|
||||
run_start = 1, run_end = 95
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:capture_mob(self, clicker, l_capture_chance_h, l_capture_chance_n, 0, true, nil)
|
||||
mobs:capture_mob(self, clicker, 5, 60, 0, true, nil)
|
||||
end
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_birds:gull",
|
||||
nodes = l_spawn_in,
|
||||
neighbors = l_spawn_near_gull,
|
||||
nodes = {"air"},
|
||||
neighbors = {"default:water_source", "default:water_flowing"},
|
||||
max_light = 5,
|
||||
interval = 30,
|
||||
chance = l_spawn_chance_gull,
|
||||
min_height = 0,
|
||||
max_height = 200,
|
||||
max_height = 200
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_birds:gull", "Gull", l_egg_texture, 1)
|
||||
mobs:register_egg("mobs_birds:gull", "Gull", "default_cloud.png", 1)
|
||||
end
|
||||
|
||||
-- large birds
|
||||
|
@ -102,8 +80,15 @@ if ENABLE_LARGE_BIRDS then
|
|||
armor = 100,
|
||||
collisionbox = {-0.5, -0.3, -0.5, 0.5, 0.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = l_model,
|
||||
textures = l_skins_bird,
|
||||
mesh = "animal_gull.b3d",
|
||||
textures = {
|
||||
{"bird_blueish.png"},
|
||||
{"bird_brown.png"},
|
||||
{"bird_gray.png"},
|
||||
{"bird_grayblue.png"},
|
||||
{"bird_red.png"},
|
||||
{"bird_redish.png"}
|
||||
},
|
||||
visual_size = {x = .5, y = .5},
|
||||
rotate = 270,
|
||||
walk_velocity = 4,
|
||||
|
@ -116,24 +101,32 @@ if ENABLE_LARGE_BIRDS then
|
|||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
view_range = 12,
|
||||
animation = l_anims,
|
||||
animation = {
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 95,
|
||||
walk_start = 1, walk_end = 95,
|
||||
run_start = 1, run_end = 95
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:capture_mob(self, clicker, l_capture_chance_h, l_capture_chance_n, 0, true, nil)
|
||||
mobs:capture_mob(self, clicker, 5, 60, 0, true, nil)
|
||||
end
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_birds:bird_lg",
|
||||
nodes = l_spawn_in,
|
||||
neighbors = l_spawn_near_bird,
|
||||
nodes = {"air"},
|
||||
neighbors = {
|
||||
"default:leaves", "default:pine_needles",
|
||||
"default:jungleleaves", "default:cactus"
|
||||
},
|
||||
max_light = 5,
|
||||
interval = 30,
|
||||
chance = l_spawn_chance_bird,
|
||||
min_height = 0,
|
||||
max_height = 200,
|
||||
max_height = 200
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_birds:bird_lg", "Large bird", l_egg_texture, 1)
|
||||
mobs:register_egg("mobs_birds:bird_lg", "Large bird", "default_cloud.png", 1)
|
||||
end
|
||||
|
||||
-- small birds
|
||||
|
@ -147,8 +140,15 @@ if ENABLE_SMALL_BIRDS then
|
|||
armor = 100,
|
||||
collisionbox = {-0.25, -0.3, -0.25, 0.25, 0.3, 0.25},
|
||||
visual = "mesh",
|
||||
mesh = l_model,
|
||||
textures = l_skins_bird,
|
||||
mesh = "animal_gull.b3d",
|
||||
textures = {
|
||||
{"bird_blueish.png"},
|
||||
{"bird_brown.png"},
|
||||
{"bird_gray.png"},
|
||||
{"bird_grayblue.png"},
|
||||
{"bird_red.png"},
|
||||
{"bird_redish.png"}
|
||||
},
|
||||
visual_size = {x = .25, y = .25},
|
||||
rotate = 270,
|
||||
walk_velocity = 4,
|
||||
|
@ -161,22 +161,30 @@ if ENABLE_SMALL_BIRDS then
|
|||
lava_damage = 10,
|
||||
light_damage = 0,
|
||||
view_range = 10,
|
||||
animation = l_anims,
|
||||
animation = {
|
||||
speed_normal = 24, speed_run = 24,
|
||||
stand_start = 1, stand_end = 95,
|
||||
walk_start = 1, walk_end = 95,
|
||||
run_start = 1, run_end = 95
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:capture_mob(self, clicker, l_capture_chance_h, l_capture_chance_n, 0, true, nil)
|
||||
mobs:capture_mob(self, clicker, 5, 60, 0, true, nil)
|
||||
end
|
||||
})
|
||||
|
||||
mobs:spawn({
|
||||
name = "mobs_birds:bird_sm",
|
||||
nodes = l_spawn_in,
|
||||
neighbors = l_spawn_near_bird,
|
||||
nodes = {"air"},
|
||||
neighbors = {
|
||||
"default:leaves", "default:pine_needles",
|
||||
"default:jungleleaves", "default:cactus"
|
||||
},
|
||||
max_light = 5,
|
||||
interval = 30,
|
||||
chance = l_spawn_chance_bird,
|
||||
min_height = 0,
|
||||
max_height = 200,
|
||||
max_height = 200
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_birds:bird_sm", "Small bird", l_egg_texture, 1)
|
||||
mobs:register_egg("mobs_birds:bird_sm", "Small bird", "default_cloud.png", 1)
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Licenses
|
||||
|
||||
Model/Textures: unknown
|
||||
Author: AspireMint
|
||||
Code: MIT
|
||||
Model/Textures: CC-BY-SA 3.0, Author AspireMint
|
||||
|
||||
texture modification by: blert2112
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
|
||||
if minetest.get_modpath("mobs") and not mobs.mod and mobs.mod ~= "redo" then
|
||||
minetest.log("error", "[mobs_butterfly] mobs redo API not found!")
|
||||
return
|
||||
end
|
||||
|
||||
-- local variables
|
||||
local l_skins = {
|
||||
{"bf1.png^bf2.png^bf3.png^bf4.png^bf5.png"},
|
||||
|
@ -13,6 +8,7 @@ local l_skins = {
|
|||
{"(bf1.png^[colorize:pink)^(bf2.png^[colorize:white)^(bf3.png^[colorize:blue)^(bf4.png^[colorize:orange)^(bf5.png^[colorize:gray)"},
|
||||
{"(bf1.png^[colorize:darkgreen)^(bf2.png^[colorize:brown)^(bf3.png^[colorize:black)^(bf4.png^[colorize:darkgray)^(bf5.png^[colorize:red)"}
|
||||
}
|
||||
|
||||
local l_spawnnear = {"group:flower"}
|
||||
local l_spawnchance = 20000
|
||||
|
||||
|
@ -39,15 +35,18 @@ mobs:register_mob("mobs_butterfly:butterfly", {
|
|||
animation = {
|
||||
speed_normal = 15, speed_run = 30,
|
||||
stand_start = 0, stand_end = 90,
|
||||
walk_start = 0, walk_end = 90,
|
||||
walk_start = 0, walk_end = 90
|
||||
},
|
||||
after_activate = function(self, staticdata, def, dtime)
|
||||
|
||||
if minetest.get_modpath("butterflies") then
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
local butter = {"white", "red", "violet"}
|
||||
local replace = "butterflies:butterfly_"
|
||||
.. butter[math.random(1, #butter)]
|
||||
minetest.set_node(pos, {name = replace})
|
||||
local replace = "butterflies:butterfly_" .. butter[math.random(1, #butter)]
|
||||
|
||||
minetest.set_node(pos, {name = replace})
|
||||
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue