Fish and skybox change
>Skybox changes to blue when underwater (this can be disabled in the settings) >Added fish >More bubbles when underwatermaster
parent
fb378caeb3
commit
8a3493f68d
|
@ -8,6 +8,7 @@ tnt_radius = 3
|
||||||
enable_bed_respawn = true
|
enable_bed_respawn = true
|
||||||
give_initial_stuff = true
|
give_initial_stuff = true
|
||||||
enable_weather = true
|
enable_weather = true
|
||||||
|
underwater_effects = true
|
||||||
loz_mode = true
|
loz_mode = true
|
||||||
enable_armour = true
|
enable_armour = true
|
||||||
ARMOR_UPDATE_TIME = 1.5
|
ARMOR_UPDATE_TIME = 1.5
|
||||||
|
|
|
@ -152,7 +152,11 @@ local apply_weather = function(player, pos, weather_type)
|
||||||
elseif weather_type == "insects" then
|
elseif weather_type == "insects" then
|
||||||
player:set_sky(nil, "regular", nil, true)
|
player:set_sky(nil, "regular", nil, true)
|
||||||
elseif weather_type == "none" then
|
elseif weather_type == "none" then
|
||||||
|
if underwater then
|
||||||
|
player:set_sky({r=10, g=20, b=75}, "plain", nil, true)
|
||||||
|
else
|
||||||
player:set_sky(nil, "regular", nil, true)
|
player:set_sky(nil, "regular", nil, true)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -168,6 +172,7 @@ minetest.register_on_joinplayer(function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local sound_ready = true
|
local sound_ready = true
|
||||||
|
local underwater = false
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
if math.random(1,4) ~= 4 or hyrule_weather.weather == "twilight" then return end
|
if math.random(1,4) ~= 4 or hyrule_weather.weather == "twilight" then return end
|
||||||
|
@ -199,7 +204,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
end
|
end
|
||||||
if pos.y <= -20 then display_weather = false end
|
if pos.y <= -20 then display_weather = false end
|
||||||
--apply weather effect
|
--apply weather effect
|
||||||
if display_weather then
|
if display_weather and not underwater then
|
||||||
apply_weather(player, pos, hyrule_weather.weather)
|
apply_weather(player, pos, hyrule_weather.weather)
|
||||||
if sound_ready and hyrule_weather.weather ~= nil then
|
if sound_ready and hyrule_weather.weather ~= nil then
|
||||||
local weather_name = hyrule_weather.weather
|
local weather_name = hyrule_weather.weather
|
||||||
|
@ -213,6 +218,18 @@ minetest.register_globalstep(function(dtime)
|
||||||
else
|
else
|
||||||
apply_weather(player, pos, "none")
|
apply_weather(player, pos, "none")
|
||||||
end
|
end
|
||||||
|
--underwater effects
|
||||||
|
if minetest.setting_get("underwater_effects") then
|
||||||
|
if minetest.get_node({x=pos.x, y=pos.y+0.5, z=pos.z}).name == "default:water_source" and minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}).name == "default:water_source" then
|
||||||
|
underwater = true
|
||||||
|
player:set_sky({r=10, g=20, b=75}, "plain", nil, true)
|
||||||
|
else
|
||||||
|
underwater = false
|
||||||
|
if not display_weather then
|
||||||
|
player:set_sky(nil, "regular", nil, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
--bubbles
|
--bubbles
|
||||||
if math.random(1,10) == 1 then
|
if math.random(1,10) == 1 then
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
local water = minetest.find_node_near({x=pos.x+math.random(-7,7), y=pos.y+math.random(-6,-3), z=pos.z+math.random(-7,7)}, 5, {"default:water_source", "default:river_water_source"}, true)
|
local water = minetest.find_node_near({x=pos.x+math.random(-7,7), y=pos.y+math.random(-10,-7), z=pos.z+math.random(-7,7)}, 5, {"default:water_source", "default:river_water_source"}, true)
|
||||||
if not water then return end
|
if not water then return end
|
||||||
minetest.add_particle({
|
minetest.add_particle({
|
||||||
pos = {x=water.x, y=water.y, z=water.z},
|
pos = {x=water.x, y=water.y, z=water.z},
|
||||||
|
@ -205,6 +205,20 @@ minetest.register_globalstep(function(dtime)
|
||||||
texture = "bubble.png",
|
texture = "bubble.png",
|
||||||
glow = 5
|
glow = 5
|
||||||
})
|
})
|
||||||
|
local water2 = minetest.find_node_near({x=pos.x+math.random(-7,7), y=pos.y+math.random(-10,-7), z=pos.z+math.random(-7,7)}, 5, {"default:water_source", "default:river_water_source"}, true)
|
||||||
|
if not water2 then return end
|
||||||
|
minetest.add_particle({
|
||||||
|
pos = {x=water2.x, y=water2.y, z=water2.z},
|
||||||
|
velocity = {x=math.random(-5,5)/10, y=math.random(3,5), z=math.random(-5,5)/10},
|
||||||
|
acceleration = {x=math.random(-1,1)/10, y=math.random(-10,-5)/10, z=math.random(-1,1)/10},
|
||||||
|
expirationtime = 3,
|
||||||
|
size = math.random(3,5),
|
||||||
|
collisiondetection = true,
|
||||||
|
collision_removal = true,
|
||||||
|
vertical = false,
|
||||||
|
texture = "bubble.png",
|
||||||
|
glow = 5
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if player:get_wielded_item():get_name() == "hyruletools:sail" then
|
if player:get_wielded_item():get_name() == "hyruletools:sail" then
|
||||||
|
|
|
@ -34,6 +34,7 @@ dofile(path.."/gibido.lua")
|
||||||
dofile(path.."/biri.lua")
|
dofile(path.."/biri.lua")
|
||||||
dofile(path.."/keese.lua")
|
dofile(path.."/keese.lua")
|
||||||
dofile(path.."/skulltula.lua")
|
dofile(path.."/skulltula.lua")
|
||||||
|
dofile(path.."/seafish.lua")
|
||||||
dofile(path.."/spawns.lua")
|
dofile(path.."/spawns.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,63 @@
|
||||||
|
|
||||||
|
-- seafish by D00Med
|
||||||
|
|
||||||
|
mobs:register_mob("mobs_loz:seafish", {
|
||||||
|
type = "animal",
|
||||||
|
passive = true,
|
||||||
|
damage = 0,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 10,
|
||||||
|
hp_max = 25,
|
||||||
|
armor = 110,
|
||||||
|
collisionbox = {-0.05, -0.05, -0.05, 0.05, 0.05, 0.05},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "seafish.b3d",
|
||||||
|
textures = {
|
||||||
|
{"mobs_seafish.png"},
|
||||||
|
{"mobs_seafish2.png"},
|
||||||
|
{"mobs_seafish3.png"},
|
||||||
|
{"mobs_seafish4.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "bubble.png",
|
||||||
|
makes_footstep_sound = false,
|
||||||
|
view_range = 5,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 3,
|
||||||
|
runaway = true,
|
||||||
|
runaway_timer = 40,
|
||||||
|
jump = false,
|
||||||
|
stepheight = 0,
|
||||||
|
fly = true,
|
||||||
|
fly_in = {"default:water_source", "moreplants:coral", "moreplants:seaweed1", "moreplants:seaweed2", "moreplants:seaweed3", "moreplants:seaweed4", "moreplants:coral2", "moreplants:coral3"},
|
||||||
|
jump_height = 0,
|
||||||
|
fall_damage = 0,
|
||||||
|
fall_speed = -6,
|
||||||
|
drops = {
|
||||||
|
{name = "fishing:fish_raw",
|
||||||
|
chance = 5, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
--[[on_die = function(self)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
if math.random(1,7) == 2 then
|
||||||
|
minetest.env:add_entity(pos, "hyruletools:heart_entity")
|
||||||
|
end
|
||||||
|
minetest.env:add_entity(pos, "experience:orb")
|
||||||
|
end,]]
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 1,
|
||||||
|
light_damage = 0,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 19,
|
||||||
|
speed_run = 20,
|
||||||
|
normal_speed = 19,
|
||||||
|
run_speed = 20,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 28,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 28,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 28,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
mobs:register_egg("mobs_loz:seafish", "Sea Fish", "wool_orange.png", 1)
|
|
@ -1,11 +1,19 @@
|
||||||
|
|
||||||
--friendlies
|
--friendlies
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_loz:seafish",
|
||||||
|
nodes = {"default:water_source"},
|
||||||
|
min_light = 10,
|
||||||
|
chance = 15000,
|
||||||
|
min_height = -20,
|
||||||
|
day_toggle = true,
|
||||||
|
})
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_loz:zora_male",
|
name = "mobs_loz:zora_male",
|
||||||
nodes = {"default:water_source"},
|
nodes = {"default:water_source"},
|
||||||
min_light = 10,
|
min_light = 10,
|
||||||
chance = 15000,
|
chance = 15000,
|
||||||
min_height = 0,
|
min_height = -10,
|
||||||
day_toggle = true,
|
day_toggle = true,
|
||||||
})
|
})
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
|
@ -13,7 +21,7 @@ mobs:spawn({
|
||||||
nodes = {"default:water_source"},
|
nodes = {"default:water_source"},
|
||||||
min_light = 10,
|
min_light = 10,
|
||||||
chance = 15000,
|
chance = 15000,
|
||||||
min_height = 0,
|
min_height = -10,
|
||||||
day_toggle = true,
|
day_toggle = true,
|
||||||
})
|
})
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
|
@ -21,7 +29,7 @@ mobs:spawn({
|
||||||
nodes = {"default:water_source"},
|
nodes = {"default:water_source"},
|
||||||
min_light = 10,
|
min_light = 10,
|
||||||
chance = 15000,
|
chance = 15000,
|
||||||
min_height = 0,
|
min_height = -20,
|
||||||
day_toggle = true,
|
day_toggle = true,
|
||||||
})
|
})
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 211 B |
Binary file not shown.
After Width: | Height: | Size: 198 B |
Binary file not shown.
After Width: | Height: | Size: 199 B |
Binary file not shown.
After Width: | Height: | Size: 230 B |
|
@ -887,7 +887,7 @@ minetest.register_node("moreplants:coral2", {
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("moreplants:kelp", {
|
minetest.register_node("moreplants:kelp", {
|
||||||
description = "Kelp",
|
description = "Short Kelp",
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "kelp_3.obj",
|
mesh = "kelp_3.obj",
|
||||||
tiles = {{name = "moreplants_kelp.png",animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.00},}, "default_sand.png"},
|
tiles = {{name = "moreplants_kelp.png",animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.00},}, "default_sand.png"},
|
||||||
|
@ -925,7 +925,7 @@ minetest.register_node("moreplants:kelp2", {
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("moreplants:kelp3", {
|
minetest.register_node("moreplants:kelp3", {
|
||||||
description = "Kelp",
|
description = "Tall Kelp",
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "kelp_6.obj",
|
mesh = "kelp_6.obj",
|
||||||
tiles = {{name = "moreplants_kelp.png",animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.00},}, "default_sand.png"},
|
tiles = {{name = "moreplants_kelp.png",animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.00},}, "default_sand.png"},
|
||||||
|
|
Loading…
Reference in New Issue