diff --git a/minetest.conf b/minetest.conf index 34ddd53..cc9de99 100644 --- a/minetest.conf +++ b/minetest.conf @@ -8,6 +8,7 @@ tnt_radius = 3 enable_bed_respawn = true give_initial_stuff = true enable_weather = true +underwater_effects = true loz_mode = true enable_armour = true ARMOR_UPDATE_TIME = 1.5 diff --git a/mods/hyrule_weather/init.lua b/mods/hyrule_weather/init.lua index db15f3f..cb1d2d9 100644 --- a/mods/hyrule_weather/init.lua +++ b/mods/hyrule_weather/init.lua @@ -152,7 +152,11 @@ local apply_weather = function(player, pos, weather_type) elseif weather_type == "insects" then player:set_sky(nil, "regular", nil, true) 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) + end return end end @@ -168,6 +172,7 @@ minetest.register_on_joinplayer(function() end) local sound_ready = true +local underwater = false minetest.register_globalstep(function(dtime) if math.random(1,4) ~= 4 or hyrule_weather.weather == "twilight" then return end @@ -199,7 +204,7 @@ minetest.register_globalstep(function(dtime) end if pos.y <= -20 then display_weather = false end --apply weather effect - if display_weather then + if display_weather and not underwater then apply_weather(player, pos, hyrule_weather.weather) if sound_ready and hyrule_weather.weather ~= nil then local weather_name = hyrule_weather.weather @@ -213,6 +218,18 @@ minetest.register_globalstep(function(dtime) else apply_weather(player, pos, "none") 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) diff --git a/mods/hyruletools/init.lua b/mods/hyruletools/init.lua index 8c0c5be..b4c9c28 100644 --- a/mods/hyruletools/init.lua +++ b/mods/hyruletools/init.lua @@ -191,7 +191,7 @@ minetest.register_globalstep(function(dtime) --bubbles if math.random(1,10) == 1 then 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 minetest.add_particle({ pos = {x=water.x, y=water.y, z=water.z}, @@ -205,6 +205,20 @@ minetest.register_globalstep(function(dtime) texture = "bubble.png", 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 if player:get_wielded_item():get_name() == "hyruletools:sail" then diff --git a/mods/mobs_loz/init.lua b/mods/mobs_loz/init.lua index 3f1e8b9..d5afc56 100644 --- a/mods/mobs_loz/init.lua +++ b/mods/mobs_loz/init.lua @@ -34,6 +34,7 @@ dofile(path.."/gibido.lua") dofile(path.."/biri.lua") dofile(path.."/keese.lua") dofile(path.."/skulltula.lua") +dofile(path.."/seafish.lua") dofile(path.."/spawns.lua") end diff --git a/mods/mobs_loz/models/seafish.b3d b/mods/mobs_loz/models/seafish.b3d new file mode 100644 index 0000000..47f361d Binary files /dev/null and b/mods/mobs_loz/models/seafish.b3d differ diff --git a/mods/mobs_loz/seafish.lua b/mods/mobs_loz/seafish.lua new file mode 100644 index 0000000..e9834bc --- /dev/null +++ b/mods/mobs_loz/seafish.lua @@ -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) diff --git a/mods/mobs_loz/spawns.lua b/mods/mobs_loz/spawns.lua index 64f075d..7a6e12f 100644 --- a/mods/mobs_loz/spawns.lua +++ b/mods/mobs_loz/spawns.lua @@ -1,11 +1,19 @@ --friendlies +mobs:spawn({ + name = "mobs_loz:seafish", + nodes = {"default:water_source"}, + min_light = 10, + chance = 15000, + min_height = -20, + day_toggle = true, +}) mobs:spawn({ name = "mobs_loz:zora_male", nodes = {"default:water_source"}, min_light = 10, chance = 15000, - min_height = 0, + min_height = -10, day_toggle = true, }) mobs:spawn({ @@ -13,7 +21,7 @@ mobs:spawn({ nodes = {"default:water_source"}, min_light = 10, chance = 15000, - min_height = 0, + min_height = -10, day_toggle = true, }) mobs:spawn({ @@ -21,7 +29,7 @@ mobs:spawn({ nodes = {"default:water_source"}, min_light = 10, chance = 15000, - min_height = 0, + min_height = -20, day_toggle = true, }) mobs:spawn({ diff --git a/mods/mobs_loz/textures/mobs_seafish.png b/mods/mobs_loz/textures/mobs_seafish.png new file mode 100644 index 0000000..b6eab80 Binary files /dev/null and b/mods/mobs_loz/textures/mobs_seafish.png differ diff --git a/mods/mobs_loz/textures/mobs_seafish2.png b/mods/mobs_loz/textures/mobs_seafish2.png new file mode 100644 index 0000000..24038f2 Binary files /dev/null and b/mods/mobs_loz/textures/mobs_seafish2.png differ diff --git a/mods/mobs_loz/textures/mobs_seafish3.png b/mods/mobs_loz/textures/mobs_seafish3.png new file mode 100644 index 0000000..d6884f3 Binary files /dev/null and b/mods/mobs_loz/textures/mobs_seafish3.png differ diff --git a/mods/mobs_loz/textures/mobs_seafish4.png b/mods/mobs_loz/textures/mobs_seafish4.png new file mode 100644 index 0000000..0aa8ef7 Binary files /dev/null and b/mods/mobs_loz/textures/mobs_seafish4.png differ diff --git a/mods/moreplants/init.lua b/mods/moreplants/init.lua index 56e862e..4d3b864 100644 --- a/mods/moreplants/init.lua +++ b/mods/moreplants/init.lua @@ -887,7 +887,7 @@ minetest.register_node("moreplants:coral2", { }) minetest.register_node("moreplants:kelp", { - description = "Kelp", + description = "Short Kelp", drawtype = "mesh", 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"}, @@ -925,7 +925,7 @@ minetest.register_node("moreplants:kelp2", { }) minetest.register_node("moreplants:kelp3", { - description = "Kelp", + description = "Tall Kelp", drawtype = "mesh", 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"},