diff --git a/custom/mods/ambience/14init.lua b/custom/mods/ambience/14init.lua deleted file mode 100644 index 1f4acd6..0000000 --- a/custom/mods/ambience/14init.lua +++ /dev/null @@ -1,390 +0,0 @@ --------------------------------------------------------------------------------------------------------- ---Ambiance Configuration for version .14 - -local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000. - ---for frequencies below use a number between 0 and max_frequency_all ---for volumes below, use a number between 0.0 and 1, the larger the number the louder the sounds -local night_frequency = 20 --owls, wolves -local night_volume = 0.9 -local night_frequent_frequency = 150 --crickets -local night_frequent_volume = 0.9 -local day_frequency = 100 --crow, bluejay, cardinal -local day_volume = 0.9 -local day_frequent_frequency = 1000 --crow, bluejay, cardinal -local day_frequent_volume = 0.18 -local cave_frequency = 10 --bats -local cave_volume = 1.0 -local cave_frequent_frequency = 70 --drops of water dripping -local cave_frequent_volume = 1.0 -local water_frequent_frequency = 1000 --water sounds -local water_frequent_volume = 1.0 -local music_frequency = 7 --music (suggestion: keep this one low like around 6) -local music_volume = 0.3 ---End of Config ----------------------------------------------------------------------------------------------------- -local played_on_start = false -local night = { - handler = {}, - frequency = night_frequency, - {name="horned_owl", length=3, gain=night_volume}, - {name="Wolves_Howling", length=11, gain=night_volume}, - {name="ComboWind", length=17, gain=night_volume} -} - -local night_frequent = { - handler = {}, - frequency = night_frequent_frequency, - {name="Crickets_At_NightCombo", length=69, gain=night_frequent_volume} -} - -local day = { - handler = {}, - frequency = day_frequency, - {name="Best Cardinal Bird", length=4, gain=day_volume}, - {name="craw", length=3, gain=day_volume}, - {name="bluejay", length=18, gain=day_volume}, - {name="ComboWind", length=17, gain=day_volume} -} - -local day_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="robin2", length=16, gain=day_frequent_volume}, - {name="birdsongnl", length=13, gain=day_frequent_volume}, - {name="bird", length=30, gain=day_frequent_volume}, - {name="Best Cardinal Bird", length=4, gain=day_frequent_volume}, - {name="craw", length=3, gain=day_frequent_volume}, - {name="bluejay", length=18, gain=day_frequent_volume}, - {name="ComboWind", length=17, gain=day_frequent_volume*3} -} - - -local cave = { - handler = {}, - frequency = cave_frequency, - {name="Bats_in_Cave", length=5, gain=cave_volume} -} - -local cave_frequent = { - handler = {}, - frequency = cave_frequent_frequency, - {name="drippingwater_drip_a", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_b", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_c", length=2, gain=cave_frequent_volume}, - {name="Single_Water_Droplet", length=3, gain=cave_frequent_volume}, - {name="Spooky_Water_Drops", length=7, gain=cave_frequent_volume} -} - -local water = { - handler = {}, - frequency = 0,--dolphins dont fit into small lakes - {name="dolphins", length=6}, - {name="dolphins_screaming", length=16.5} -} - -local water_frequent = { - handler = {}, - frequency = water_frequent_frequency, - on_stop = "drowning_gasp", - on_start = "Splash", - {name="scuba1bubbles", length=11, gain=water_frequent_volume}, - {name="scuba1calm", length=10}, --not sure why but sometimes I get errors when setting gain=water_frequent_volume here. - {name="scuba1calm2", length=8.5, gain=water_frequent_volume}, - {name="scuba1interestingbubbles", length=11, gain=water_frequent_volume}, - {name="scuba1tubulentbubbles", length=10.5, gain=water_frequent_volume} -} - -local flowing_water = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=14, gain=.4} -} -local flowing_water2 = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=11, gain=.3} -} - -local lava = { - handler = {}, - frequency = 1000, - {name="earth01a", length=20} -} -local lava2 = { - handler = {}, - frequency = 1000, - {name="earth01a", length=15} -} - -local play_music = minetest.setting_getbool("music") or false -local music = { - handler = {}, - frequency = music_frequency, - {name="mtest", length=4*60+33, gain=music_volume}, - {name="echos", length=2*60+26, gain=music_volume}, - {name="FoamOfTheSea", length=1*60+50, gain=music_volume}, - {name="eastern_feeling", length=3*60+51, gain=music_volume}, - {name="Mass_Effect_Uncharted_Worlds", length=2*60+29, gain=music_volume}, - {name="dark_ambiance", length=44, gain=music_volume} -} - -local is_daytime = function() - return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8) -end - ---[[old -local nodes_in_range = function(pos, search_distance, node_name) - local search_p = {x=0, y=0, z=0} - local nodes_found = 0 - for p_x=(pos.x-search_distance), (pos.x+search_distance) do - for p_y=(pos.y-search_distance), (pos.y+search_distance) do - for p_z=(pos.z-search_distance), (pos.z+search_distance) do - local search_n = minetest.env:get_node({x=p_x, y=p_y, z=p_z}) - if search_n.name == node_name then - nodes_found = nodes_found + 1 - end - end - end - end - return nodes_found - --minetest.chat_send_all("Range: " .. tostring(search_distance) .. " | Found (" .. node_name .. ": " .. nodes_found .. ")") -end --]] - -local nodes_in_range = function(pos, search_distance, node_name) - minp = {x=pos.x-search_distance,y=pos.y-search_distance, z=pos.z-search_distance} - maxp = {x=pos.x+search_distance,y=pos.y+search_distance, z=pos.z+search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - - -local get_ambience = function(player) - local pos = player:getpos() - pos.y = pos.y+1.0 - local nodename = minetest.env:get_node(pos).name - if string.find(nodename, "default:water") then - if music then - return {water=water, water_frequent=water_frequent, music=music} - else - return {water=water, water_frequent=water_frequent} - end - end - if nodes_in_range(pos, 7, "default:lava_flowing")>5 or nodes_in_range(pos, 7, "default:lava_source")>5 then - if music then - return {lava=lava, lava2=lava2, music=music} - else - return {lava=lava} - end - end - if nodes_in_range(pos, 7, "default:water_flowing")>5 then - if music then - return {flowing_water=flowing_water, flowing_water2=flowing_water2, music=music} - else - return {flowing_water=flowing_water, flowing_water2=flowing_water2} - end - end - if player:getpos().y < 0 then - if music then - return {cave=cave, cave_frequent=cave_frequent, music=music} - else - return {cave=cave, cave_frequent=cave_frequent} - end - end - if is_daytime() then - if music then - return {day=day, day_frequent=day_frequent, music=music} - else - return {day=day, day_frequent=day_frequent} - end - else - if music then - return {night=night, night_frequent=night_frequent, music=music} - else - return {night=night, night_frequent=night_frequent} - end - end -end - --- start playing the sound, set the handler and delete the handler after sound is played -local play_sound = function(player, list, number) - local player_name = player:get_player_name() - if list.handler[player_name] == nil then - local gain = 1.0 - if list[number].gain ~= nil then - gain = list[number].gain - end - local handler = minetest.sound_play(list[number].name, {to_player=player_name, gain=gain}) - if handler ~= nil then - list.handler[player_name] = handler - minetest.after(list[number].length, function(args) - local list = args[1] - local player_name = args[2] - if list.handler[player_name] ~= nil then - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end, {list, player_name}) - end - end -end - --- stops all sounds that are not in still_playing -local stop_sound = function(still_playing, player) - local player_name = player:get_player_name() - if still_playing.cave == nil then - local list = cave - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.cave_frequent == nil then - local list = cave_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night == nil then - local list = night - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night_frequent == nil then - local list = night_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day == nil then - local list = day - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day_frequent == nil then - local list = day_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.music == nil then - local list = music - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water == nil then - local list = flowing_water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water2 == nil then - local list = flowing_water2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava == nil then - local list = lava - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava2 == nil then - local list = lava2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water == nil then - local list = water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_frequent == nil then - local list = water_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end -end - -local timer = 0 -minetest.register_globalstep(function(dtime) - timer = timer+dtime - if timer < 1 then - return - end - timer = 0 - - for _,player in ipairs(minetest.get_connected_players()) do - local ambiences = get_ambience(player) - stop_sound(ambiences, player) - for _,ambience in pairs(ambiences) do - if math.random(1, 1000) <= ambience.frequency then - if ambience.on_start ~= nil and played_on_start == false then - played_on_start = true - minetest.sound_play(ambience.on_start, {to_player=player:get_player_name()}) - end - play_sound(player, ambience, math.random(1, #ambience)) - end - end - end -end) \ No newline at end of file diff --git a/custom/mods/ambience/Badinit.lua b/custom/mods/ambience/Badinit.lua deleted file mode 100644 index ba85193..0000000 --- a/custom/mods/ambience/Badinit.lua +++ /dev/null @@ -1,439 +0,0 @@ --------------------------------------------------------------------------------------------------------- ---Ambiance Configuration for version .16 - -local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000. - ---for frequencies below use a number between 0 and max_frequency_all ---for volumes below, use a number between 0.0 and 1, the larger the number the louder the sounds -local night_frequency = 20 --owls, wolves -local night_volume = 0.9 -local night_frequent_frequency = 150 --crickets -local night_frequent_volume = 0.9 -local day_frequency = 100 --crow, bluejay, cardinal -local day_volume = 0.9 -local day_frequent_frequency = 1000 --crow, bluejay, cardinal -local day_frequent_volume = 0.18 -local cave_frequency = 10 --bats -local cave_volume = 1.0 -local cave_frequent_frequency = 70 --drops of water dripping -local cave_frequent_volume = 1.0 -local beach_frequency = 20 --seagulls -local beach_volume = 1.0 -local beach_frequent_frequency = 1000 --waves -local beach_frequent_volume = 1.0 -local water_frequent_frequency = 1000 --water sounds -local water_frequent_volume = 1.0 -local music_frequency = 7 --music (suggestion: keep this one low like around 6) -local music_volume = 0.3 ---End of Config ----------------------------------------------------------------------------------------------------- -local played_on_start = false -local night = { - handler = {}, - frequency = night_frequency, - {name="horned_owl", length=3, gain=night_volume}, - {name="Wolves_Howling", length=11, gain=night_volume}, - {name="ComboWind", length=17, gain=night_volume} -} - -local night_frequent = { - handler = {}, - frequency = night_frequent_frequency, - {name="Crickets_At_NightCombo", length=69, gain=night_frequent_volume} -} - -local day = { - handler = {}, - frequency = day_frequency, - {name="Best Cardinal Bird", length=4, gain=day_volume}, - {name="craw", length=3, gain=day_volume}, - {name="bluejay", length=18, gain=day_volume}, - {name="ComboWind", length=17, gain=day_volume} -} - -local day_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="robin2", length=16, gain=day_frequent_volume}, - {name="birdsongnl", length=13, gain=day_frequent_volume}, - {name="bird", length=30, gain=day_frequent_volume}, - {name="Best Cardinal Bird", length=4, gain=day_frequent_volume}, - {name="craw", length=3, gain=day_frequent_volume}, - {name="bluejay", length=18, gain=day_frequent_volume}, - {name="ComboWind", length=17, gain=day_frequent_volume*3} -} - - -local cave = { - handler = {}, - frequency = cave_frequency, - {name="Bats_in_Cave", length=5, gain=cave_volume} -} - -local cave_frequent = { - handler = {}, - frequency = cave_frequent_frequency, - {name="drippingwater_drip_a", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_b", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_c", length=2, gain=cave_frequent_volume}, - {name="Single_Water_Droplet", length=3, gain=cave_frequent_volume}, - {name="Spooky_Water_Drops", length=7, gain=cave_frequent_volume} -} - -local beach = { - handler = {}, - frequency = beach_frequency, - {name="seagull", length=4.5, gain=beach_volume} -} - -local beach_frequent = { - handler = {}, - frequency = beach_frequent_frequency, - {name="fiji_beach", length=43.5, gain=beach_frequent_volume} -} - - -local water = { - handler = {}, - frequency = 0,--dolphins dont fit into small lakes - {name="dolphins", length=6}, - {name="dolphins_screaming", length=16.5} -} - -local water_frequent = { - handler = {}, - frequency = water_frequent_frequency, - on_stop = "drowning_gasp", - on_start = "Splash", - {name="scuba1bubbles", length=11, gain=water_frequent_volume}, - {name="scuba1calm", length=10}, --not sure why but sometimes I get errors when setting gain=water_frequent_volume here. - {name="scuba1calm2", length=8.5, gain=water_frequent_volume}, - {name="scuba1interestingbubbles", length=11, gain=water_frequent_volume}, - {name="scuba1tubulentbubbles", length=10.5, gain=water_frequent_volume} -} - -local flowing_water = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=14, gain=.4} -} -local flowing_water2 = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=11, gain=.3} -} - -local lava = { - handler = {}, - frequency = 1000, - {name="earth01a", length=20} -} -local lava2 = { - handler = {}, - frequency = 1000, - {name="earth01a", length=15} -} - - -local play_music = minetest.setting_getbool("music") or false -local music = { - handler = {}, - frequency = music_frequency, - {name="mtest", length=4*60+33, gain=music_volume}, - {name="echos", length=2*60+26, gain=music_volume}, - {name="FoamOfTheSea", length=1*60+50, gain=music_volume}, - {name="eastern_feeling", length=3*60+51, gain=music_volume}, - {name="Mass_Effect_Uncharted_Worlds", length=2*60+29, gain=music_volume}, - {name="dark_ambiance", length=44, gain=music_volume} -} - -local is_daytime = function() - return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8) -end - ---[[old -local nodes_in_range = function(pos, search_distance, node_name) - local search_p = {x=0, y=0, z=0} - local nodes_found = 0 - for p_x=(pos.x-search_distance), (pos.x+search_distance) do - for p_y=(pos.y-search_distance), (pos.y+search_distance) do - for p_z=(pos.z-search_distance), (pos.z+search_distance) do - local search_n = minetest.env:get_node({x=p_x, y=p_y, z=p_z}) - if search_n.name == node_name then - nodes_found = nodes_found + 1 - end - end - end - end - return nodes_found - --minetest.chat_send_all("Range: " .. tostring(search_distance) .. " | Found (" .. node_name .. ": " .. nodes_found .. ")") -end --]] - -local nodes_in_range = function(pos, search_distance, node_name) - minp = {x=pos.x-search_distance,y=pos.y-search_distance, z=pos.z-search_distance} - maxp = {x=pos.x+search_distance,y=pos.y+search_distance, z=pos.z+search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - - -local get_ambience = function(player) - local pos = player:getpos() - pos.y = pos.y+1.0 - local nodename = minetest.env:get_node(pos).name - if string.find(nodename, "default:water") then - if music then - return {water=water, water_frequent=water_frequent, music=music} - else - return {water=water, water_frequent=water_frequent} - end - end - if nodes_in_range(pos, 7, "default:lava_flowing")>5 or nodes_in_range(pos, 7, "default:lava_source")>5 then - if music then - return {lava=lava, lava2=lava2, music=music} - else - return {lava=lava} - end - end - if nodes_in_range(pos, 7, "default:water_flowing")>5 then - if music then - return {flowing_water=flowing_water, flowing_water2=flowing_water2, music=music} - else - return {flowing_water=flowing_water, flowing_water2=flowing_water2} - end - end - pos.y = pos.y-2 - nodename = minetest.env:get_node(pos).name - --minetest.chat_send_all("Found " .. nodename .. pos.y ) - if string.find(nodename, "default:sand") and pos.y < 5 then - if music then - return {beach=beach, beach_frequent=beach_frequent, music=music} - else - return {beach=beach, beach_frequent=beach_frequent} - end - end - if player:getpos().y < 0 then - if music then - return {cave=cave, cave_frequent=cave_frequent, music=music} - else - return {cave=cave, cave_frequent=cave_frequent} - end - end - if is_daytime() then - if music then - return {day=day, day_frequent=day_frequent, music=music} - else - return {day=day, day_frequent=day_frequent} - end - else - if music then - return {night=night, night_frequent=night_frequent, music=music} - else - return {night=night, night_frequent=night_frequent} - end - end -end - --- start playing the sound, set the handler and delete the handler after sound is played -local play_sound = function(player, list, number) - local player_name = player:get_player_name() - if list.handler[player_name] == nil then - local gain = 1.0 - if list[number].gain ~= nil then - gain = list[number].gain - end - local handler = minetest.sound_play(list[number].name, {to_player=player_name, gain=gain}) - if handler ~= nil then - list.handler[player_name] = handler - minetest.after(list[number].length, function(args) - local list = args[1] - local player_name = args[2] - if list.handler[player_name] ~= nil then - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end, {list, player_name}) - end - end -end - --- stops all sounds that are not in still_playing -local stop_sound = function(still_playing, player) - local player_name = player:get_player_name() - if still_playing.cave == nil then - local list = cave - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.cave_frequent == nil then - local list = cave_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach == nil then - local list = beach - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach_frequent == nil then - local list = beach_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - - if still_playing.night == nil then - local list = night - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night_frequent == nil then - local list = night_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day == nil then - local list = day - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day_frequent == nil then - local list = day_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.music == nil then - local list = music - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water == nil then - local list = flowing_water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water2 == nil then - local list = flowing_water2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava == nil then - local list = lava - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava2 == nil then - local list = lava2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water == nil then - local list = water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_frequent == nil then - local list = water_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end -end - -local timer = 0 -minetest.register_globalstep(function(dtime) - timer = timer+dtime - if timer < 1 then - return - end - timer = 0 - - for _,player in ipairs(minetest.get_connected_players()) do - local ambiences = get_ambience(player) - stop_sound(ambiences, player) - for _,ambience in pairs(ambiences) do - if math.random(1, 1000) <= ambience.frequency then - if ambience.on_start ~= nil and played_on_start == false then - played_on_start = true - minetest.sound_play(ambience.on_start, {to_player=player:get_player_name()}) - end - play_sound(player, ambience, math.random(1, #ambience)) - end - end - end -end) \ No newline at end of file diff --git a/custom/mods/ambience/depends.txt b/custom/mods/ambience/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/custom/mods/ambience/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/custom/mods/ambience/init.lua b/custom/mods/ambience/init.lua deleted file mode 100644 index 1d64289..0000000 --- a/custom/mods/ambience/init.lua +++ /dev/null @@ -1,690 +0,0 @@ --------------------------------------------------------------------------------------------------------- ---Ambience Configuration for version .34 ---Added Faraway & Ethereal by Amethystium - ---Working on: ---removing magic leap when not enough air under feet. - - ---find out why wind stops while flying ---add an extra node near feet to handle treading water as a special case, and don't have to use node under feet. which gets - --invoked when staning on a ledge near water. ---reduce redundant code (stopplay and add ambience to list) - -local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000. - ---for frequencies below use a number between 0 and max_frequency_all ---for volumes below, use a number between 0.0 and 1, the larger the number the louder the sounds -local night_frequency = 20 --owls, wolves -local night_volume = 0.9 -local night_frequent_frequency = 150 --crickets -local night_frequent_volume = 0.9 -local day_frequency = 80 --crow, bluejay, cardinal -local day_volume = 0.9 -local day_frequent_frequency = 250 --crow, bluejay, cardinal -local day_frequent_volume = 0.18 -local cave_frequency = 10 --bats -local cave_volume = 1.0 -local cave_frequent_frequency = 70 --drops of water dripping -local cave_frequent_volume = 1.0 -local beach_frequency = 20 --seagulls -local beach_volume = 1.0 -local beach_frequent_frequency = 1000 --waves -local beach_frequent_volume = 1.0 -local water_frequent_frequency = 1000 --water sounds -local water_frequent_volume = 1.0 -local desert_frequency = 20 --coyote -local desert_volume = 1.0 -local desert_frequent_frequency = 700 --desertwind -local desert_frequent_volume = 1.0 -local swimming_frequent_frequency = 1000 --swimming splashes -local swimming_frequent_volume = 1.0 -local water_surface_volume = 1.0 -- sloshing water -local lava_volume = 1.0 --lava -local flowing_water_volume = .4 --waterfall -local splashing_water_volume = 1 -local music_frequency = 7 --music (suggestion: keep this one low like around 6) -local music_volume = 0.3 - ---End of Config ----------------------------------------------------------------------------------------------------- -local ambiences -local counter=0--***************** -local SOUNDVOLUME = 1 -local MUSICVOLUME = 1 -local sound_vol = 1 -local volume = {} -local last_x_pos = 0 -local last_y_pos = 0 -local last_z_pos = 0 -local node_under_feet -local node_at_upper_body -local node_at_lower_body -local node_3_under_feet -local played_on_start = false -local world_path = minetest.get_worldpath() - -local function load_volumes() - local file, err = io.open(world_path.."/ambience_volumes", "r") - if err then - return - end - for line in file:lines() do - local config_line = string.split(line, ":") - volume[config_line[1]] = {music=config_line[2],sound=config_line[3]} - end - file:close() -end - -load_volumes() - -local night = { - handler = {}, - frequency = night_frequency, - {name="horned_owl", length=3, gain=night_volume}, - {name="Wolves_Howling", length=11, gain=night_volume}, - {name="ComboWind", length=17, gain=night_volume}, - {name="deer", length=8, gain=night_volume*2}, - {name="frog", length=1, gain=night_volume} -} - -local night_frequent = { - handler = {}, - frequency = night_frequent_frequency, - {name="Crickets_At_NightCombo", length=69, gain=night_frequent_volume} -} - -local day = { - handler = {}, - frequency = day_frequency, - {name="Best Cardinal Bird", length=4, gain=day_volume}, - {name="craw", length=3, gain=day_volume}, - {name="bluejay", length=7, gain=day_volume}, - {name="ComboWind", length=17, gain=day_volume}, - {name="canadianloon2", length=15, gain=day_volume-0.7}, - {name="peacock", length=3, gain=day_volume} -} - -local day_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="robin2", length=16, gain=day_frequent_volume}, - {name="birdsongnl", length=13, gain=day_frequent_volume}, - {name="bird", length=30, gain=day_frequent_volume}, - {name="Best Cardinal Bird", length=4, gain=day_frequent_volume}, - {name="craw", length=3, gain=day_frequent_volume}, - {name="bluejay", length=7, gain=day_frequent_volume}, - {name="ComboWind", length=17, gain=day_frequent_volume*3} -} -local swimming_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="water_swimming_splashing_breath", length=11.5, gain=swimming_frequent_volume}, - {name="water_swimming_splashing", length=9, gain=swimming_frequent_volume} -} - -local cave = { - handler = {}, - frequency = cave_frequency, - {name="Bats_in_Cave", length=5, gain=cave_volume*0.5} -} - -local cave_frequent = { - handler = {}, - frequency = cave_frequent_frequency, - {name="drippingwater_drip_a", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_b", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_c", length=2, gain=cave_frequent_volume}, - {name="Single_Water_Droplet", length=3, gain=cave_frequent_volume}, - {name="Spooky_Water_Drops", length=7, gain=cave_frequent_volume} -} - -local beach = { - handler = {}, - frequency = beach_frequency, - {name="seagull", length=4.5, gain=beach_volume}, - {name="gull", length=2, gain=beach_volume} -} - -local beach_frequent = { - handler = {}, - frequency = beach_frequent_frequency, - {name="fiji_beach", length=43.5, gain=beach_frequent_volume} -} - -local desert = { - handler = {}, - frequency = desert_frequency, - {name="coyote2", length=2.5, gain=desert_volume}, - {name="RattleSnake", length=8, gain=desert_volume} -} - -local desert_frequent = { - handler = {}, - frequency = desert_frequent_frequency, - {name="DesertMonolithMed", length=34.5, gain=desert_frequent_volume} -} - -local flying = { - handler = {}, - frequency = 1000, - on_start = "nothing_yet", - on_stop = "nothing_yet", - {name="ComboWind", length=17, gain=1} -} - -local water = { - handler = {}, - frequency = 0,--dolphins dont fit into small lakes - {name="dolphins", length=6, gain=1}, - {name="dolphins_screaming", length=16.5, gain=1} -} - -local water_frequent = { - handler = {}, - frequency = water_frequent_frequency, - on_stop = "drowning_gasp", - --on_start = "Splash", - {name="scuba1bubbles", length=11, gain=water_frequent_volume}, - {name="scuba1calm", length=10, gain=water_frequent_volume}, --not sure why but sometimes I get errors when setting gain=water_frequent_volume here. - {name="scuba1calm2", length=8.5, gain=water_frequent_volume}, - {name="scuba1interestingbubbles", length=11, gain=water_frequent_volume}, - {name="scuba1tubulentbubbles", length=10.5, gain=water_frequent_volume} -} - -local water_surface = { - handler = {}, - frequency = 1000, - on_stop = "Splash", - on_start = "Splash", - {name="lake_waves_2_calm", length=9.5, gain=water_surface_volume}, - {name="lake_waves_2_variety", length=13.1, gain=water_surface_volume} -} -local splashing_water = { - handler = {}, - frequency = 1000, - {name="Splash", length=1.22, gain=splashing_water_volume} -} - -local flowing_water = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=14, gain=flowing_water_volume} -} -local flowing_water2 = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=11, gain=flowing_water_volume} -} - -local lava = { - handler = {}, - frequency = 1000, - {name="earth01a", length=20, gain=lava_volume} -} -local lava2 = { - handler = {}, - frequency = 1000, - {name="earth01a", length=15, gain=lava_volume} -} - - -local play_music = minetest.setting_getbool("music") or false -local music = { - handler = {}, - frequency = music_frequency, - is_music=true, - {name="StrangelyBeautifulShort", length=3*60+.5, gain=music_volume*.7}, - {name="AvalonShort", length=2*60+58, gain=music_volume*1.4}, - --{name="mtest", length=4*60+33, gain=music_volume}, - --{name="echos", length=2*60+26, gain=music_volume}, - --{name="FoamOfTheSea", length=1*60+50, gain=music_volume}, - {name="eastern_feeling", length=3*60+51, gain=music_volume}, - --{name="Mass_Effect_Uncharted_Worlds", length=2*60+29, gain=music_volume}, - {name="EtherealShort", length=3*60+4, gain=music_volume*.7}, - {name="FarawayShort", length=3*60+5, gain=music_volume*.7}, - {name="dark_ambiance", length=44, gain=music_volume}, - {name="Ambivalent", length=2*60+31, gain=music_volume*1.4}, - {name="anonnp4014", length=2*60+31, gain=music_volume*1.6}, - {name="bensound_deepblue", length=4*60+49, gain=music_volume}, - {name="bensound_ofeliasdream", length=4*60+59, gain=music_volume}, - {name="bensound_slowmotion", length=3*60+27, gain=music_volume}, - {name="rainymemory", length=2*60+8, gain=music_volume} -} - -local ambienceList = { - night=night, - night_frequent=night_frequent, - day=day, - day_frequent=day_frequent, - swimming_frequent=swimming_frequent, - cave=cave, - cave_frequent=cave_frequent, - beach=beach, - beach_frequent=beach_frequent, - desert=desert, - desert_frequent=desert_frequent, - flying=flying, - water=water, - water_frequent=water_frequent, - water_surface=water_surface, - splashing_water=splashing_water, - flowing_water=flowing_water, - flowing_water2=flowing_water2, - lava=lava, - lava2=lava2, - music=music, -} - -local is_daytime = function() - return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8) -end - -local nodes_in_range = function(pos, search_distance, node_name) - local minp = {x=pos.x-search_distance,y=pos.y-search_distance, z=pos.z-search_distance} - local maxp = {x=pos.x+search_distance,y=pos.y+search_distance, z=pos.z+search_distance} - local nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) - --minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - -local nodes_in_coords = function(minp, maxp, node_name) - local nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) - --minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - -local atleast_nodes_in_grid = function(pos, search_distance, height, node_name, threshold) - local counter = counter +1 --- minetest.chat_send_all("counter: (" .. counter .. ")") - local minp = {x=pos.x-search_distance,y=height, z=pos.z+20} - local maxp = {x=pos.x+search_distance,y=height, z=pos.z+20} - local nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("z+Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - local totalnodes = #nodes - minp = {x=pos.x-search_distance,y=height, z=pos.z-20} - maxp = {x=pos.x+search_distance,y=height, z=pos.z-20} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("z-Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - totalnodes = totalnodes + #nodes - maxp = {x=pos.x+20,y=height, z=pos.z+search_distance} - minp = {x=pos.x+20,y=height, z=pos.z-search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("x+Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - totalnodes = totalnodes + #nodes - maxp = {x=pos.x-20,y=height, z=pos.z+search_distance} - minp = {x=pos.x-20,y=height, z=pos.z-search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("x+Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - totalnodes = totalnodes + #nodes --- minetest.chat_send_all("Found total(" .. totalnodes .. ")") - if totalnodes >= threshold*2 then - return true - end - return false -end - -local get_immediate_nodes = function(pos) - pos.y = pos.y-1 - node_under_feet = minetest.env:get_node(pos).name - pos.y = pos.y-3 - node_3_under_feet = minetest.env:get_node(pos).name - pos.y = pos.y+3 - pos.y = pos.y+2.2 - node_at_upper_body = minetest.env:get_node(pos).name - pos.y = pos.y-1.19 - node_at_lower_body = minetest.env:get_node(pos).name - pos.y = pos.y+0.99 - --minetest.chat_send_all("node_under_feet(" .. nodename .. ")") -end - - -local get_ambience = function(player) - local player_is_climbing = false - local player_is_descending = false - local player_is_moving_horiz = false - local standing_in_water = false - local pos = player:getpos() - get_immediate_nodes(pos) - - if last_x_pos ~=pos.x or last_z_pos ~=pos.z then - player_is_moving_horiz = true - end - if pos.y > last_y_pos+.5 then - player_is_climbing = true - end - if pos.y < last_y_pos-.5 then - player_is_descending = true - end - - last_x_pos =pos.x - last_z_pos =pos.z - last_y_pos =pos.y - - if string.find(node_at_upper_body, "default:water") then - if music then - return {water=water, water_frequent=water_frequent, music=music} - else - return {water=water, water_frequent=water_frequent} - end - elseif node_at_upper_body == "air" then - if string.find(node_at_lower_body, "default:water") or string.find(node_under_feet, "default:water") then - --minetest.chat_send_all("bottom counted as water") - --we found air at upperbody, and water at lower body. Now there are 4 possibilities: - --Key: under feet, moving or not - --swimming w, m swimming - --walking in water nw, m splashing - --treading water w, nm sloshing - --standing in water nw, nm beach trumps, then sloshing - if player_is_moving_horiz then - if string.find(node_under_feet, "default:water") then - if music then - return {swimming_frequent=swimming_frequent, music=music} - else - return {swimming_frequent} - end - else --didn't find water under feet: walking in water - if music then - return {splashing_water=splashing_water, music=music} - else - return {splashing_water} - end - end - else--player is not moving: treading water - if string.find(node_under_feet, "default:water") then - if music then - return {water_surface=water_surface, music=music} - else - return {water_surface} - end - else --didn't find water under feet - standing_in_water = true - end - end - end - end --- minetest.chat_send_all("----------") --- if not player_is_moving_horiz then --- minetest.chat_send_all("not moving horiz") --- else --- minetest.chat_send_all("moving horiz") --- end --- minetest.chat_send_all("nub:" ..node_at_upper_body) --- minetest.chat_send_all("nlb:" ..node_at_lower_body) --- minetest.chat_send_all("nuf:" ..node_under_feet) --- minetest.chat_send_all("----------") - - --- if player_is_moving_horiz then --- minetest.chat_send_all("playermoving") --- end --- if player_is_climbing then --- minetest.chat_send_all("player Climbing") --- end --- minetest.chat_send_all("nub:" ..node_at_upper_body) --- minetest.chat_send_all("nlb:" ..node_at_lower_body) --- minetest.chat_send_all("nuf:" ..node_under_feet) --- minetest.chat_send_all("n3uf:" ..node_3_under_feet) --- - --local air_or_ignore = {air=true,ignore=true} --- minp = {x=pos.x-3,y=pos.y-4, z=pos.z-3} --- maxp = {x=pos.x+3,y=pos.y-1, z=pos.z+3} - --local air_under_player = nodes_in_coords(minp, maxp, "air") - --local ignore_under_player = nodes_in_coords(minp, maxp, "ignore") - --local air_plus_ignore_under = air_under_player + ignore_under_player --- minetest.chat_send_all("airUnder:" ..air_under_player) --- minetest.chat_send_all("ignoreUnder:" ..ignore_under_player) --- minetest.chat_send_all("a+i:" ..air_plus_ignore_under) --- minetest.chat_send_all("counter: (" .. counter .. "-----------------)") - --minetest.chat_send_all(air_or_ignore[node_under_feet]) --- if (player_is_moving_horiz or player_is_climbing) and air_or_ignore[node_at_upper_body] and air_or_ignore[node_at_lower_body] --- and air_or_ignore[node_under_feet] and air_plus_ignore_under == 196 and not player_is_descending then - --minetest.chat_send_all("flying!!!!") - -- if music then - -- return {flying=flying, music=music} - -- else - --- return {flying} --- end --- end - --minetest.chat_send_all("not flying!!!!") - - if nodes_in_range(pos, 7, "default:lava_flowing")>5 or nodes_in_range(pos, 7, "default:lava_source")>5 then - if music then - return {lava=lava, lava2=lava2, music=music} - else - return {lava=lava} - end - end - if nodes_in_range(pos, 6, "default:water_flowing")>45 then - if music then - return {flowing_water=flowing_water, flowing_water2=flowing_water2, music=music} - else - return {flowing_water=flowing_water, flowing_water2=flowing_water2} - end - end - - ---if we are near sea level and there is lots of water around the area - if pos.y < 7 and pos.y >0 and atleast_nodes_in_grid(pos, 60, 1, "default:water_source", 51 ) then - if music then - return {beach=beach, beach_frequent=beach_frequent, music=music} - else - return {beach=beach, beach_frequent=beach_frequent} - end - end - if standing_in_water then - if music then - return {water_surface=water_surface, music=music} - else - return {water_surface} - end - end - - - local desert_in_range = (nodes_in_range(pos, 6, "default:desert_sand")+nodes_in_range(pos, 6, "default:desert_stone")) - --minetest.chat_send_all("desertcount: " .. desert_in_range .. ",".. pos.y ) - if desert_in_range >250 then - if music then - return {desert=desert, desert_frequent=desert_frequent, music=music} - else - return {desert=desert, desert_frequent=desert_frequent} - end - end - --- pos.y = pos.y-2 --- nodename = minetest.env:get_node(pos).name --- minetest.chat_send_all("Found " .. nodename .. pos.y ) - - - if player:getpos().y < 0 then - if music then - return {cave=cave, cave_frequent=cave_frequent, music=music} - else - return {cave=cave, cave_frequent=cave_frequent} - end - end - if is_daytime() then - if music then - return {day=day, day_frequent=day_frequent, music=music} - else - return {day=day, day_frequent=day_frequent} - end - else - if music then - return {night=night, night_frequent=night_frequent, music=music} - else - return {night=night, night_frequent=night_frequent} - end - end -end - --- start playing the sound, set the handler and delete the handler after sound is played -local play_sound = function(player, list, number, is_music) - local player_name = player:get_player_name() - if list.handler[player_name] == nil then - local gain = 1.0 - if list[number].gain ~= nil then - if is_music then - gain = list[number].gain*volume[player_name].music - --minetest.chat_send_all("gain music: " .. gain ) - else - gain = list[number].gain*volume[player_name].sound - --minetest.chat_send_all("gain sound: " .. gain ) - end - end - local handler = minetest.sound_play(list[number].name, {to_player=player_name, gain=gain}) - if handler ~= nil then - list.handler[player_name] = handler - minetest.after(list[number].length, function(args) - local list = args[1] - local player_name = args[2] - if list.handler[player_name] ~= nil then - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end, {list, player_name}) - end - end -end - --- stops all sounds that are not in still_playing -local stop_sound = function(still_playing, player) - local player_name = player:get_player_name() - for key,value in pairs(ambienceList) do - if still_playing[key] == nil then - if value.handler[player_name] ~= nil then - if value.on_stop ~= nil then - minetest.sound_play(value.on_stop, {to_player=player_name,gain=volume[player_name].sound}) - end - minetest.sound_stop(value.handler[player_name]) - value.handler[player_name] = nil - end - end - end -end - -local timer = 0 -minetest.register_globalstep(function(dtime) - timer = timer+dtime - if timer < 1 then - return - end - timer = 0 - - for _,player in ipairs(minetest.get_connected_players()) do - ambiences = get_ambience(player) - stop_sound(ambiences, player) - for _,ambience in pairs(ambiences) do - if math.random(1, 1000) <= ambience.frequency then --- if(played_on_start) then --- -- minetest.chat_send_all("playedOnStart " ) --- else --- -- minetest.chat_send_all("FALSEplayedOnStart " ) --- end - if ambience.on_start ~= nil and played_on_start == false then - played_on_start = true - minetest.sound_play(ambience.on_start, {to_player=player:get_player_name(),gain=SOUNDVOLUME}) - end - -- minetest.chat_send_all("ambience: " ..ambience ) - -- if ambience.on_start ~= nil and played_on_start_flying == false then - -- played_on_start_flying = true - -- minetest.sound_play(ambience.on_start, {to_player=player:get_player_name()}) - -- end - local is_music =false - if ambience.is_music ~= nil then - is_music = true - end - play_sound(player, ambience, math.random(1, #ambience),is_music) - end - end - end -end) - -minetest.register_on_joinplayer( - function(player) - if volume[player:get_player_name()] == nil then - volume[player:get_player_name()] = {music=MUSICVOLUME, sound=SOUNDVOLUME} - end - end) - -minetest.register_chatcommand( - "volume", - { - description = "View sliders to set sound a music volume", - func = function(name,param) - minetest.show_formspec( - name, - "ambience:volume", - "size[6,3.5]" .. - "label[0,0.5;Music]" .. - "scrollbar[0,1;5.8,0.4;horizontal;music;" .. volume[name].music * 1000 .. "]" .. - "label[0,1.5;Sound]" .. - "scrollbar[0,2;5.8,0.4;horizontal;sound;" .. volume[name].sound * 1000 .. "]" .. - "button_exit[2,2.8;2,0.8;quit;Done]" - ) - end, - }) - -minetest.register_on_player_receive_fields( - function(player, formname, fields) - if formname ~= "ambience:volume" then - return false - end - minetest.log(dump(fields)) - if fields.quit ~= "true" then - volume[player:get_player_name()].music = tonumber(string.split(fields.music,":")[2]) / 1000 - volume[player:get_player_name()].sound = tonumber(string.split(fields.sound,":")[2]) / 1000 - end - if fields.quit then - local file, err = io.open(world_path.."/ambience_volumes", "w") - if not err then - for item in pairs(volume) do - file:write(item..":"..volume[item].music..":"..volume[item].sound.."\n") - end - file:close() - end - end - return true - end) - -minetest.register_chatcommand( - "svol", - { - params = "", - description = "set volume of sounds, default 1 normal volume.", - privs = {server=true}, - func = function(name, param) - SOUNDVOLUME = param - -- local player = minetest.env:get_player_by_name(name) - -- ambiences = get_ambience(player) - -- stop_sound({}, player) - minetest.chat_send_player(name, "Sound volume set.") - end, - }) - -minetest.register_chatcommand( - "mvol", - { - params = "", - description = "set volume of music, default 1 normal volume.", - privs = {server=true}, - func = function(name, param) - MUSICVOLUME = param - -- local player = minetest.env:get_player_by_name(name) - -- stop_sound({}, player) - -- ambiences = get_ambience(player) - minetest.chat_send_player(name, "Music volume set.") - end, - }) diff --git a/custom/mods/ambience/init.lua.pilz.lua b/custom/mods/ambience/init.lua.pilz.lua deleted file mode 100644 index b1d1796..0000000 --- a/custom/mods/ambience/init.lua.pilz.lua +++ /dev/null @@ -1,287 +0,0 @@ -local night = { - handler = {}, - frequency = 10, - {name="horned_owl", length=3}, - {name="Wolves_Howling", length=11}, - {name="ComboWind", length=17}, -} - -local night_frequent = { - handler = {}, - frequency = 25, - {name="Crickets_At_NightCombo", length=69}, -} - -local day = { - handler = {}, - frequency = 5, - {name="Best Cardinal Bird", length=4}, - {name="craw", length=3}, - {name="bluejay", length=18}, - {name="ComboWind", length=17}, -} - -local day_frequent = { - handler = {}, - frequency = 25, - {name="robin2", length=16}, - {name="birdsongnl", length=12.5}, - {name="bird", length=30}, -} - -local cave = { - handler = {}, - frequency = 5, - {name="Bats_in_Cave", length=5}, -} - -local cave_frequent = { - handler = {}, - frequency = 100, - {name="drippingwater_drip_a", length=2}, - {name="drippingwater_drip_b", length=2}, - {name="drippingwater_drip_c", length=2}, - {name="Single_Water_Droplet", length=3}, - {name="Spooky_Water_Drops", length=7}, -} - -local water = { - handler = {}, - frequency = 0,--dolphins dont fit into small lakes - {name="dolphins", length=6}, - {name="dolphins_screaming", length=16.5}, -} - -local water_frequent = { - handler = {}, - frequency = 100, - on_stop = "drowning_gasp", - {name="scuba1bubbles", length=11}, - {name="scuba1calm", length=10}, - {name="scuba1calm2", length=8.5}, - {name="scuba1interestingbubbles", length=11}, - {name="scuba1tubulentbubbles", length=10.5}, -} - -local splash = { - handler = {}, - frequency = 100, - {name="Splash", length=1.5}, -} - -local play_music = minetest.setting_getbool("music") or false -local music = { - handler = {}, - frequency = 1, - {name="mtest", length=4*60+33, gain=0.3}, - {name="music_1", length=1*60+52, gain=0.3}, - {name="ambiance", length=19, gain=0.3}, - {name="dark_ambiance", length=46, gain=0.3}, - {name="eastern_feeling", length=3*60+51, gain=0.3}, - {name="echos", length=2*60+26, gain=0.3}, - {name="FoamOfTheSea", length=1*60+50, gain=0.3}, -} - -local is_daytime = function() - return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8) -end - -local get_ambience = function(player) - local table = {} - - local play_water = false - local play_splash = false - local play_day = false - local play_cave = false - local play_night = false - - local pos = player:getpos() - pos.y = pos.y+1.5 - local nodename = minetest.env:get_node(pos).name - if string.find(nodename, "default:water") then - play_water = true - elseif nodename == "air" then - pos.y = pos.y-1.5 - local nodename = minetest.env:get_node(pos).name - if string.find(nodename, "default:water") then - play_splash = true - end - end - if player:getpos().y < 0 then - play_cave = true - elseif is_daytime() then - play_day = true - else - play_night = true - end - - if play_music then - table.music = music - end - if play_water then - table.water = water - table.water_frequent = water_frequent - return table - end - if play_splash then - table.splash = splash - end - if play_day then - table.day = day - table.day_frequent = day_frequent - elseif play_night then - table.night = night - table.night_frequent = night_frequent - elseif play_cave then - table.cave = cave - table.cave_frequent = cave_frequent - end - return table -end - --- start playing the sound, set the handler and delete the handler after sound is played -local play_sound = function(player, list, number) - local player_name = player:get_player_name() - if list.handler[player_name] == nil then - local gain = 1.0 - if list[number].gain ~= nil then - gain = list[number].gain - end - local handler = minetest.sound_play(list[number].name, {to_player=player_name, gain=gain}) - if handler ~= nil then - list.handler[player_name] = handler - minetest.after(list[number].length, function(args) - local list = args[1] - local player_name = args[2] - if list.handler[player_name] ~= nil then - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end, {list, player_name}) - end - end -end - --- stops all sounds that are not in still_playing -local stop_sound = function(still_playing, player) - local player_name = player:get_player_name() - if still_playing.cave == nil then - local list = cave - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.cave_frequent == nil then - local list = cave_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night == nil then - local list = night - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night_frequent == nil then - local list = night_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day == nil then - local list = day - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day_frequent == nil then - local list = day_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.music == nil then - local list = music - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water == nil then - local list = water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_frequent == nil then - local list = water_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.splash == nil then - local list = splash - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end -end - -local timer = 0 -minetest.register_globalstep(function(dtime) - timer = timer+dtime - if timer < 1 then - return - end - timer = 0 - - for _,player in ipairs(minetest.get_connected_players()) do - local ambiences = get_ambience(player) - stop_sound(ambiences, player) - for _,ambience in pairs(ambiences) do - if math.random(1, 100) <= ambience.frequency then - play_sound(player, ambience, math.random(1, #ambience)) - end - end - end -end) \ No newline at end of file diff --git a/custom/mods/ambience/init16.lua b/custom/mods/ambience/init16.lua deleted file mode 100644 index ba85193..0000000 --- a/custom/mods/ambience/init16.lua +++ /dev/null @@ -1,439 +0,0 @@ --------------------------------------------------------------------------------------------------------- ---Ambiance Configuration for version .16 - -local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000. - ---for frequencies below use a number between 0 and max_frequency_all ---for volumes below, use a number between 0.0 and 1, the larger the number the louder the sounds -local night_frequency = 20 --owls, wolves -local night_volume = 0.9 -local night_frequent_frequency = 150 --crickets -local night_frequent_volume = 0.9 -local day_frequency = 100 --crow, bluejay, cardinal -local day_volume = 0.9 -local day_frequent_frequency = 1000 --crow, bluejay, cardinal -local day_frequent_volume = 0.18 -local cave_frequency = 10 --bats -local cave_volume = 1.0 -local cave_frequent_frequency = 70 --drops of water dripping -local cave_frequent_volume = 1.0 -local beach_frequency = 20 --seagulls -local beach_volume = 1.0 -local beach_frequent_frequency = 1000 --waves -local beach_frequent_volume = 1.0 -local water_frequent_frequency = 1000 --water sounds -local water_frequent_volume = 1.0 -local music_frequency = 7 --music (suggestion: keep this one low like around 6) -local music_volume = 0.3 ---End of Config ----------------------------------------------------------------------------------------------------- -local played_on_start = false -local night = { - handler = {}, - frequency = night_frequency, - {name="horned_owl", length=3, gain=night_volume}, - {name="Wolves_Howling", length=11, gain=night_volume}, - {name="ComboWind", length=17, gain=night_volume} -} - -local night_frequent = { - handler = {}, - frequency = night_frequent_frequency, - {name="Crickets_At_NightCombo", length=69, gain=night_frequent_volume} -} - -local day = { - handler = {}, - frequency = day_frequency, - {name="Best Cardinal Bird", length=4, gain=day_volume}, - {name="craw", length=3, gain=day_volume}, - {name="bluejay", length=18, gain=day_volume}, - {name="ComboWind", length=17, gain=day_volume} -} - -local day_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="robin2", length=16, gain=day_frequent_volume}, - {name="birdsongnl", length=13, gain=day_frequent_volume}, - {name="bird", length=30, gain=day_frequent_volume}, - {name="Best Cardinal Bird", length=4, gain=day_frequent_volume}, - {name="craw", length=3, gain=day_frequent_volume}, - {name="bluejay", length=18, gain=day_frequent_volume}, - {name="ComboWind", length=17, gain=day_frequent_volume*3} -} - - -local cave = { - handler = {}, - frequency = cave_frequency, - {name="Bats_in_Cave", length=5, gain=cave_volume} -} - -local cave_frequent = { - handler = {}, - frequency = cave_frequent_frequency, - {name="drippingwater_drip_a", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_b", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_c", length=2, gain=cave_frequent_volume}, - {name="Single_Water_Droplet", length=3, gain=cave_frequent_volume}, - {name="Spooky_Water_Drops", length=7, gain=cave_frequent_volume} -} - -local beach = { - handler = {}, - frequency = beach_frequency, - {name="seagull", length=4.5, gain=beach_volume} -} - -local beach_frequent = { - handler = {}, - frequency = beach_frequent_frequency, - {name="fiji_beach", length=43.5, gain=beach_frequent_volume} -} - - -local water = { - handler = {}, - frequency = 0,--dolphins dont fit into small lakes - {name="dolphins", length=6}, - {name="dolphins_screaming", length=16.5} -} - -local water_frequent = { - handler = {}, - frequency = water_frequent_frequency, - on_stop = "drowning_gasp", - on_start = "Splash", - {name="scuba1bubbles", length=11, gain=water_frequent_volume}, - {name="scuba1calm", length=10}, --not sure why but sometimes I get errors when setting gain=water_frequent_volume here. - {name="scuba1calm2", length=8.5, gain=water_frequent_volume}, - {name="scuba1interestingbubbles", length=11, gain=water_frequent_volume}, - {name="scuba1tubulentbubbles", length=10.5, gain=water_frequent_volume} -} - -local flowing_water = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=14, gain=.4} -} -local flowing_water2 = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=11, gain=.3} -} - -local lava = { - handler = {}, - frequency = 1000, - {name="earth01a", length=20} -} -local lava2 = { - handler = {}, - frequency = 1000, - {name="earth01a", length=15} -} - - -local play_music = minetest.setting_getbool("music") or false -local music = { - handler = {}, - frequency = music_frequency, - {name="mtest", length=4*60+33, gain=music_volume}, - {name="echos", length=2*60+26, gain=music_volume}, - {name="FoamOfTheSea", length=1*60+50, gain=music_volume}, - {name="eastern_feeling", length=3*60+51, gain=music_volume}, - {name="Mass_Effect_Uncharted_Worlds", length=2*60+29, gain=music_volume}, - {name="dark_ambiance", length=44, gain=music_volume} -} - -local is_daytime = function() - return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8) -end - ---[[old -local nodes_in_range = function(pos, search_distance, node_name) - local search_p = {x=0, y=0, z=0} - local nodes_found = 0 - for p_x=(pos.x-search_distance), (pos.x+search_distance) do - for p_y=(pos.y-search_distance), (pos.y+search_distance) do - for p_z=(pos.z-search_distance), (pos.z+search_distance) do - local search_n = minetest.env:get_node({x=p_x, y=p_y, z=p_z}) - if search_n.name == node_name then - nodes_found = nodes_found + 1 - end - end - end - end - return nodes_found - --minetest.chat_send_all("Range: " .. tostring(search_distance) .. " | Found (" .. node_name .. ": " .. nodes_found .. ")") -end --]] - -local nodes_in_range = function(pos, search_distance, node_name) - minp = {x=pos.x-search_distance,y=pos.y-search_distance, z=pos.z-search_distance} - maxp = {x=pos.x+search_distance,y=pos.y+search_distance, z=pos.z+search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - - -local get_ambience = function(player) - local pos = player:getpos() - pos.y = pos.y+1.0 - local nodename = minetest.env:get_node(pos).name - if string.find(nodename, "default:water") then - if music then - return {water=water, water_frequent=water_frequent, music=music} - else - return {water=water, water_frequent=water_frequent} - end - end - if nodes_in_range(pos, 7, "default:lava_flowing")>5 or nodes_in_range(pos, 7, "default:lava_source")>5 then - if music then - return {lava=lava, lava2=lava2, music=music} - else - return {lava=lava} - end - end - if nodes_in_range(pos, 7, "default:water_flowing")>5 then - if music then - return {flowing_water=flowing_water, flowing_water2=flowing_water2, music=music} - else - return {flowing_water=flowing_water, flowing_water2=flowing_water2} - end - end - pos.y = pos.y-2 - nodename = minetest.env:get_node(pos).name - --minetest.chat_send_all("Found " .. nodename .. pos.y ) - if string.find(nodename, "default:sand") and pos.y < 5 then - if music then - return {beach=beach, beach_frequent=beach_frequent, music=music} - else - return {beach=beach, beach_frequent=beach_frequent} - end - end - if player:getpos().y < 0 then - if music then - return {cave=cave, cave_frequent=cave_frequent, music=music} - else - return {cave=cave, cave_frequent=cave_frequent} - end - end - if is_daytime() then - if music then - return {day=day, day_frequent=day_frequent, music=music} - else - return {day=day, day_frequent=day_frequent} - end - else - if music then - return {night=night, night_frequent=night_frequent, music=music} - else - return {night=night, night_frequent=night_frequent} - end - end -end - --- start playing the sound, set the handler and delete the handler after sound is played -local play_sound = function(player, list, number) - local player_name = player:get_player_name() - if list.handler[player_name] == nil then - local gain = 1.0 - if list[number].gain ~= nil then - gain = list[number].gain - end - local handler = minetest.sound_play(list[number].name, {to_player=player_name, gain=gain}) - if handler ~= nil then - list.handler[player_name] = handler - minetest.after(list[number].length, function(args) - local list = args[1] - local player_name = args[2] - if list.handler[player_name] ~= nil then - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end, {list, player_name}) - end - end -end - --- stops all sounds that are not in still_playing -local stop_sound = function(still_playing, player) - local player_name = player:get_player_name() - if still_playing.cave == nil then - local list = cave - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.cave_frequent == nil then - local list = cave_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach == nil then - local list = beach - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach_frequent == nil then - local list = beach_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - - if still_playing.night == nil then - local list = night - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night_frequent == nil then - local list = night_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day == nil then - local list = day - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day_frequent == nil then - local list = day_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.music == nil then - local list = music - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water == nil then - local list = flowing_water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water2 == nil then - local list = flowing_water2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava == nil then - local list = lava - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava2 == nil then - local list = lava2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water == nil then - local list = water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_frequent == nil then - local list = water_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end -end - -local timer = 0 -minetest.register_globalstep(function(dtime) - timer = timer+dtime - if timer < 1 then - return - end - timer = 0 - - for _,player in ipairs(minetest.get_connected_players()) do - local ambiences = get_ambience(player) - stop_sound(ambiences, player) - for _,ambience in pairs(ambiences) do - if math.random(1, 1000) <= ambience.frequency then - if ambience.on_start ~= nil and played_on_start == false then - played_on_start = true - minetest.sound_play(ambience.on_start, {to_player=player:get_player_name()}) - end - play_sound(player, ambience, math.random(1, #ambience)) - end - end - end -end) \ No newline at end of file diff --git a/custom/mods/ambience/init17.lua b/custom/mods/ambience/init17.lua deleted file mode 100644 index 610bb3b..0000000 --- a/custom/mods/ambience/init17.lua +++ /dev/null @@ -1,474 +0,0 @@ --------------------------------------------------------------------------------------------------------- ---Ambiance Configuration for version .17 - -local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000. - ---for frequencies below use a number between 0 and max_frequency_all ---for volumes below, use a number between 0.0 and 1, the larger the number the louder the sounds -local night_frequency = 20 --owls, wolves -local night_volume = 0.9 -local night_frequent_frequency = 150 --crickets -local night_frequent_volume = 0.9 -local day_frequency = 100 --crow, bluejay, cardinal -local day_volume = 0.9 -local day_frequent_frequency = 1000 --crow, bluejay, cardinal -local day_frequent_volume = 0.18 -local cave_frequency = 10 --bats -local cave_volume = 1.0 -local cave_frequent_frequency = 70 --drops of water dripping -local cave_frequent_volume = 1.0 -local beach_frequency = 20 --seagulls -local beach_volume = 1.0 -local beach_frequent_frequency = 1000 --waves -local beach_frequent_volume = 1.0 -local water_frequent_frequency = 1000 --water sounds -local water_frequent_volume = 1.0 -local music_frequency = 0 --music (suggestion: keep this one low like around 6) -local music_volume = 0.3 ---End of Config ----------------------------------------------------------------------------------------------------- -local played_on_start = false -local night = { - handler = {}, - frequency = night_frequency, - {name="horned_owl", length=3, gain=night_volume}, - {name="Wolves_Howling", length=11, gain=night_volume}, - {name="ComboWind", length=17, gain=night_volume} -} - -local night_frequent = { - handler = {}, - frequency = night_frequent_frequency, - {name="Crickets_At_NightCombo", length=69, gain=night_frequent_volume} -} - -local day = { - handler = {}, - frequency = day_frequency, - {name="Best Cardinal Bird", length=4, gain=day_volume}, - {name="craw", length=3, gain=day_volume}, - {name="bluejay", length=18, gain=day_volume}, - {name="ComboWind", length=17, gain=day_volume} -} - -local day_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="robin2", length=16, gain=day_frequent_volume}, - {name="birdsongnl", length=13, gain=day_frequent_volume}, - {name="bird", length=30, gain=day_frequent_volume}, - {name="Best Cardinal Bird", length=4, gain=day_frequent_volume}, - {name="craw", length=3, gain=day_frequent_volume}, - {name="bluejay", length=18, gain=day_frequent_volume}, - {name="ComboWind", length=17, gain=day_frequent_volume*3} -} - - -local cave = { - handler = {}, - frequency = cave_frequency, - {name="Bats_in_Cave", length=5, gain=cave_volume} -} - -local cave_frequent = { - handler = {}, - frequency = cave_frequent_frequency, - {name="drippingwater_drip_a", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_b", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_c", length=2, gain=cave_frequent_volume}, - {name="Single_Water_Droplet", length=3, gain=cave_frequent_volume}, - {name="Spooky_Water_Drops", length=7, gain=cave_frequent_volume} -} - -local beach = { - handler = {}, - frequency = beach_frequency, - {name="seagull", length=4.5, gain=beach_volume} -} - -local beach_frequent = { - handler = {}, - frequency = beach_frequent_frequency, - {name="fiji_beach", length=43.5, gain=beach_frequent_volume} -} - - -local water = { - handler = {}, - frequency = 0,--dolphins dont fit into small lakes - {name="dolphins", length=6}, - {name="dolphins_screaming", length=16.5} -} - -local water_frequent = { - handler = {}, - frequency = water_frequent_frequency, - on_stop = "drowning_gasp", - on_start = "Splash", - {name="scuba1bubbles", length=11, gain=water_frequent_volume}, - {name="scuba1calm", length=10}, --not sure why but sometimes I get errors when setting gain=water_frequent_volume here. - {name="scuba1calm2", length=8.5, gain=water_frequent_volume}, - {name="scuba1interestingbubbles", length=11, gain=water_frequent_volume}, - {name="scuba1tubulentbubbles", length=10.5, gain=water_frequent_volume} -} - -local water_surface = { - handler = {}, - frequency = 10, - on_start = "Splash", - {name="lake_waves_2_calm", length=9.5}, - {name="lake_waves_2_variety", length=13.1} -} - -local flowing_water = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=14, gain=.4} -} -local flowing_water2 = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=11, gain=.3} -} - -local lava = { - handler = {}, - frequency = 1000, - {name="earth01a", length=20} -} -local lava2 = { - handler = {}, - frequency = 1000, - {name="earth01a", length=15} -} - - -local play_music = minetest.setting_getbool("music") or false -local music = { - handler = {}, - frequency = music_frequency, - {name="mtest", length=4*60+33, gain=music_volume}, - {name="echos", length=2*60+26, gain=music_volume}, - {name="FoamOfTheSea", length=1*60+50, gain=music_volume}, - {name="eastern_feeling", length=3*60+51, gain=music_volume}, - {name="Mass_Effect_Uncharted_Worlds", length=2*60+29, gain=music_volume}, - {name="dark_ambiance", length=44, gain=music_volume} -} - -local is_daytime = function() - return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8) -end - ---[[old -local nodes_in_range = function(pos, search_distance, node_name) - local search_p = {x=0, y=0, z=0} - local nodes_found = 0 - for p_x=(pos.x-search_distance), (pos.x+search_distance) do - for p_y=(pos.y-search_distance), (pos.y+search_distance) do - for p_z=(pos.z-search_distance), (pos.z+search_distance) do - local search_n = minetest.env:get_node({x=p_x, y=p_y, z=p_z}) - if search_n.name == node_name then - nodes_found = nodes_found + 1 - end - end - end - end - return nodes_found - --minetest.chat_send_all("Range: " .. tostring(search_distance) .. " | Found (" .. node_name .. ": " .. nodes_found .. ")") -end --]] - -local nodes_in_range = function(pos, search_distance, node_name) - minp = {x=pos.x-search_distance,y=pos.y-search_distance, z=pos.z-search_distance} - maxp = {x=pos.x+search_distance,y=pos.y+search_distance, z=pos.z+search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - - -local get_ambience = function(player) - local pos = player:getpos() - pos.y = pos.y+1.0 - local nodename = minetest.env:get_node(pos).name - if string.find(nodename, "default:water") then - if music then - return {water=water, water_frequent=water_frequent, music=music} - else - return {water=water, water_frequent=water_frequent} - end - elseif nodename == "air" then - pos.y = pos.y-1.5 - local nodename = minetest.env:get_node(pos).name - pos.y = pos.y+1.5 - if string.find(nodename, "default:water") then - if music then - return {water_surface=water_surface, music=music} - else - return {water_surface} - end - end - end - - if nodes_in_range(pos, 7, "default:lava_flowing")>5 or nodes_in_range(pos, 7, "default:lava_source")>5 then - if music then - return {lava=lava, lava2=lava2, music=music} - else - return {lava=lava} - end - end - if nodes_in_range(pos, 7, "default:water_flowing")>5 then - if music then - return {flowing_water=flowing_water, flowing_water2=flowing_water2, music=music} - else - return {flowing_water=flowing_water, flowing_water2=flowing_water2} - end - end - pos.y = pos.y-2 - nodename = minetest.env:get_node(pos).name - --minetest.chat_send_all("Found " .. nodename .. pos.y ) - if string.find(nodename, "default:sand") and pos.y < 5 then - if music then - return {beach=beach, beach_frequent=beach_frequent, music=music} - else - return {beach=beach, beach_frequent=beach_frequent} - end - end - if player:getpos().y < 0 then - if music then - return {cave=cave, cave_frequent=cave_frequent, music=music} - else - return {cave=cave, cave_frequent=cave_frequent} - end - end - if is_daytime() then - if music then - return {day=day, day_frequent=day_frequent, music=music} - else - return {day=day, day_frequent=day_frequent} - end - else - if music then - return {night=night, night_frequent=night_frequent, music=music} - else - return {night=night, night_frequent=night_frequent} - end - end -end - --- start playing the sound, set the handler and delete the handler after sound is played -local play_sound = function(player, list, number) - local player_name = player:get_player_name() - if list.handler[player_name] == nil then - local gain = 1.0 - if list[number].gain ~= nil then - gain = list[number].gain - end - local handler = minetest.sound_play(list[number].name, {to_player=player_name, gain=gain}) - if handler ~= nil then - list.handler[player_name] = handler - minetest.after(list[number].length, function(args) - local list = args[1] - local player_name = args[2] - if list.handler[player_name] ~= nil then - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end, {list, player_name}) - end - end -end - --- stops all sounds that are not in still_playing -local stop_sound = function(still_playing, player) - local player_name = player:get_player_name() - if still_playing.cave == nil then - local list = cave - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.cave_frequent == nil then - local list = cave_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach == nil then - local list = beach - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach_frequent == nil then - local list = beach_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - - if still_playing.night == nil then - local list = night - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night_frequent == nil then - local list = night_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day == nil then - local list = day - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day_frequent == nil then - local list = day_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.music == nil then - local list = music - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water == nil then - local list = flowing_water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water2 == nil then - local list = flowing_water2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava == nil then - local list = lava - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava2 == nil then - local list = lava2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water == nil then - local list = water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_surface == nil then - local list = water_surface - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_frequent == nil then - local list = water_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - minetest.chat_send_all("list.on_stop " .. list.on_stop ) - -- played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - - - -end - -local timer = 0 -minetest.register_globalstep(function(dtime) - timer = timer+dtime - if timer < 1 then - return - end - timer = 0 - - for _,player in ipairs(minetest.get_connected_players()) do - local ambiences = get_ambience(player) - stop_sound(ambiences, player) - for _,ambience in pairs(ambiences) do - if math.random(1, 1000) <= ambience.frequency then - if ambience.on_start ~= nil and played_on_start == false then - played_on_start = true - minetest.sound_play(ambience.on_start, {to_player=player:get_player_name()}) - end - play_sound(player, ambience, math.random(1, #ambience)) - end - end - end -end) \ No newline at end of file diff --git a/custom/mods/ambience/init29debug.lua b/custom/mods/ambience/init29debug.lua deleted file mode 100644 index 60bf38f..0000000 --- a/custom/mods/ambience/init29debug.lua +++ /dev/null @@ -1,722 +0,0 @@ --------------------------------------------------------------------------------------------------------- ---Ambiance Configuration for version .29 ---working on Flying ---PROB: wind stops short even though it says we are still flying and don't hear the start sound. ---really BIG prob, it ruins water meaning you hear beach while treading water. (find out if still hear it in .28) because ---it is fairly rare in .29 ---need a separate onstart variable for flying - - -local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000. - ---for frequencies below use a number between 0 and max_frequency_all ---for volumes below, use a number between 0.0 and 1, the larger the number the louder the sounds -local night_frequency = 20 --owls, wolves -local night_volume = 0.9 -local night_frequent_frequency = 150 --crickets -local night_frequent_volume = 0.9 -local day_frequency = 100 --crow, bluejay, cardinal -local day_volume = 0.9 -local day_frequent_frequency = 1000 --crow, bluejay, cardinal -local day_frequent_volume = 0.18 -local cave_frequency = 10 --bats -local cave_volume = 1.0 -local cave_frequent_frequency = 70 --drops of water dripping -local cave_frequent_volume = 1.0 -local beach_frequency = 20 --seagulls -local beach_volume = 1.0 -local beach_frequent_frequency = 1000 --waves -local beach_frequent_volume = 1.0 -local water_frequent_frequency = 1000 --water sounds -local water_frequent_volume = 1.0 -local desert_frequency = 20 --coyote -local desert_volume = 1.0 -local desert_frequent_frequency = 700 --desertwind -local desert_frequent_volume = 1.0 -local swimming_frequent_frequency = 1000 --swimming splashes -local swimming_frequent_volume = 1.0 -local music_frequency = 0 --music (suggestion: keep this one low like around 6) -local music_volume = 0.3 ---End of Config ----------------------------------------------------------------------------------------------------- -local counter=0--***************** -local last_x_pos = 0 -local last_y_pos = 0 -local last_z_pos = 0 -local node_under_feet -local node_at_upper_body -local node_at_lower_body -local node_3_under_feet - -local played_on_start = false -local played_on_start_flying = false - -local night = { - handler = {}, - frequency = night_frequency, - {name="horned_owl", length=3, gain=night_volume}, - {name="Wolves_Howling", length=11, gain=night_volume}, - {name="ComboWind", length=17, gain=night_volume} -} - -local night_frequent = { - handler = {}, - frequency = night_frequent_frequency, - {name="Crickets_At_NightCombo", length=69, gain=night_frequent_volume} -} - -local day = { - handler = {}, - frequency = day_frequency, - {name="Best Cardinal Bird", length=4, gain=day_volume}, - {name="craw", length=3, gain=day_volume}, - {name="bluejay", length=18, gain=day_volume}, - {name="ComboWind", length=17, gain=day_volume} -} - -local day_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="robin2", length=16, gain=day_frequent_volume}, - {name="birdsongnl", length=13, gain=day_frequent_volume}, - {name="bird", length=30, gain=day_frequent_volume}, - {name="Best Cardinal Bird", length=4, gain=day_frequent_volume}, - {name="craw", length=3, gain=day_frequent_volume}, - {name="bluejay", length=18, gain=day_frequent_volume}, - {name="ComboWind", length=17, gain=day_frequent_volume*3} -} -local swimming_frequent = { - handler = {}, - frequency = day_frequent_frequency, - {name="water_swimming_splashing_breath", length=11.5, gain=swimming_frequent_volume}, - {name="water_swimming_splashing", length=9, gain=swimming_frequent_volume} -} - -local cave = { - handler = {}, - frequency = cave_frequency, - {name="Bats_in_Cave", length=5, gain=cave_volume} -} - -local cave_frequent = { - handler = {}, - frequency = cave_frequent_frequency, - {name="drippingwater_drip_a", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_b", length=2, gain=cave_frequent_volume}, - {name="drippingwater_drip_c", length=2, gain=cave_frequent_volume}, - {name="Single_Water_Droplet", length=3, gain=cave_frequent_volume}, - {name="Spooky_Water_Drops", length=7, gain=cave_frequent_volume} -} - -local beach = { - handler = {}, - frequency = beach_frequency, - {name="seagull", length=4.5, gain=beach_volume} -} - -local beach_frequent = { - handler = {}, - frequency = beach_frequent_frequency, - {name="fiji_beach", length=43.5, gain=beach_frequent_volume} -} - -local desert = { - handler = {}, - frequency = desert_frequency, - {name="coyote2", length=2.5, gain=desert_volume}, - {name="RattleSnake", length=8, gain=desert_volume} -} - -local desert_frequent = { - handler = {}, - frequency = desert_frequent_frequency, - {name="DesertMonolithMed", length=34.5, gain=desert_frequent_volume} -} - -local flying = { - handler = {}, - frequency = 1000, - on_start = "crystal_airlines", - on_stop = "nothing_yet", - {name="ComboWind", length=17, gain=1} -} - -local water = { - handler = {}, - frequency = 0,--dolphins dont fit into small lakes - {name="dolphins", length=6}, - {name="dolphins_screaming", length=16.5} -} - -local water_frequent = { - handler = {}, - frequency = water_frequent_frequency, - on_stop = "drowning_gasp", - --on_start = "Splash", - {name="scuba1bubbles", length=11, gain=water_frequent_volume}, - {name="scuba1calm", length=10}, --not sure why but sometimes I get errors when setting gain=water_frequent_volume here. - {name="scuba1calm2", length=8.5, gain=water_frequent_volume}, - {name="scuba1interestingbubbles", length=11, gain=water_frequent_volume}, - {name="scuba1tubulentbubbles", length=10.5, gain=water_frequent_volume} -} - -local water_surface = { - handler = {}, - frequency = 1000, - on_stop = "Splash", - on_start = "Splash", - {name="lake_waves_2_calm", length=9.5}, - {name="lake_waves_2_variety", length=13.1} -} -local splashing_water = { - handler = {}, - frequency = 1000, - {name="Splash", length=1.22, gain=1} -} - -local flowing_water = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=14, gain=.4} -} -local flowing_water2 = { - handler = {}, - frequency = 1000, - {name="small_waterfall", length=11, gain=.3} -} - -local lava = { - handler = {}, - frequency = 1000, - {name="earth01a", length=20} -} -local lava2 = { - handler = {}, - frequency = 1000, - {name="earth01a", length=15} -} - - -local play_music = minetest.setting_getbool("music") or false -local music = { - handler = {}, - frequency = music_frequency, - {name="mtest", length=4*60+33, gain=music_volume}, - {name="echos", length=2*60+26, gain=music_volume}, - {name="FoamOfTheSea", length=1*60+50, gain=music_volume}, - {name="eastern_feeling", length=3*60+51, gain=music_volume}, - {name="Mass_Effect_Uncharted_Worlds", length=2*60+29, gain=music_volume}, - {name="dark_ambiance", length=44, gain=music_volume} -} - -local is_daytime = function() - return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8) -end - -local nodes_in_range = function(pos, search_distance, node_name) - minp = {x=pos.x-search_distance,y=pos.y-search_distance, z=pos.z-search_distance} - maxp = {x=pos.x+search_distance,y=pos.y+search_distance, z=pos.z+search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) - --minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - -local nodes_in_coords = function(minp, maxp, node_name) - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) - --minetest.chat_send_all("Found (" .. node_name .. ": " .. #nodes .. ")") - return #nodes -end - -local atleast_nodes_in_grid = function(pos, search_distance, height, node_name, threshold) --- counter = counter +1 --- minetest.chat_send_all("counter: (" .. counter .. ")") - minp = {x=pos.x-search_distance,y=height, z=pos.z+20} - maxp = {x=pos.x+search_distance,y=height, z=pos.z+20} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("z+Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - totalnodes = #nodes - minp = {x=pos.x-search_distance,y=height, z=pos.z-20} - maxp = {x=pos.x+search_distance,y=height, z=pos.z-20} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("z-Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - totalnodes = totalnodes + #nodes - maxp = {x=pos.x+20,y=height, z=pos.z+search_distance} - minp = {x=pos.x+20,y=height, z=pos.z-search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("x+Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - totalnodes = totalnodes + #nodes - maxp = {x=pos.x-20,y=height, z=pos.z+search_distance} - minp = {x=pos.x-20,y=height, z=pos.z-search_distance} - nodes = minetest.env:find_nodes_in_area(minp, maxp, node_name) --- minetest.chat_send_all("x+Found (" .. node_name .. ": " .. #nodes .. ")") - if #nodes >= threshold then - return true - end - totalnodes = totalnodes + #nodes --- minetest.chat_send_all("Found total(" .. totalnodes .. ")") - if totalnodes >= threshold*2 then - return true - end - return false -end - -local get_immediate_nodes = function(pos) - pos.y = pos.y-1 - node_under_feet = minetest.env:get_node(pos).name - pos.y = pos.y-3 - node_3_under_feet = minetest.env:get_node(pos).name - pos.y = pos.y+3 - pos.y = pos.y+2.2 - node_at_upper_body = minetest.env:get_node(pos).name - pos.y = pos.y-1.19 - node_at_lower_body = minetest.env:get_node(pos).name - pos.y = pos.y+0.99 --1.6 - --minetest.chat_send_all("node_under_feet(" .. nodename .. ")") -end - - -local get_ambience = function(player) - local player_is_climbing = false - local player_is_descending = false - local player_is_moving_horiz = false - local standing_in_water = false - local pos = player:getpos() - get_immediate_nodes(pos) - - if last_x_pos ~=pos.x or last_z_pos ~=pos.z then - player_is_moving_horiz = true - end - if pos.y > last_y_pos+.5 then - player_is_climbing = true - end - if pos.y < last_y_pos-.5 then - player_is_descending = true - end - - last_x_pos =pos.x - last_z_pos =pos.z - last_y_pos =pos.y - - if string.find(node_at_upper_body, "default:water") then - if music then - return {water=water, water_frequent=water_frequent, music=music} - else - return {water=water, water_frequent=water_frequent} - end - elseif node_at_upper_body == "air" then - if string.find(node_at_lower_body, "default:water") then - --minetest.chat_send_all("bottom counted as water") - --we found air at upperbody, and water at lower body. Now there are 4 possibilities: - --Key: under feet, moving or not - --swimming w, m swimming - --walking in water nw, m splashing - --treading water w, nm sloshing - --standing in water nw, nm beach trumps, then sloshing - if player_is_moving_horiz then - if string.find(node_under_feet, "default:water") then - if music then - return {swimming_frequent=swimming_frequent, music=music} - else - return {swimming_frequent} - end - else --didn't find water under feet: walking in water - if music then - return {splashing_water=splashing_water, music=music} - else - return {splashing_water} - end - end - else--player is not moving - if string.find(node_under_feet, "default:water") then - if music then - return {water_surface=water_surface, music=music} - else - return {water_surface} - end - else --didn't find water under feet - standing_in_water = true - end - end - end - end - if player_is_moving_horiz then - minetest.chat_send_all("playermoving") - end - if player_is_climbing then - minetest.chat_send_all("player Climbing") - end - minetest.chat_send_all("nub:" ..node_at_upper_body) - minetest.chat_send_all("nlb:" ..node_at_lower_body) - minetest.chat_send_all("nuf:" ..node_under_feet) - minetest.chat_send_all("n3uf:" ..node_3_under_feet) - - local air_or_ignore = {air=true,ignore=true} - --minetest.chat_send_all(air_or_ignore[node_under_feet]) - if (player_is_moving_horiz or player_is_climbing) and air_or_ignore[node_at_upper_body] and air_or_ignore[node_at_lower_body] - and air_or_ignore[node_under_feet] and air_or_ignore[node_3_under_feet] and not player_is_descending then - minetest.chat_send_all("flying!!!!") - if music then - return {flying=flying, music=music} - else - return {flying} - end - end - minetest.chat_send_all("not flying!!!!") - - if nodes_in_range(pos, 7, "default:lava_flowing")>5 or nodes_in_range(pos, 7, "default:lava_source")>5 then - if music then - return {lava=lava, lava2=lava2, music=music} - else - return {lava=lava} - end - end - if nodes_in_range(pos, 6, "default:water_flowing")>45 then - if music then - return {flowing_water=flowing_water, flowing_water2=flowing_water2, music=music} - else - return {flowing_water=flowing_water, flowing_water2=flowing_water2} - end - end - - ---if we are near sea level and there is lots of water around the area - if pos.y < 7 and pos.y >0 and atleast_nodes_in_grid(pos, 60, 1, "default:water_source", 51 ) then - if music then - return {beach=beach, beach_frequent=beach_frequent, music=music} - else - return {beach=beach, beach_frequent=beach_frequent} - end - end - if standing_in_water then - if music then - return {water_surface=water_surface, music=music} - else - return {water_surface} - end - end - - - desert_in_range = (nodes_in_range(pos, 6, "default:desert_sand")+nodes_in_range(pos, 6, "default:desert_stone")) - --minetest.chat_send_all("desertcount: " .. desert_in_range .. ",".. pos.y ) - if desert_in_range >250 then - if music then - return {desert=desert, desert_frequent=desert_frequent, music=music} - else - return {desert=desert, desert_frequent=desert_frequent} - end - end - - pos.y = pos.y-2 - nodename = minetest.env:get_node(pos).name --- minetest.chat_send_all("Found " .. nodename .. pos.y ) - - - if player:getpos().y < 0 then - if music then - return {cave=cave, cave_frequent=cave_frequent, music=music} - else - return {cave=cave, cave_frequent=cave_frequent} - end - end - if is_daytime() then - if music then - return {day=day, day_frequent=day_frequent, music=music} - else - return {day=day, day_frequent=day_frequent} - end - else - if music then - return {night=night, night_frequent=night_frequent, music=music} - else - return {night=night, night_frequent=night_frequent} - end - end -end - --- start playing the sound, set the handler and delete the handler after sound is played -local play_sound = function(player, list, number) - local player_name = player:get_player_name() - if list.handler[player_name] == nil then - local gain = 1.0 - if list[number].gain ~= nil then - gain = list[number].gain - end - local handler = minetest.sound_play(list[number].name, {to_player=player_name, gain=gain}) - if handler ~= nil then - list.handler[player_name] = handler - minetest.after(list[number].length, function(args) - local list = args[1] - local player_name = args[2] - if list.handler[player_name] ~= nil then - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end, {list, player_name}) - end - end -end - --- stops all sounds that are not in still_playing -local stop_sound = function(still_playing, player) - local player_name = player:get_player_name() - if still_playing.cave == nil then - local list = cave - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.cave_frequent == nil then - local list = cave_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.swimming_frequent == nil then - local list = swimming_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach == nil then - local list = beach - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.beach_frequent == nil then - local list = beach_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.desert == nil then - local list = desert - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.desert_frequent == nil then - local list = desert_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night == nil then - local list = night - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.night_frequent == nil then - local list = night_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day == nil then - local list = day - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.day_frequent == nil then - local list = day_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.music == nil then - local list = music - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water == nil then - local list = flowing_water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flowing_water2 == nil then - local list = flowing_water2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava == nil then - local list = lava - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.lava2 == nil then - local list = lava2 - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water == nil then - local list = water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_surface == nil then - local list = water_surface - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.water_frequent == nil then - local list = water_frequent - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - -- minetest.chat_send_all("list.on_stop " .. list.on_stop ) - played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.flying == nil then - --minetest.chat_send_all("begin stop flying " ) - local list = flying - if list.handler[player_name] ~= nil then - -- minetest.chat_send_all("handler flying " ) - if list.on_stop ~= nil then - -- minetest.chat_send_all("onstop flying" ) - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - played_on_start = false - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - if still_playing.splashing_water == nil then - local list = splashing_water - if list.handler[player_name] ~= nil then - if list.on_stop ~= nil then - minetest.sound_play(list.on_stop, {to_player=player:get_player_name()}) - end - minetest.sound_stop(list.handler[player_name]) - list.handler[player_name] = nil - end - end - -end - -local timer = 0 -minetest.register_globalstep(function(dtime) - timer = timer+dtime - if timer < 1 then - return - end - timer = 0 - - for _,player in ipairs(minetest.get_connected_players()) do - local ambiences = get_ambience(player) - stop_sound(ambiences, player) - for _,ambience in pairs(ambiences) do - if math.random(1, 1000) <= ambience.frequency then - if(played_on_start) then - -- minetest.chat_send_all("playedOnStart " ) - else - -- minetest.chat_send_all("FALSEplayedOnStart " ) - end - if ambience.on_start ~= nil and played_on_start == false then - played_on_start = true - minetest.sound_play(ambience.on_start, {to_player=player:get_player_name()}) - end - minetest.chat_send_all("ambience: " ..ambience ) - -- if ambience.on_start ~= nil and played_on_start_flying == false then - -- played_on_start_flying = true - -- minetest.sound_play(ambience.on_start, {to_player=player:get_player_name()}) - -- end - play_sound(player, ambience, math.random(1, #ambience)) - end - end - end -end) \ No newline at end of file diff --git a/custom/mods/ambience/sounds/Ambivalent.ogg b/custom/mods/ambience/sounds/Ambivalent.ogg deleted file mode 100644 index 6235f93..0000000 Binary files a/custom/mods/ambience/sounds/Ambivalent.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/AvalonShort.ogg b/custom/mods/ambience/sounds/AvalonShort.ogg deleted file mode 100644 index 5262901..0000000 Binary files a/custom/mods/ambience/sounds/AvalonShort.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/Bats_in_Cave.ogg b/custom/mods/ambience/sounds/Bats_in_Cave.ogg deleted file mode 100644 index 810b4e5..0000000 Binary files a/custom/mods/ambience/sounds/Bats_in_Cave.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/Best Cardinal Bird.ogg b/custom/mods/ambience/sounds/Best Cardinal Bird.ogg deleted file mode 100644 index eaddae9..0000000 Binary files a/custom/mods/ambience/sounds/Best Cardinal Bird.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/ComboWind.ogg b/custom/mods/ambience/sounds/ComboWind.ogg deleted file mode 100644 index bef99e7..0000000 Binary files a/custom/mods/ambience/sounds/ComboWind.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/Crickets_At_NightCombo.ogg b/custom/mods/ambience/sounds/Crickets_At_NightCombo.ogg deleted file mode 100644 index 8642ffa..0000000 Binary files a/custom/mods/ambience/sounds/Crickets_At_NightCombo.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/DesertMonolithMed.ogg b/custom/mods/ambience/sounds/DesertMonolithMed.ogg deleted file mode 100644 index e282584..0000000 Binary files a/custom/mods/ambience/sounds/DesertMonolithMed.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/EtherealShort.ogg b/custom/mods/ambience/sounds/EtherealShort.ogg deleted file mode 100644 index b4bc2cd..0000000 Binary files a/custom/mods/ambience/sounds/EtherealShort.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/FarawayShort.ogg b/custom/mods/ambience/sounds/FarawayShort.ogg deleted file mode 100644 index b53d5d6..0000000 Binary files a/custom/mods/ambience/sounds/FarawayShort.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/RattleSnake.ogg b/custom/mods/ambience/sounds/RattleSnake.ogg deleted file mode 100644 index 14d7e21..0000000 Binary files a/custom/mods/ambience/sounds/RattleSnake.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/Single_Water_Droplet.ogg b/custom/mods/ambience/sounds/Single_Water_Droplet.ogg deleted file mode 100644 index 292e62b..0000000 Binary files a/custom/mods/ambience/sounds/Single_Water_Droplet.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/SoundLicenses.txt b/custom/mods/ambience/sounds/SoundLicenses.txt deleted file mode 100644 index f37a799..0000000 --- a/custom/mods/ambience/sounds/SoundLicenses.txt +++ /dev/null @@ -1,115 +0,0 @@ ---------------Music Lic: -Amethystium: ---Avalon ---Ethereal ---Faraway ---Strangely Beautiful -Used with kind permission from Øystein Ramfjord / AM.mu Records - -Jordach: ---dark_ambiance ---eastern_feeling -These sounds are used for the Mod for Minetest; Ambiance. -The included sounds are http://creativecommons.org/licenses/by-nc-sa/3.0/ -Not Used:--mtest - ------------Sound Lic: ---Nightime Sound, Recorded by Mike Koenig, License: Attribution 3.0 http://soundbible.com/951-Nightime.html ---Crickets At Night Sound, License: Attribution 3.0 | Recorded by Mike Koenig |http://soundbible.com/365-Crickets-At-Night.html - ---Medium Pack Of Wolves Howling, License: Public Domain | Recorded by fws.gov, http://soundbible.com/277-Medium-Pack-Of-Wolves-Howling.html - ---Horned Owl Sound, License: Attribution 3.0 | Recorded by Mike Koenig , http://soundbible.com/1851-Horned-Owl.html ---Bats In Cave Sound, License: Attr-Noncommercial 3.0 | Recorded by Mike Koenig , http://soundbible.com/1939-Bats-In-Cave.html - ---Spooky Water Drops Sound, License: Attribution 3.0 | Recorded by Mike Koenig, http://soundbible.com/380-Spooky-Water-Drops.html - - --- Single Water Droplet Sound, License: Attribution 3.0 | Recorded by Mike Koenig, http://soundbible.com/384-Single-Water-Droplet.html - ---HollowWind, Black Boe, Creative Commons 0 License, http://www.freesound.org/people/Black%20Boe/sounds/22331/ - ---drippingwater*.ogg sounds: CC0, Dripping Water Mod, by kddekadenz, http://minetest.net/forum/viewtopic.php?id=1688 - ---best cardinal bird: License: Attribution 3.0 | Recorded by PsychoBird, http://soundbible.com/1515-Best-Cardinal-Bird.html - ---birdsongnl: the Attribution License, HerbertBoland, http://www.freesound.org/people/HerbertBoland/sounds/28312/ (end) - ---robin2: Attribution License, reinsamba, http://www.freesound.org/people/reinsamba/sounds/32479/ (end) - ---Craw.WAV, Attribution License, inchadney, http://www.freesound.org/people/inchadney/sounds/52450/ - ---bluejay.wav, Creative Commons 0 License, UncleSigmund, http://www.freesound.org/people/UncleSigmund/sounds/42382/ - ---scuba1*.ogg- digifishmusic, Attribution License, http://www.freesound.org/people/digifishmusic/sounds/45521/ - ---Underwater Pool - Attribution 3.0 | Recorded by Mike Koenig, http://soundbible.com/1660-Underwater-Pool.html - ---dolphin_screaming - Creative Commons 0 License, felix.blume, http://www.freesound.org/people/felix.blume/sounds/161691/ - ---dolphins - Attribution Noncommercial License, acclivity, http://www.freesound.org/people/acclivity/sounds/13691/ - -ComboWind uses: ---wind-in-the-trees -Attribution License, laurent, http://www.freesound.org/people/laurent/sounds/16995/ ---drygrassInWind- Creative Commons 0 License, felix.blume, http://www.freesound.org/people/felix.blume/sounds/146436/ - ---Splash: Attribution 3.0 | Recorded by BlastwaveFx.com, http://soundbible.com/546-Fish-Splashing.html - ---small_waterfall Attribution License, volivieri, http://www.freesound.org/people/volivieri/sounds/38390/ - ---Lake_Waves_2*, Attribution License, Benboncan, http://www.freesound.org/people/Benboncan/sounds/67884/ - ---water_swimming_splashing*, Attribution Noncommercial License, Robinhood76, http://www.freesound.org/people/Robinhood76/sounds/79657/ - ---earth01a, Creative Commons 0 License., Halion , http://www.freesound.org/people/Halion/sounds/17785 - ---fiji_beach, Creative Commons 0 License, c97059890, http://www.freesound.org/people/c97059890/sounds/21754/ - ---seagull, Attribution Noncommercial License., hazure, http://www.freesound.org/people/hazure/sounds/23707/, - -desert: -coyote2, Attribution License, rogerforeman, http://www.freesound.org/people/rogerforeman/sounds/68068/ -http://www.freesound.org/people/Proxima4/sounds/104319/ -Desert Monolith.wav, Creative Commons 0 License, Proxima4, http://www.freesound.org/people/Proxima4/sounds/104319/ -Rattlesnake Rattle, Public Domain, fws.gov, http://soundbible.com/237-Rattlesnake-Rattle.html - -flying: -crystal_airlines: Attribution License, suonho, http://www.freesound.org/people/suonho/sounds/56364/ - -----------------Not used yet: -desert: -Desert Simple.wav, Creative Commons 0 License, Proxima4, http://www.freesound.org/people/Proxima4/sounds/104320/ - - 313hummer (Jordan Craige) ---echos http://soundcloud.com/jordan-craige/echos-1 -Creative Commons Attribution license (reuse allowed) Attribution 3.0 Unported (CC BY 3.0) -Not Used:--FoamOfTheSea http://soundcloud.com/jordan-craige/foam-of-the-sea - -xi-intersection: -http://soundcloud.com/xi-intersection/mass-effect-uncharted-worlds Creative Commons License ---not used: -http://soundcloud.com/xi-intersection/donkey-kong-country-2-flight -http://soundcloud.com/kogyo/kogyo-skalar-m1 - -lava: -http://www.freesound.org/people/Halion/sounds/17785/ (almost as good cc) (combine with rocks falling?) -http://www.freesound.org/people/pushtobreak/sounds/17823/ (attrib non cc really good) -http://www.freesound.org/people/klankbeeld/sounds/123970/ (horror rhythm) -Rockfall in mine.wav http://www.freesound.org/people/Benboncan/sounds/60085/ - - -http://www.freesound.org/people/snotch/sounds/96175/ (mud volcano) - ---natural night sounds in Boquete.wav, Attribution License, laurent, http://www.freesound.org/people/laurent/sounds/15851/ -http://www.freesound.org/people/Dynamicell/sounds/17553/ -http://www.freesound.org/people/juskiddink/sounds/78955/ aspen tree in wind -http://www.freesound.org/people/Benboncan/sounds/69761/ wind in hedge birds animals - - -ButterflyTea: -Creative Commons : Attribution-Noncommercial-Share Alike 3.0 -http://www.jamendo.com/en/track/904012/dance-of-magical-flowers -http://www.jamendo.com/en/track/904013/magic-of-the-seventh-world -http://www.jamendo.com/en/track/904016/in-search-of-the-soul - -zero-project diff --git a/custom/mods/ambience/sounds/Splash.ogg b/custom/mods/ambience/sounds/Splash.ogg deleted file mode 100644 index 4458afe..0000000 Binary files a/custom/mods/ambience/sounds/Splash.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/Spooky_Water_Drops.ogg b/custom/mods/ambience/sounds/Spooky_Water_Drops.ogg deleted file mode 100644 index 13d0839..0000000 Binary files a/custom/mods/ambience/sounds/Spooky_Water_Drops.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/StrangelyBeautifulShort.ogg b/custom/mods/ambience/sounds/StrangelyBeautifulShort.ogg deleted file mode 100644 index 2a2dbc4..0000000 Binary files a/custom/mods/ambience/sounds/StrangelyBeautifulShort.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/Wolves_Howling.ogg b/custom/mods/ambience/sounds/Wolves_Howling.ogg deleted file mode 100644 index 20627ed..0000000 Binary files a/custom/mods/ambience/sounds/Wolves_Howling.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/anonnp4014.ogg b/custom/mods/ambience/sounds/anonnp4014.ogg deleted file mode 100644 index 675d373..0000000 Binary files a/custom/mods/ambience/sounds/anonnp4014.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/bensound_deepblue.ogg b/custom/mods/ambience/sounds/bensound_deepblue.ogg deleted file mode 100644 index d576f00..0000000 Binary files a/custom/mods/ambience/sounds/bensound_deepblue.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/bensound_ofeliasdream.ogg b/custom/mods/ambience/sounds/bensound_ofeliasdream.ogg deleted file mode 100644 index f2c21a0..0000000 Binary files a/custom/mods/ambience/sounds/bensound_ofeliasdream.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/bensound_slowmotion.ogg b/custom/mods/ambience/sounds/bensound_slowmotion.ogg deleted file mode 100644 index ee31c30..0000000 Binary files a/custom/mods/ambience/sounds/bensound_slowmotion.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/bird.ogg b/custom/mods/ambience/sounds/bird.ogg deleted file mode 100644 index 1ee96ad..0000000 Binary files a/custom/mods/ambience/sounds/bird.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/birdsongnl.ogg b/custom/mods/ambience/sounds/birdsongnl.ogg deleted file mode 100644 index 18e3a1a..0000000 Binary files a/custom/mods/ambience/sounds/birdsongnl.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/bluejay.ogg b/custom/mods/ambience/sounds/bluejay.ogg deleted file mode 100644 index 7c36417..0000000 Binary files a/custom/mods/ambience/sounds/bluejay.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/canadianloon2.ogg b/custom/mods/ambience/sounds/canadianloon2.ogg deleted file mode 100644 index 13a59f5..0000000 Binary files a/custom/mods/ambience/sounds/canadianloon2.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/coyote2.ogg b/custom/mods/ambience/sounds/coyote2.ogg deleted file mode 100644 index dc29674..0000000 Binary files a/custom/mods/ambience/sounds/coyote2.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/craw.ogg b/custom/mods/ambience/sounds/craw.ogg deleted file mode 100644 index f8b561b..0000000 Binary files a/custom/mods/ambience/sounds/craw.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/dark_ambiance.ogg b/custom/mods/ambience/sounds/dark_ambiance.ogg deleted file mode 100644 index 8f73327..0000000 Binary files a/custom/mods/ambience/sounds/dark_ambiance.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/deer.ogg b/custom/mods/ambience/sounds/deer.ogg deleted file mode 100644 index 792f5b6..0000000 Binary files a/custom/mods/ambience/sounds/deer.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/drippingwater_drip_a.ogg b/custom/mods/ambience/sounds/drippingwater_drip_a.ogg deleted file mode 100644 index 9d2eb2e..0000000 Binary files a/custom/mods/ambience/sounds/drippingwater_drip_a.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/drippingwater_drip_b.ogg b/custom/mods/ambience/sounds/drippingwater_drip_b.ogg deleted file mode 100644 index bb06e6c..0000000 Binary files a/custom/mods/ambience/sounds/drippingwater_drip_b.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/drippingwater_drip_c.ogg b/custom/mods/ambience/sounds/drippingwater_drip_c.ogg deleted file mode 100644 index d22972a..0000000 Binary files a/custom/mods/ambience/sounds/drippingwater_drip_c.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/drowning_gasp.ogg b/custom/mods/ambience/sounds/drowning_gasp.ogg deleted file mode 100644 index 9363998..0000000 Binary files a/custom/mods/ambience/sounds/drowning_gasp.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/earth01a.ogg b/custom/mods/ambience/sounds/earth01a.ogg deleted file mode 100644 index e9641d3..0000000 Binary files a/custom/mods/ambience/sounds/earth01a.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/eastern_feeling.ogg b/custom/mods/ambience/sounds/eastern_feeling.ogg deleted file mode 100644 index d691313..0000000 Binary files a/custom/mods/ambience/sounds/eastern_feeling.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/fiji_beach.ogg b/custom/mods/ambience/sounds/fiji_beach.ogg deleted file mode 100644 index ee02ae3..0000000 Binary files a/custom/mods/ambience/sounds/fiji_beach.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/frog.ogg b/custom/mods/ambience/sounds/frog.ogg deleted file mode 100644 index 84b0f15..0000000 Binary files a/custom/mods/ambience/sounds/frog.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/gull.ogg b/custom/mods/ambience/sounds/gull.ogg deleted file mode 100644 index 10b5588..0000000 Binary files a/custom/mods/ambience/sounds/gull.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/horned_owl.ogg b/custom/mods/ambience/sounds/horned_owl.ogg deleted file mode 100644 index 28e094a..0000000 Binary files a/custom/mods/ambience/sounds/horned_owl.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/lake_waves_2_calm.ogg b/custom/mods/ambience/sounds/lake_waves_2_calm.ogg deleted file mode 100644 index 05f3f33..0000000 Binary files a/custom/mods/ambience/sounds/lake_waves_2_calm.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/lake_waves_2_variety.ogg b/custom/mods/ambience/sounds/lake_waves_2_variety.ogg deleted file mode 100644 index 894c534..0000000 Binary files a/custom/mods/ambience/sounds/lake_waves_2_variety.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/peacock.ogg b/custom/mods/ambience/sounds/peacock.ogg deleted file mode 100644 index 1156e28..0000000 Binary files a/custom/mods/ambience/sounds/peacock.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/rainymemory.ogg b/custom/mods/ambience/sounds/rainymemory.ogg deleted file mode 100644 index 78635c7..0000000 Binary files a/custom/mods/ambience/sounds/rainymemory.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/robin2.ogg b/custom/mods/ambience/sounds/robin2.ogg deleted file mode 100644 index f5bab98..0000000 Binary files a/custom/mods/ambience/sounds/robin2.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/scuba1bubbles.ogg b/custom/mods/ambience/sounds/scuba1bubbles.ogg deleted file mode 100644 index 58c4b96..0000000 Binary files a/custom/mods/ambience/sounds/scuba1bubbles.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/scuba1calm.ogg b/custom/mods/ambience/sounds/scuba1calm.ogg deleted file mode 100644 index 057f320..0000000 Binary files a/custom/mods/ambience/sounds/scuba1calm.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/scuba1calm2.ogg b/custom/mods/ambience/sounds/scuba1calm2.ogg deleted file mode 100644 index b88edc7..0000000 Binary files a/custom/mods/ambience/sounds/scuba1calm2.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/scuba1interestingbubbles.ogg b/custom/mods/ambience/sounds/scuba1interestingbubbles.ogg deleted file mode 100644 index bf93627..0000000 Binary files a/custom/mods/ambience/sounds/scuba1interestingbubbles.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/scuba1tubulentbubbles.ogg b/custom/mods/ambience/sounds/scuba1tubulentbubbles.ogg deleted file mode 100644 index 4b1b009..0000000 Binary files a/custom/mods/ambience/sounds/scuba1tubulentbubbles.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/seagull.ogg b/custom/mods/ambience/sounds/seagull.ogg deleted file mode 100644 index 9dab963..0000000 Binary files a/custom/mods/ambience/sounds/seagull.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/small_waterfall.ogg b/custom/mods/ambience/sounds/small_waterfall.ogg deleted file mode 100644 index e8aaec1..0000000 Binary files a/custom/mods/ambience/sounds/small_waterfall.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/water_swimming_splashing.ogg b/custom/mods/ambience/sounds/water_swimming_splashing.ogg deleted file mode 100644 index 676d79c..0000000 Binary files a/custom/mods/ambience/sounds/water_swimming_splashing.ogg and /dev/null differ diff --git a/custom/mods/ambience/sounds/water_swimming_splashing_breath.ogg b/custom/mods/ambience/sounds/water_swimming_splashing_breath.ogg deleted file mode 100644 index 7752c70..0000000 Binary files a/custom/mods/ambience/sounds/water_swimming_splashing_breath.ogg and /dev/null differ diff --git a/custom/mods/ambience/todo.txt b/custom/mods/ambience/todo.txt deleted file mode 100644 index 4f95977..0000000 --- a/custom/mods/ambience/todo.txt +++ /dev/null @@ -1,11 +0,0 @@ -To Do: - --add random_volume parameter to night normal, day normal, & cave normal sounds to create feeling of distance. - -m-get constant birds more quiet during the day -m-bats seem way too frequent now? -m-when playing multiplayer seems to increase frequency of music & normal sounds to the point where they are obnoxious -m-which songs should go with which environments? Dark songs in caves or night, light sounds during day. -m-may be drowning out some of the normal sound effects like walking on stone. -l-what about other weird bubble -l-put in wind/ wind in trees during day and night diff --git a/custom/mods/experience/depends.txt b/custom/mods/experience/depends.txt deleted file mode 100644 index 7fb7337..0000000 --- a/custom/mods/experience/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default -nalc_lib -moreores? -technic? diff --git a/custom/mods/experience/init.lua b/custom/mods/experience/init.lua deleted file mode 100644 index 524bf43..0000000 --- a/custom/mods/experience/init.lua +++ /dev/null @@ -1,310 +0,0 @@ ---[[level1 = 100 -level1_drop = "default:steelblock 10" -]] - -local xp_table = {} -xp_table["default"] = { - "stone_with_coal 1", "stone_with_iron 1", "stone_with_copper 1", "stone_with_tin 1", - "stone_with_mese 2", "stone_with_gold 2", "stone_with_diamond 3" -} - -if minetest.get_modpath("moreores") then - xp_table["moreores"] = { - "mineral_silver 2", "mineral_mithril 4" - } -end - -if minetest.get_modpath("technic") then - xp_table["technic"] = { - "mineral_uranium 3", "mineral_chromium 2", "mineral_zinc 1" - } -end - -for mod, data in pairs(xp_table) do - for _, xp in ipairs(data) do - local tab = string.split(xp, " ") - nalc.def_xp(mod..":"..tab[1], tonumber(tab[2])) - end -end - -local players = {} - -MAX_HUD_EXPERIENCE = 40 - -minetest.register_on_joinplayer(function(player) - local playerName = player:get_player_name() - players[playerName] = { - - experiencebar = 0, - experiencetotal = 0, - textnumber = 0, - exphudnumber = 0, - hud = player:hud_add({ - hud_elem_type = "statbar", - position = {x=0.5,y=1}, - size = {x=20, y=5}, - text = "orb_hud.png", - number = 40, - alignment = {x=0,y=1}, - offset = {x=-200, y=-65}, - } - ), - - - hud2 = player:hud_add({ - hud_elem_type = "text", - name = "player_hud:time", - position = {x=0.5,y=1}, - text = "", - scale = {x=2,y=2}, - alignment = {x=0,y=1}, - number = 0xFF0000, --0xFFFFFF, - offset = {x=-240 , y=-65}, - } - ), - } -end) - -minetest.register_on_leaveplayer(function(player) - local playerName = player:get_player_name() - players[playerName] = nil -end) - - ---add an experience orb if player digs node from xp group -minetest.register_on_dignode(function(pos, oldnode, digger) - local namer = oldnode.name - local see_if_mineral = minetest.get_item_group(namer, "xp") - if see_if_mineral == 1 then - minetest.env:add_entity(pos, "experience:orb") - end - if see_if_mineral == 2 then - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - end - if see_if_mineral == 3 then - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - end - if see_if_mineral == 4 then - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - end - if see_if_mineral == 6 then - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - end - if see_if_mineral == 8 then - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - minetest.env:add_entity(pos, "experience:orb") - end -end) ---give a new player some xp -minetest.register_on_newplayer(function(player) - local file = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "w") - file:write("0") - file:close() -end) ---set player's xp level to 0 if they die -minetest.register_on_dieplayer(function(player) - local file = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "w") - file:write("0") - file:close() -end) - ---Allow people to collect orbs -minetest.register_globalstep(function(dtime) - - -local gameTime = minetest.get_gametime() - - - for _,player in ipairs(minetest.get_connected_players()) do - local pos = player:getpos() - pos.y = pos.y+0.5 - for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 1)) do - if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "experience:orb" then - --RIGHT HERE ADD IN THE CODE TO UPGRADE PLAYERS - object:setvelocity({x=0,y=0,z=0}) - object:get_luaentity().name = "STOP" - minetest.sound_play("orb", { - to_player = player:get_player_name(), - }) - - if io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "r") == nil then - local file = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "w") - file:write("1") - local experience = 1 - file:close() - else - - local xp = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "r") - local experience = xp:read("*l") - xp:close() - - if experience ~= nil then - local new_xp = experience + 1 - local xp_write = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "w") - xp_write:write(new_xp) - xp_write:close() - --[[if new_xp == level1 then - minetest.env:add_item(pos, level1_drop) - minetest.sound_play("level_up", { - to_player = player:get_player_name(), - }) - end - ]] - end - - end - - object:remove() - end - end - for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 3)) do - if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "experience:orb" then - if object:get_luaentity().collect then - local pos1 = pos - pos1.y = pos1.y+0.2 - local pos2 = object:getpos() - local vec = {x=pos1.x-pos2.x, y=pos1.y-pos2.y, z=pos1.z-pos2.z} - vec.x = vec.x*3 - vec.y = vec.y*3 - vec.z = vec.z*3 - object:setvelocity(vec) - end - end - end - - --Loop through all connected players - for playerName,playerInfo in pairs(players) do - local player = minetest.get_player_by_name(playerName) - if player ~= nil then - - - if playerInfo["textnumber"] == nil or playerInfo["textnumber"] <= 0 then - playerInfo["textnumber"] = 0 - player:hud_change(playerInfo["hud2"], "text", playerInfo["textnumber"]) - end - - if playerInfo["experiencetotal"] == nil then - playerInfo["experiencetotal"] = 0 - player:hud_change(playerInfo["hud2"], "text", playerInfo["textnumber"]) - end - - if playerInfo["experiencetotal"] == 0 then - playerInfo["textnumber"] = 0 - player:hud_change(playerInfo["hud2"], "text", playerInfo["textnumber"]) - end - - --[[ - local xptemp = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "r") - if xptemp ~= nil then - local xptemp2 = xptemp:read("*l") - end - if xptemp2 == nil then - local file = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "w") - file:write("0") - playerInfo["experiencetotal"] = 0 - playerInfo["textnumber"] = 0 - file:close() - end - ]] - - local xptemp = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "r") - if xptemp ~= nil then - local xptemp2 = xptemp:read("*l") - if xptemp2 ~= nil then - playerInfo["experiencetotal"] = xptemp2 - end - end - if xptemp ~= nil then - xptemp:close() - end - - - if (playerInfo["experiencetotal"]) ~= nil then - playerInfo["experiencebar"] = (playerInfo["experiencetotal"] - ((playerInfo["textnumber"]) * 40)) - end - - - --Update the players's hud xp bar - local numBars = (playerInfo["experiencebar"]/MAX_HUD_EXPERIENCE)*40 - player:hud_change(playerInfo["hud"], "number", numBars) - - while playerInfo["experiencebar"] >= MAX_HUD_EXPERIENCE do - playerInfo["textnumber"]= playerInfo["textnumber"] + 1 - player:hud_change(playerInfo["hud2"], "text", playerInfo["textnumber"]) - playerInfo["experiencebar"] = ((playerInfo["experiencetotal"]) - ((playerInfo["textnumber"]) * 40)) - local numBars = (playerInfo["experiencebar"]/MAX_HUD_EXPERIENCE)*40 - player:hud_change(playerInfo["hud"], "number", numBars) - end - - if playerInfo["experiencebar"] == 0 then - playerInfo["textnumber"] = 0 - player:hud_change(playerInfo["hud2"], "text", playerInfo["textnumber"]) - end - - - end - end - - end -end) - -minetest.register_entity("experience:orb", { - physical = true, - timer = 0, - textures = {"orb.png"}, - visual_size = {x=0.15, y=0.15}, - collisionbox = {-0.17,-0.17,-0.17,0.17,0.17,0.17}, - on_activate = function(self, staticdata) - self.object:set_armor_groups({immortal=1}) - self.object:setvelocity({x=0, y=1, z=0}) - self.object:setacceleration({x=0, y=-10, z=0}) - end, - collect = true, - on_step = function(self, dtime) - self.timer = self.timer + dtime - if (self.timer > 300) then - self.object:remove() - end - local p = self.object:getpos() - local nn = minetest.env:get_node(p).name - local noder = minetest.env:get_node(p).name - p.y = p.y - 0.3 - local nn = minetest.env:get_node(p).name - if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable then - if self.physical_state then - self.object:setvelocity({x=0, y=0, z=0}) - self.object:setacceleration({x=0, y=0, z=0}) - self.physical_state = false - self.object:set_properties({ - physical = false - }) - end - else - if not self.physical_state then - self.object:setvelocity({x=0,y=0,z=0}) - self.object:setacceleration({x=0, y=-10, z=0}) - self.physical_state = true - self.object:set_properties({ - physical = true - }) - end - end - end, -}) diff --git a/custom/mods/experience/sounds/attributes.txt b/custom/mods/experience/sounds/attributes.txt deleted file mode 100644 index e9fc445..0000000 --- a/custom/mods/experience/sounds/attributes.txt +++ /dev/null @@ -1 +0,0 @@ -http://www.freesound.org/people/partymix/sounds/24102/ diff --git a/custom/mods/experience/sounds/level_up.ogg b/custom/mods/experience/sounds/level_up.ogg deleted file mode 100644 index c6eeb6e..0000000 Binary files a/custom/mods/experience/sounds/level_up.ogg and /dev/null differ diff --git a/custom/mods/experience/sounds/orb.1.ogg b/custom/mods/experience/sounds/orb.1.ogg deleted file mode 100644 index 48b32a1..0000000 Binary files a/custom/mods/experience/sounds/orb.1.ogg and /dev/null differ diff --git a/custom/mods/experience/sounds/orb.2.ogg b/custom/mods/experience/sounds/orb.2.ogg deleted file mode 100644 index 6f6c2bd..0000000 Binary files a/custom/mods/experience/sounds/orb.2.ogg and /dev/null differ diff --git a/custom/mods/experience/sounds/orb.3.ogg b/custom/mods/experience/sounds/orb.3.ogg deleted file mode 100644 index 3a9d69a..0000000 Binary files a/custom/mods/experience/sounds/orb.3.ogg and /dev/null differ diff --git a/custom/mods/experience/sounds/orb.4.ogg b/custom/mods/experience/sounds/orb.4.ogg deleted file mode 100644 index 2a953a1..0000000 Binary files a/custom/mods/experience/sounds/orb.4.ogg and /dev/null differ diff --git a/custom/mods/experience/textures/orb.png b/custom/mods/experience/textures/orb.png deleted file mode 100644 index 5a97cc8..0000000 Binary files a/custom/mods/experience/textures/orb.png and /dev/null differ diff --git a/custom/mods/experience/textures/orb_hud.png b/custom/mods/experience/textures/orb_hud.png deleted file mode 100644 index de9fd5e..0000000 Binary files a/custom/mods/experience/textures/orb_hud.png and /dev/null differ diff --git a/custom/mods/nalc/modpack.txt b/custom/mods/nalc/modpack.txt deleted file mode 100644 index e69de29..0000000 diff --git a/custom/mods/nalc/nalc_hardtrees/depends.txt b/custom/mods/nalc/nalc_hardtrees/depends.txt deleted file mode 100644 index aeb077e..0000000 --- a/custom/mods/nalc/nalc_hardtrees/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -nalc_lib -default -cherry_tree? -moretrees? diff --git a/custom/mods/nalc/nalc_hardtrees/init.lua b/custom/mods/nalc/nalc_hardtrees/init.lua deleted file mode 100644 index e138d7d..0000000 --- a/custom/mods/nalc/nalc_hardtrees/init.lua +++ /dev/null @@ -1,65 +0,0 @@ ---[[ Auteur : sys4 - - Ce mod permet de : - - Ne plus casser les arbres à la main - - Supprimer haches et pioches en bois. - - Fabriquer les outils en pierre avec du silex trouvé dans le gravier - - Remarque : Les sticks sont obtenables grâce au mod youngtrees de plantlife_modpack -]] - --- Suppression des haches et pioches en bois -minetest.unregister_item("default:axe_wood") -minetest.unregister_item("default:pick_wood") - --- Suppression du groupe oddly_breakable_by_hand pour les nodes en bois -local wood_nodes = {} -wood_nodes["default"] = { - "tree", "pine_tree", "jungletree", "acacia_tree", "aspen_tree", - "bush_stem", "acacia_bush_stem", - "wood", "pine_wood", "junglewood", "acacia_wood", "aspen_wood", -} - -if minetest.get_modpath("cherry_tree") then - wood_nodes["cherry_tree"] = {"cherry_tree", "cherry_plank"} -end - -if minetest.get_modpath("moretrees") and moretrees then - wood_nodes["moretrees"] = {} - local treelist = moretrees.treelist - local j = 1 - for i in ipairs(treelist) do - if treelist[i][1] ~= "poplar_small" then - wood_nodes["moretrees"][j] = treelist[i][1].."_trunk" - wood_nodes["moretrees"][j+1] = treelist[i][1].."_planks" - j = j+2 - end - end - -- rubber_tree_trunk_empty - wood_nodes["moretrees"][#wood_nodes["moretrees"]+1] = "rubber_tree_trunk_empty" -end - -for mod, nodes in pairs(wood_nodes) do - for _,name in ipairs(nodes) do - nalc.not_hand_breakable(mod..":"..name) - end -end - --- Recette de craft pour pioche et hache avec du silex -minetest.register_craft({ - output = "default:axe_stone", - recipe = { - {"default:flint", "default:flint", ""}, - {"default:flint", "default:stick", ""}, - {"", "default:stick", ""}, - } -}) - -minetest.register_craft({ - output = "default:pick_stone", - recipe = { - {"default:flint", "default:flint", "default:flint"}, - {"", "default:stick", ""}, - {"", "default:stick", ""}, - } -}) diff --git a/custom/mods/nalc/nalc_lib/depends.txt b/custom/mods/nalc/nalc_lib/depends.txt deleted file mode 100644 index e69de29..0000000 diff --git a/custom/mods/nalc/nalc_lib/init.lua b/custom/mods/nalc/nalc_lib/init.lua deleted file mode 100644 index 9620388..0000000 --- a/custom/mods/nalc/nalc_lib/init.lua +++ /dev/null @@ -1,49 +0,0 @@ -nalc = {} - --- Remove node from a group -local function remove_group(name, group) - local node = minetest.registered_nodes[name] - - if node then - local groups = node.groups - if groups then - for g in pairs(groups) do - if g == group then - groups[g] = 0 - minetest.log("action", "[nalc_lib] "..name.." removed from group "..group..".") - end - end - minetest.override_item(name, {groups = groups}) - else - minetest.log("warning", "[nalc_lib] "..name.." has no groups, could not remove group "..group..".") - end - else - minetest.log("warning", "[nalc_lib] "..name.." not registered, could not remove group "..group..".") - end -end - --- Add node to group -local function add_group(name, group, value) - local node = minetest.registered_nodes[name] - - if node then - local groups = node.groups - if not groups then - groups = {} - end - groups[group] = value - - minetest.log("action", "[nalc_lib] Add group "..group.."="..value.." to "..name) - minetest.override_item(name, {groups = groups}) - end -end - --- Add a node in xp group -function nalc.def_xp(name, value) - add_group(name, "xp", value) -end - --- Remove node from group "oddly_breakable_by_hand" -function nalc.not_hand_breakable(name) - remove_group(name, "oddly_breakable_by_hand") -end diff --git a/custom/textures/3d_armor/3d_armor_boots_admin.png b/custom/textures/3d_armor/3d_armor_boots_admin.png deleted file mode 100644 index e9fa153..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_admin_preview.png b/custom/textures/3d_armor/3d_armor_boots_admin_preview.png deleted file mode 100644 index 9ef1884..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_admin_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_bronze.png b/custom/textures/3d_armor/3d_armor_boots_bronze.png deleted file mode 100644 index 05fb1e8..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_bronze_preview.png b/custom/textures/3d_armor/3d_armor_boots_bronze_preview.png deleted file mode 100644 index 5b00282..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_bronze_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_cactus.png b/custom/textures/3d_armor/3d_armor_boots_cactus.png deleted file mode 100644 index a4d8d8f..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_cactus_preview.png b/custom/textures/3d_armor/3d_armor_boots_cactus_preview.png deleted file mode 100644 index b77493d..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_cactus_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_crystal.png b/custom/textures/3d_armor/3d_armor_boots_crystal.png deleted file mode 100644 index c4ccdc2..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_crystal_preview.png b/custom/textures/3d_armor/3d_armor_boots_crystal_preview.png deleted file mode 100755 index 494c6ee..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_crystal_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_diamond.png b/custom/textures/3d_armor/3d_armor_boots_diamond.png deleted file mode 100644 index c37e2e7..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_diamond_preview.png b/custom/textures/3d_armor/3d_armor_boots_diamond_preview.png deleted file mode 100644 index b7e01d4..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_diamond_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_gold.png b/custom/textures/3d_armor/3d_armor_boots_gold.png deleted file mode 100644 index 17992c2..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_gold_preview.png b/custom/textures/3d_armor/3d_armor_boots_gold_preview.png deleted file mode 100644 index c6b55b2..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_gold_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_mithril.png b/custom/textures/3d_armor/3d_armor_boots_mithril.png deleted file mode 100644 index 0004786..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_mithril_preview.png b/custom/textures/3d_armor/3d_armor_boots_mithril_preview.png deleted file mode 100644 index 308194f..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_mithril_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_steel.png b/custom/textures/3d_armor/3d_armor_boots_steel.png deleted file mode 100644 index 0a7e2cb..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_steel_preview.png b/custom/textures/3d_armor/3d_armor_boots_steel_preview.png deleted file mode 100644 index c73a6e8..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_steel_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_wood.png b/custom/textures/3d_armor/3d_armor_boots_wood.png deleted file mode 100644 index 50371af..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_boots_wood_preview.png b/custom/textures/3d_armor/3d_armor_boots_wood_preview.png deleted file mode 100644 index 7f12ffb..0000000 Binary files a/custom/textures/3d_armor/3d_armor_boots_wood_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_admin.png b/custom/textures/3d_armor/3d_armor_chestplate_admin.png deleted file mode 100644 index ff580a3..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_admin_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_admin_preview.png deleted file mode 100644 index 59d729b..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_admin_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_bronze.png b/custom/textures/3d_armor/3d_armor_chestplate_bronze.png deleted file mode 100644 index 6a6957e..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_bronze_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_bronze_preview.png deleted file mode 100644 index d8b1478..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_bronze_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_cactus.png b/custom/textures/3d_armor/3d_armor_chestplate_cactus.png deleted file mode 100755 index 49c07dd..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_cactus_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_cactus_preview.png deleted file mode 100644 index bfde0c2..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_cactus_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_crystal.png b/custom/textures/3d_armor/3d_armor_chestplate_crystal.png deleted file mode 100644 index 9ed661a..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_crystal_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_crystal_preview.png deleted file mode 100755 index febb1dc..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_crystal_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_diamond.png b/custom/textures/3d_armor/3d_armor_chestplate_diamond.png deleted file mode 100644 index a1750b6..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_diamond_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_diamond_preview.png deleted file mode 100644 index 69b13f6..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_diamond_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_gold.png b/custom/textures/3d_armor/3d_armor_chestplate_gold.png deleted file mode 100644 index dd872ab..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_gold_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_gold_preview.png deleted file mode 100644 index 9381b9e..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_gold_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_mithril.png b/custom/textures/3d_armor/3d_armor_chestplate_mithril.png deleted file mode 100644 index a8193fb..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_mithril_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_mithril_preview.png deleted file mode 100644 index 993b9d2..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_mithril_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_steel.png b/custom/textures/3d_armor/3d_armor_chestplate_steel.png deleted file mode 100644 index ee1a73a..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_steel_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_steel_preview.png deleted file mode 100644 index 33fb2ab..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_steel_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_wood.png b/custom/textures/3d_armor/3d_armor_chestplate_wood.png deleted file mode 100644 index b39be33..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_chestplate_wood_preview.png b/custom/textures/3d_armor/3d_armor_chestplate_wood_preview.png deleted file mode 100644 index 02b1f31..0000000 Binary files a/custom/textures/3d_armor/3d_armor_chestplate_wood_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_admin.png b/custom/textures/3d_armor/3d_armor_helmet_admin.png deleted file mode 100644 index 37e3bb9..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_admin_preview.png b/custom/textures/3d_armor/3d_armor_helmet_admin_preview.png deleted file mode 100644 index d653a25..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_admin_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_bronze.png b/custom/textures/3d_armor/3d_armor_helmet_bronze.png deleted file mode 100644 index 4f50d22..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_bronze_preview.png b/custom/textures/3d_armor/3d_armor_helmet_bronze_preview.png deleted file mode 100644 index ae44bfb..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_bronze_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_cactus.png b/custom/textures/3d_armor/3d_armor_helmet_cactus.png deleted file mode 100644 index 80dfeae..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_cactus_preview.png b/custom/textures/3d_armor/3d_armor_helmet_cactus_preview.png deleted file mode 100644 index ab3ad6e..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_cactus_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_crystal.png b/custom/textures/3d_armor/3d_armor_helmet_crystal.png deleted file mode 100644 index f8ef044..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_crystal_preview.png b/custom/textures/3d_armor/3d_armor_helmet_crystal_preview.png deleted file mode 100755 index 9c1735a..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_crystal_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_diamond.png b/custom/textures/3d_armor/3d_armor_helmet_diamond.png deleted file mode 100644 index 6ce507c..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_diamond_preview.png b/custom/textures/3d_armor/3d_armor_helmet_diamond_preview.png deleted file mode 100644 index 4dd76c1..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_diamond_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_gold.png b/custom/textures/3d_armor/3d_armor_helmet_gold.png deleted file mode 100644 index eac5e6e..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_gold_preview.png b/custom/textures/3d_armor/3d_armor_helmet_gold_preview.png deleted file mode 100644 index f721408..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_gold_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_mithril.png b/custom/textures/3d_armor/3d_armor_helmet_mithril.png deleted file mode 100644 index 909154e..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_mithril_preview.png b/custom/textures/3d_armor/3d_armor_helmet_mithril_preview.png deleted file mode 100644 index 567a7ec..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_mithril_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_steel.png b/custom/textures/3d_armor/3d_armor_helmet_steel.png deleted file mode 100644 index 2571105..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_steel_preview.png b/custom/textures/3d_armor/3d_armor_helmet_steel_preview.png deleted file mode 100644 index bcc9398..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_steel_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_wood.png b/custom/textures/3d_armor/3d_armor_helmet_wood.png deleted file mode 100755 index 66b484a..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_helmet_wood_preview.png b/custom/textures/3d_armor/3d_armor_helmet_wood_preview.png deleted file mode 100644 index 36a8976..0000000 Binary files a/custom/textures/3d_armor/3d_armor_helmet_wood_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_admin.png b/custom/textures/3d_armor/3d_armor_inv_boots_admin.png deleted file mode 100644 index b124c88..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_bronze.png b/custom/textures/3d_armor/3d_armor_inv_boots_bronze.png deleted file mode 100644 index 1f66bf9..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_cactus.png b/custom/textures/3d_armor/3d_armor_inv_boots_cactus.png deleted file mode 100644 index a5ec82c..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_crystal.png b/custom/textures/3d_armor/3d_armor_inv_boots_crystal.png deleted file mode 100755 index 68cb6d1..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_diamond.png b/custom/textures/3d_armor/3d_armor_inv_boots_diamond.png deleted file mode 100644 index 262489c..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_gold.png b/custom/textures/3d_armor/3d_armor_inv_boots_gold.png deleted file mode 100644 index 00385cd..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_mithril.png b/custom/textures/3d_armor/3d_armor_inv_boots_mithril.png deleted file mode 100644 index f57efc0..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_steel.png b/custom/textures/3d_armor/3d_armor_inv_boots_steel.png deleted file mode 100644 index 0a89d92..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_boots_wood.png b/custom/textures/3d_armor/3d_armor_inv_boots_wood.png deleted file mode 100644 index b6a9244..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_boots_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_admin.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_admin.png deleted file mode 100644 index ee6254c..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_bronze.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_bronze.png deleted file mode 100644 index 9ce96bc..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_cactus.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_cactus.png deleted file mode 100644 index eabccce..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_crystal.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_crystal.png deleted file mode 100755 index d14de1b..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_diamond.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_diamond.png deleted file mode 100644 index 73ae2f9..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_gold.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_gold.png deleted file mode 100644 index 387f526..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_mithril.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_mithril.png deleted file mode 100644 index f2cd956..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_steel.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_steel.png deleted file mode 100644 index 32b5ab4..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_chestplate_wood.png b/custom/textures/3d_armor/3d_armor_inv_chestplate_wood.png deleted file mode 100644 index c746491..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_chestplate_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_admin.png b/custom/textures/3d_armor/3d_armor_inv_helmet_admin.png deleted file mode 100644 index 0eaf9ee..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_bronze.png b/custom/textures/3d_armor/3d_armor_inv_helmet_bronze.png deleted file mode 100644 index 39418bd..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_cactus.png b/custom/textures/3d_armor/3d_armor_inv_helmet_cactus.png deleted file mode 100644 index ca66318..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_crystal.png b/custom/textures/3d_armor/3d_armor_inv_helmet_crystal.png deleted file mode 100755 index 5b9d031..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_diamond.png b/custom/textures/3d_armor/3d_armor_inv_helmet_diamond.png deleted file mode 100644 index c0a6f11..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_gold.png b/custom/textures/3d_armor/3d_armor_inv_helmet_gold.png deleted file mode 100644 index e4edc1f..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_mithril.png b/custom/textures/3d_armor/3d_armor_inv_helmet_mithril.png deleted file mode 100644 index 259f249..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_steel.png b/custom/textures/3d_armor/3d_armor_inv_helmet_steel.png deleted file mode 100644 index 519ef9a..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_helmet_wood.png b/custom/textures/3d_armor/3d_armor_inv_helmet_wood.png deleted file mode 100644 index fbeea44..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_helmet_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_admin.png b/custom/textures/3d_armor/3d_armor_inv_leggings_admin.png deleted file mode 100644 index 9358e26..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_bronze.png b/custom/textures/3d_armor/3d_armor_inv_leggings_bronze.png deleted file mode 100644 index 75bd902..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_cactus.png b/custom/textures/3d_armor/3d_armor_inv_leggings_cactus.png deleted file mode 100644 index 734907f..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_crystal.png b/custom/textures/3d_armor/3d_armor_inv_leggings_crystal.png deleted file mode 100755 index 7ed14fe..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_diamond.png b/custom/textures/3d_armor/3d_armor_inv_leggings_diamond.png deleted file mode 100644 index b0cf151..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_gold.png b/custom/textures/3d_armor/3d_armor_inv_leggings_gold.png deleted file mode 100644 index ff38e6c..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_mithril.png b/custom/textures/3d_armor/3d_armor_inv_leggings_mithril.png deleted file mode 100644 index a0f8a05..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_steel.png b/custom/textures/3d_armor/3d_armor_inv_leggings_steel.png deleted file mode 100644 index 5f95a1b..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_inv_leggings_wood.png b/custom/textures/3d_armor/3d_armor_inv_leggings_wood.png deleted file mode 100644 index 32a19e2..0000000 Binary files a/custom/textures/3d_armor/3d_armor_inv_leggings_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_admin.png b/custom/textures/3d_armor/3d_armor_leggings_admin.png deleted file mode 100644 index 2840034..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_admin.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_admin_preview.png b/custom/textures/3d_armor/3d_armor_leggings_admin_preview.png deleted file mode 100644 index 7900a4c..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_admin_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_bronze.png b/custom/textures/3d_armor/3d_armor_leggings_bronze.png deleted file mode 100644 index 99ebdaa..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_bronze.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_bronze_preview.png b/custom/textures/3d_armor/3d_armor_leggings_bronze_preview.png deleted file mode 100644 index 73f7a11..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_bronze_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_cactus.png b/custom/textures/3d_armor/3d_armor_leggings_cactus.png deleted file mode 100644 index 6b50367..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_cactus.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_cactus_preview.png b/custom/textures/3d_armor/3d_armor_leggings_cactus_preview.png deleted file mode 100644 index 1bc7ffa..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_cactus_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_crystal.png b/custom/textures/3d_armor/3d_armor_leggings_crystal.png deleted file mode 100644 index 26793a7..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_crystal.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_crystal_preview.png b/custom/textures/3d_armor/3d_armor_leggings_crystal_preview.png deleted file mode 100755 index 31ed4f4..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_crystal_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_diamond.png b/custom/textures/3d_armor/3d_armor_leggings_diamond.png deleted file mode 100644 index ba7659f..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_diamond.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_diamond_preview.png b/custom/textures/3d_armor/3d_armor_leggings_diamond_preview.png deleted file mode 100644 index af43c4e..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_diamond_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_gold.png b/custom/textures/3d_armor/3d_armor_leggings_gold.png deleted file mode 100644 index 0e513cb..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_gold.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_gold_preview.png b/custom/textures/3d_armor/3d_armor_leggings_gold_preview.png deleted file mode 100644 index 101eb14..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_gold_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_mithril.png b/custom/textures/3d_armor/3d_armor_leggings_mithril.png deleted file mode 100644 index 9302b93..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_mithril.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_mithril_preview.png b/custom/textures/3d_armor/3d_armor_leggings_mithril_preview.png deleted file mode 100644 index 734564e..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_mithril_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_steel.png b/custom/textures/3d_armor/3d_armor_leggings_steel.png deleted file mode 100644 index b04a4d8..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_steel.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_steel_preview.png b/custom/textures/3d_armor/3d_armor_leggings_steel_preview.png deleted file mode 100644 index 8ad4aff..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_steel_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_wood.png b/custom/textures/3d_armor/3d_armor_leggings_wood.png deleted file mode 100644 index e4c8e94..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_wood.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_leggings_wood_preview.png b/custom/textures/3d_armor/3d_armor_leggings_wood_preview.png deleted file mode 100644 index 5f40278..0000000 Binary files a/custom/textures/3d_armor/3d_armor_leggings_wood_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_trans.png b/custom/textures/3d_armor/3d_armor_trans.png deleted file mode 100755 index 4d7beb8..0000000 Binary files a/custom/textures/3d_armor/3d_armor_trans.png and /dev/null differ diff --git a/custom/textures/3d_armor/3d_armor_ui_form.png b/custom/textures/3d_armor/3d_armor_ui_form.png deleted file mode 100644 index 6998031..0000000 Binary files a/custom/textures/3d_armor/3d_armor_ui_form.png and /dev/null differ diff --git a/custom/textures/3d_armor/character_preview.png b/custom/textures/3d_armor/character_preview.png deleted file mode 100644 index 23d6464..0000000 Binary files a/custom/textures/3d_armor/character_preview.png and /dev/null differ diff --git a/custom/textures/3d_armor/inventory_plus_armor.png b/custom/textures/3d_armor/inventory_plus_armor.png deleted file mode 100755 index 6cde640..0000000 Binary files a/custom/textures/3d_armor/inventory_plus_armor.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_admin.png b/custom/textures/shields/shields_inv_shield_admin.png deleted file mode 100755 index eb9a0cd..0000000 Binary files a/custom/textures/shields/shields_inv_shield_admin.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_black_mithril_warrior.png b/custom/textures/shields/shields_inv_shield_black_mithril_warrior.png deleted file mode 100644 index c4e9c9a..0000000 Binary files a/custom/textures/shields/shields_inv_shield_black_mithril_warrior.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_bronze.png b/custom/textures/shields/shields_inv_shield_bronze.png deleted file mode 100755 index ae70293..0000000 Binary files a/custom/textures/shields/shields_inv_shield_bronze.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_cactus.png b/custom/textures/shields/shields_inv_shield_cactus.png deleted file mode 100755 index e06ff5b..0000000 Binary files a/custom/textures/shields/shields_inv_shield_cactus.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_crystal.png b/custom/textures/shields/shields_inv_shield_crystal.png deleted file mode 100644 index fdc5f32..0000000 Binary files a/custom/textures/shields/shields_inv_shield_crystal.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_diamond.png b/custom/textures/shields/shields_inv_shield_diamond.png deleted file mode 100755 index 0d54498..0000000 Binary files a/custom/textures/shields/shields_inv_shield_diamond.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_enhanced_cactus.png b/custom/textures/shields/shields_inv_shield_enhanced_cactus.png deleted file mode 100755 index 6bbe19f..0000000 Binary files a/custom/textures/shields/shields_inv_shield_enhanced_cactus.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_enhanced_wood.png b/custom/textures/shields/shields_inv_shield_enhanced_wood.png deleted file mode 100755 index bd2bebc..0000000 Binary files a/custom/textures/shields/shields_inv_shield_enhanced_wood.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_gold.png b/custom/textures/shields/shields_inv_shield_gold.png deleted file mode 100755 index 30f4d79..0000000 Binary files a/custom/textures/shields/shields_inv_shield_gold.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_mithril.png b/custom/textures/shields/shields_inv_shield_mithril.png deleted file mode 100644 index 2e0a767..0000000 Binary files a/custom/textures/shields/shields_inv_shield_mithril.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_steel.png b/custom/textures/shields/shields_inv_shield_steel.png deleted file mode 100755 index b39120e..0000000 Binary files a/custom/textures/shields/shields_inv_shield_steel.png and /dev/null differ diff --git a/custom/textures/shields/shields_inv_shield_wood.png b/custom/textures/shields/shields_inv_shield_wood.png deleted file mode 100755 index da40020..0000000 Binary files a/custom/textures/shields/shields_inv_shield_wood.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_admin.png b/custom/textures/shields/shields_shield_admin.png deleted file mode 100644 index 8b466d3..0000000 Binary files a/custom/textures/shields/shields_shield_admin.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_admin_preview.png b/custom/textures/shields/shields_shield_admin_preview.png deleted file mode 100644 index 86d2f9b..0000000 Binary files a/custom/textures/shields/shields_shield_admin_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_blackmithril.png b/custom/textures/shields/shields_shield_blackmithril.png deleted file mode 100755 index f19048a..0000000 Binary files a/custom/textures/shields/shields_shield_blackmithril.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_blackmithril_preview.png b/custom/textures/shields/shields_shield_blackmithril_preview.png deleted file mode 100644 index 64f58e6..0000000 Binary files a/custom/textures/shields/shields_shield_blackmithril_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_bronze.png b/custom/textures/shields/shields_shield_bronze.png deleted file mode 100644 index 1f25ada..0000000 Binary files a/custom/textures/shields/shields_shield_bronze.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_bronze_preview.png b/custom/textures/shields/shields_shield_bronze_preview.png deleted file mode 100644 index 18acce9..0000000 Binary files a/custom/textures/shields/shields_shield_bronze_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_cactus.png b/custom/textures/shields/shields_shield_cactus.png deleted file mode 100644 index 19cca87..0000000 Binary files a/custom/textures/shields/shields_shield_cactus.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_cactus_preview.png b/custom/textures/shields/shields_shield_cactus_preview.png deleted file mode 100644 index 67cc4de..0000000 Binary files a/custom/textures/shields/shields_shield_cactus_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_crystal.png b/custom/textures/shields/shields_shield_crystal.png deleted file mode 100644 index c991a28..0000000 Binary files a/custom/textures/shields/shields_shield_crystal.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_crystal_preview.png b/custom/textures/shields/shields_shield_crystal_preview.png deleted file mode 100644 index 2fd8d8d..0000000 Binary files a/custom/textures/shields/shields_shield_crystal_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_diamond.png b/custom/textures/shields/shields_shield_diamond.png deleted file mode 100644 index dc6a7d2..0000000 Binary files a/custom/textures/shields/shields_shield_diamond.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_diamond_preview.png b/custom/textures/shields/shields_shield_diamond_preview.png deleted file mode 100644 index 6ea838a..0000000 Binary files a/custom/textures/shields/shields_shield_diamond_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_enhanced_cactus.png b/custom/textures/shields/shields_shield_enhanced_cactus.png deleted file mode 100644 index fe81651..0000000 Binary files a/custom/textures/shields/shields_shield_enhanced_cactus.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_enhanced_cactus_preview.png b/custom/textures/shields/shields_shield_enhanced_cactus_preview.png deleted file mode 100644 index 0da7f56..0000000 Binary files a/custom/textures/shields/shields_shield_enhanced_cactus_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_enhanced_wood.png b/custom/textures/shields/shields_shield_enhanced_wood.png deleted file mode 100644 index a86c4fd..0000000 Binary files a/custom/textures/shields/shields_shield_enhanced_wood.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_enhanced_wood_preview.png b/custom/textures/shields/shields_shield_enhanced_wood_preview.png deleted file mode 100644 index adfe1a6..0000000 Binary files a/custom/textures/shields/shields_shield_enhanced_wood_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_gold.png b/custom/textures/shields/shields_shield_gold.png deleted file mode 100644 index abfc7a1..0000000 Binary files a/custom/textures/shields/shields_shield_gold.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_gold_preview.png b/custom/textures/shields/shields_shield_gold_preview.png deleted file mode 100644 index 94317c6..0000000 Binary files a/custom/textures/shields/shields_shield_gold_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_mithril.png b/custom/textures/shields/shields_shield_mithril.png deleted file mode 100644 index d64a144..0000000 Binary files a/custom/textures/shields/shields_shield_mithril.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_mithril_preview.png b/custom/textures/shields/shields_shield_mithril_preview.png deleted file mode 100644 index 209dc80..0000000 Binary files a/custom/textures/shields/shields_shield_mithril_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_steel.png b/custom/textures/shields/shields_shield_steel.png deleted file mode 100644 index df54f9c..0000000 Binary files a/custom/textures/shields/shields_shield_steel.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_steel_preview.png b/custom/textures/shields/shields_shield_steel_preview.png deleted file mode 100644 index b922bf8..0000000 Binary files a/custom/textures/shields/shields_shield_steel_preview.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_wood.png b/custom/textures/shields/shields_shield_wood.png deleted file mode 100644 index 4646e3d..0000000 Binary files a/custom/textures/shields/shields_shield_wood.png and /dev/null differ diff --git a/custom/textures/shields/shields_shield_wood_preview.png b/custom/textures/shields/shields_shield_wood_preview.png deleted file mode 100644 index 2197248..0000000 Binary files a/custom/textures/shields/shields_shield_wood_preview.png and /dev/null differ diff --git a/doc/mtsatellite.org b/doc/mtsatellite.org index d1ba62b..36d98fe 100644 --- a/doc/mtsatellite.org +++ b/doc/mtsatellite.org @@ -28,7 +28,7 @@ ** Création d'un deuxième serveur Minetest Nous sommes logué en tant qu'utilisateur minetest sur notre serveur #+BEGIN_EXAMPLE - -- Récupération des sources du serveur minetest + -- Récupération des sources du serveur nalc $ cd $ git clone --depth 1 https://sys4.fr/gitea/nalc/nalc-server.git nalc-1 diff --git a/minetest-0.4.conf b/minetest-0.4.conf new file mode 100644 index 0000000..4721b1e --- /dev/null +++ b/minetest-0.4.conf @@ -0,0 +1,297 @@ +### GENERAL SETTINGS SERVER ### +############################### +name = admin +# Logs parameters - 0 = none, 1 = warning, 2 = action, 3 = info, 4 = verbose +debug_log_level = action +# Profiling (mod needed because the minetest cmdline sucks) +profiler.load = true +# profilerdumper.interval = 300 +# Permet aux vieux client de minetest de ce connecter +strict_protocol_version_checking = true +# Options pour le type du serveur +creative_mode = false +enable_damage = true +disallow_empty_password = true +server_dedicated = true +ipv6_server = true +# 1 day-night cycle lasts 24 minutes instead of 20. +time_speed = 30 +# Slightly higher player limit by default. +max_users = 10 +# Give basics privileges to new players. +default_privs = home, spawn, faction_user +# If true, actions are recorded for rollback +enable_rollback_recording = true +# Activate fire +disable_fire = true +# Enable TNT +enable_tnt = true +# Si false, les pseudos des joueurs sont cachés à partir d'une distance de 50 blocs +unlimited_player_transfer_distance = false +# Activated the minimap usage if true +enable_minimap = true +# Fix the deleted item when die if your bags/craft grid/inventory is full +#max_objects_per_block = 150 # default value is 49 +#max_forceloaded_blocks = 100 + +### SERVER SETTINGS FOR IMPROVED PERFORMANCE ### +################################################ +#max_block_generate_distance = 16 # 4 for better performances +max_block_send_distance = 8 # 6 for better performances +max_simultaneous_block_sends_per_client = 10 # 6 for better performances +max_simultaneous_block_sends_server_total = 125 # 125 for better performances +#time_send_interval = 10 +active_block_range = 1 +server_map_save_interval = 15.3 +sqlite_synchronous = 0 + +### SERVER AND PUBLIC INFORMATIONS ### +###################################### +server_name = NotreAmiLeCube (Survival & PVP) [FR/EN] +server_description = Server hosted by sys4. This highly modded server is intended to be balanced and offers you multiple possibilities in the way you play. Be a builder, engineer, warrior or even a magician. The possibilities are almost endless. But be warned, surviving it will be a real challenge. [This server is a fork from MinetestForFun Classic] +motd = Welcome to "NotreAmiLeCube (Survival & PVP) [EN/FR]" server! / Bienvenue sur le serveur "NotreAmiLeCube (Survie & PVP) [FR/EN]" ! +serverlist_url = servers.minetest.net +server_url = https://nalc.sys4.fr +server_announce = false +server_address = nalc.sys4.fr +port = 30002 +# curl default 5sec but timeout, fix to 15sec +curl_timeout = 15000 + +### MOVEMENT MODIFICATIONS ### +############################## +# Slightly decreased compared to minetest_next. +#movement_acceleration_default = 2.4 +# Same acceleration in air and on the ground, to fix some movement glitches. Also is easier to play. +#movement_acceleration_air = 1.2 +# Almost instant acceleration in fast mode for more control. +#movement_acceleration_fast = 24 +# Walking is 20 % faster than in minetest_game. Makes playing without the "fast" privilege less boring. +#movement_speed_walk = 4.8 +# Half the speed of walking, just like the animation. +#movement_speed_crouch = 2.4 +# 5 times faster than walking. +#movement_speed_fast = 24 +# Makes climbing speed faster than rising in the water. Also makes ladders more useful. +#movement_speed_climb = 4.8 +# Faster movement in liquids. Jumping at the water surface also speeds up swimming. +#movement_liquid_fluidity = 1.6 (default = 1) +# Ralentissement à la surface de l'eau +#movement_liquid_fluidity_smooth = 0.5 +# Vitesse à laquelle le joueur coule +#movement_liquid_sink = 15 +# Slightly less gravity. +#movement_gravity = 9.5 +# Jump height slightly reduced. +#movement_speed_jump = 6.5 +# Emplacement du static spawn point +static_spawnpoint = 144, 25, 261 +# Emplacment du static spawn pour le nether +nether_static_spawnpoint = 79, -20018, -45 +# Désactivation de l'anti-cheat qui fait ce téléporter en arrière si l'on va trop vite +disable_anticheat = true + +### WORLD MODIFICATIONS ### +########################### +# A chosen map seed for a new map, leave empty for random +#fixed_map_seed = 13107546752813893513 +fixed_map_seed = 1681440164076556961 +# Enable dungeons on new worlds. +mg_flags = trees, caves, dungeons, decorations +# Enable jungles on new worlds, disable biome blend and mud flow (faster, looks better). +mgv6_spflags = jungles, nobiomeblend, nomudflow +# Less deserts, more beaches. +#mgv6_freq_desert = 0.6 +#mgv6_freq_beach = -0.15 +# Tweeked "valleys" mapgen +#mg_biome_np_heat = 50, 50, (350,350,350), 5349, 3, 0.5, 2.0 +#mg_biome_np_humidity = 50, 50, (350,350,350), 842, 3, 0.5, 2.0 +mg_name = valleys +mg_valleys_spflags = altitude_chill,humid_rivers +mgvalleys_altitude_chill = 90 +mgvalleys_large_cave_depth = -33 +mgvalleys_lava_features = 0 +mgvalleys_massive_cave_depth = -256 +mgvalleys_river_depth = 4 +mgvalleys_river_size = 5 +mgvalleys_water_features = 0 +mgvalleys_cave_width = 0.09 + + +### MODS PARAMETERS ### +####################### + +secure.trusted_mods = irc,track_players,global_exchange +log_mods = true + +# craftguide # +############## +craftguide_progressive_mode = true + +# moremesecons # +################ +moremesecons_jammer.enable_lbm = false +moremesecons_sayer.use_speech_dispatcher = false + +# GIVE_INITIAL_STUFF MOD - Equipement pour les nouveaux joueurs : 10 torches, 2 saplings, 5 apples. Edit mods/misc/give_initial_stuff.lua to change. +give_initial_stuff = true +initial_stuff = "default:torch 10,default:sapling 2,default:apple 5" +# AREAS MOD +areas.self_protection = true +areas.self_protection_max_size = {x=128, y=128, z=128} +areas.self_protection_max_areas = 30 +# MOBS +remove_far_mobs = true +mobs_spawn_protected = true +mob_difficulty = 1.5 +# MOBS custom spawn chance and number +mobs_animal:bee = 9000,2 +mobs_animal:bunny = 15000,2 +mobs_animal:chicken = 15000,2 +mobs_animal:cow = 15000,2 +mobs_animal:goat = 20000,2 +mobs_animal:kitten = 122000,2 +mobs_animal:penguin = 20000,2 +mobs_animal:rat = 15000,2 +mobs_animal:sheep_white = 15000,2 +mobs_animal:pumba = 15000,2 +pmobs:npc = 500000,1 +pmobs:npc_female = 500000,1 +pmobs:wolf = 100000,1 +pmobs:yeti = 7000,2 +kpgmobs:deer = 51000,1 +kpgmobs:jeraf = 51000,1 +kpgmobs:medved = 100000,1 +creeper:creeper = 25000,2 +mob_horse:horse = 60000,1 +mobs_turtles:turtle = 30000,1 +mobs_turtles:seaturtle = 30000,1 + +# food # +######## +food_sweet_use_2d = 1 + +# Armor Configuration +# ------------------- + +# Set false to disable individual armor materials. +armor_material_wood = true +armor_material_cactus = true +armor_material_steel = true +armor_material_bronze = true +armor_material_diamond = true +armor_material_gold = true +armor_material_mithril = true +armor_material_crystal = false +armor_material_reinforcedleather = true +armor_material_hardenedleather = true +armor_material_blackmithril = true + +# Increase this if you get initialization glitches when a player first joins. +#armor_init_delay = 1 + +# Number of initialization attempts. +# Use in conjunction with armor_init_delay if initialization problems persist. +#armor_init_times = 1 + +# Increase this if armor is not getting into bones due to server lag. +#armor_bones_delay = 1 + +# How often player armor items are updated. +#armor_update_time = 1 + +# Drop armor when a player dies. +# Uses bones mod if present, otherwise items are dropped around the player. +armor_drop = true + +# Pulverise armor when a player dies, overrides armor_drop. +armor_destroy = false + +# You can use this to increase or decrease overall armor effectiveness, +# eg: level_multiplier = 0.5 will reduce armor level by half. +armor_level_multiplier = 1 + +# You can use this to increase or decrease overall armor healing, +# eg: armor_heal_multiplier = 0 will disable healing altogether. +armor_heal_multiplier = 1 + +# Enable water protection (periodically restores breath when activated) +armor_water_protect = true + +# Enable fire protection (defaults true if using ethereal mod) +armor_fire_protect = true + +# Enable punch damage effects. +armor_punch_damage = true + +# Enable migration of old armor inventories +#armor_migrate_old_inventory = true + +# DROPONDIE MOD - si false, les sacs des joueurs sont vidées à leurs mort +#keepInventory = false +# RANDOM_MESSAGES MOD - paramétrage de l'interval entre deux messages, 30min actuellement +random_messages_interval = 1800 +# FAIL MOD - permettant failpoints et cookies +#fp_pubmsg = true +#fp_strict_checking = false +# MESECONS MOD - paramétrage des outils logiques +#mesecon.overheat_max = 60 +# MAPFIX MOD - Recalculate the flowing liquids and the light of a chunk +#mapfix_default_size = 40 +#mapfix_max_size = 50 +#mapfix_delay = 5 +# TIME REGULATION - turned off by default +disable_time_regulation = true +# Tweak the mapgen chunksize (16 per 16 nodes, default is "5"), will be applied on many mods +#chunksize = 3 +# Reduce Mesecons "blinky_plant" speed +#mesecon.blinky_plant_interval = 7 +# Set default mana regeneration to 3 +mana_default_regen = 10 +mana_default_max = 200 +mana_regen_time = 10 +# HUDBARS +hudbars_sorting = health=0, mana=1, satiation=2, sprint=3, breath=4, armor=5 +hudbars_tick = 0.3 +hudbars_bar_type = statbar_modern +hbarmor_tick = 0.5 +#hudbars_start_offset_left_y = -100 +#hudbars_start_offset_right_y = -100 +# Mysql Auth, config file path +#mysql_auth.cfgfile = /home/quentinbd/mysql_auth/mff-classic_config + +# CHRISTMAS_CRAFT, active snow when winter(december/january) +#is_winter = false + +# Snow # +######## +snow_disable_mapgen = false +snow_enable_snowfall = false +snow_christmas_content = true + +### IRC CHAT ### +################ +irc.server = irc.sys4.fr +irc.channel = #NALC +irc.interval = 2.0 +irc.nick = NALC-Bot +#irc.password = #vide car aucun mdp pour le channel +irc.debug = false +irc.disable_auto_connect = false +irc.disable_auto_join = false +irc.send_join_part = true +irc.secure = true +irc.port = 6697 + +## Player Anim ## +player_model_version = default_character_v2 + +# item_drop +item_drop.enable_item_drop = false +item_drop.enable_pickup_key = false +item_drop.pickup_keyinvert = true +item_drop.magnet_radius = 1 +item_drop.pickup_age = 0.5 + +# Home decor +homedecor.disable_coin_crafting = false diff --git a/start.sh.example b/start.sh.example new file mode 100644 index 0000000..109825f --- /dev/null +++ b/start.sh.example @@ -0,0 +1,26 @@ +#!/bin/bash + +DEBUG=~/nalc-server/logs/debug.log +MOREDEBUG=~/nalc-server/logs/moredebug.log + +cd ~/nalc-server/minetest/bin + +while true + do + sleep 5 + + echo "----------------------" >>$MOREDEBUG + echo "Server restarted at "`date` >>$MOREDEBUG + echo "----------------------" >>$MOREDEBUG + + echo "0" >/tmp/players_c.txt + + ./minetestserver \ + --world ../worlds/nalc/ \ + --config ../minetest.conf \ + --gameid nalc_game \ + --port 30002 \ +# --logfile $DEBUG + + sleep 25 +done &>> $MOREDEBUG \ No newline at end of file