Various updates
- Updated homedecor (files cleaned) - Updated nether (node replacements made easier) - Updated maptools (cleaned files) - Updated ambiance (useless files cleaned)
@ -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.:get_timeofday() > 0.2 and minetest.: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.: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.: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.: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)
|
|
@ -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.:get_timeofday() > 0.2 and minetest.: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.: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.: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.: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.: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)
|
|
43
mods/ambience_modpack/ambience/README.txt
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
=== AMBIENCE-MOD for MINETEST-C55 ===
|
||||||
|
by Neuromancer and PilzAdam
|
||||||
|
|
||||||
|
Intorduction:
|
||||||
|
This mod adds sounds to Minetest, that are played randomly in ambiences.
|
||||||
|
|
||||||
|
How to install:
|
||||||
|
Unzip the archive an place it in minetest-base-directory/mods/minetest/
|
||||||
|
if you have a windows client or a linux run-in-place client. If you have
|
||||||
|
a linux system-wide instalation place it in ~/.minetest/mods/minetest/.
|
||||||
|
If you want to install this mod only in one world create the folder
|
||||||
|
worldmods/ in your worlddirectory.
|
||||||
|
For further information or help see:
|
||||||
|
http://wiki.minetest.com/wiki/Installing_Mods
|
||||||
|
!!!Important!!!
|
||||||
|
Unzip the sounds folder before you use the mod or you wont hear
|
||||||
|
anything.
|
||||||
|
|
||||||
|
Configuration:
|
||||||
|
To add your own sounds copy them into the ambience/sounds/ folder and
|
||||||
|
add there names with the length in seconds to the tables at the top of
|
||||||
|
init.lua (only ogg files are supported).
|
||||||
|
|
||||||
|
License:
|
||||||
|
Sourcecode: WTFPL (see below)
|
||||||
|
Sounds: see sounds/SoundLicenses.txt
|
||||||
|
|
||||||
|
See also:
|
||||||
|
http://minetest.net/
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
BIN
mods/ambience_modpack/ambience/ambience.zip
Normal file
@ -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.get_timeofday() > 0.2 and minetest.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.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.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)
|
|
@ -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.get_timeofday() > 0.2 and minetest.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.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.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.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.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)
|
|
@ -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.get_timeofday() > 0.2 and minetest.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.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.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.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.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.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)
|
|
@ -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.get_timeofday() > 0.2 and minetest.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.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.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.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.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.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.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.get_node(pos).name
|
|
||||||
pos.y = pos.y-3
|
|
||||||
node_3_under_feet = minetest.get_node(pos).name
|
|
||||||
pos.y = pos.y+3
|
|
||||||
pos.y = pos.y+2.2
|
|
||||||
node_at_upper_body = minetest.get_node(pos).name
|
|
||||||
pos.y = pos.y-1.19
|
|
||||||
node_at_lower_body = minetest.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.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)
|
|
@ -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
|
|
@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
||||||
Version 2, December 2004
|
|
||||||
|
|
||||||
Copyright (C) 2012 Diego Martínez <lkaezadl3@gmail.com>
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim or modified
|
|
||||||
copies of this license document, and changing it is allowed as long
|
|
||||||
as the name is changed.
|
|
||||||
|
|
||||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
|||||||
computer = { }
|
computer = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
computer.register = function (name, def)
|
computer.register = function (name, def)
|
||||||
local nodename = name
|
local nodename = name
|
||||||
|
@ -1,680 +0,0 @@
|
|||||||
Semmett9's "Fake Fire" mod. kilbith's fork.
|
|
||||||
Some textures by LazyJ.
|
|
||||||
Fancy mesh fire model/texture by NathanS (CC-0).
|
|
||||||
==============================================================
|
|
||||||
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -1,3 +1,5 @@
|
|||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
local function start_smoke(pos, node, clicker, chimney)
|
local function start_smoke(pos, node, clicker, chimney)
|
||||||
local this_spawner_meta = minetest.get_meta(pos)
|
local this_spawner_meta = minetest.get_meta(pos)
|
||||||
local id = this_spawner_meta:get_int("smoky")
|
local id = this_spawner_meta:get_int("smoky")
|
||||||
|
@ -1,165 +0,0 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
|
|
||||||
This version of the GNU Lesser General Public License incorporates
|
|
||||||
the terms and conditions of version 3 of the GNU General Public
|
|
||||||
License, supplemented by the additional permissions listed below.
|
|
||||||
|
|
||||||
0. Additional Definitions.
|
|
||||||
|
|
||||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
||||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
||||||
General Public License.
|
|
||||||
|
|
||||||
"The Library" refers to a covered work governed by this License,
|
|
||||||
other than an Application or a Combined Work as defined below.
|
|
||||||
|
|
||||||
An "Application" is any work that makes use of an interface provided
|
|
||||||
by the Library, but which is not otherwise based on the Library.
|
|
||||||
Defining a subclass of a class defined by the Library is deemed a mode
|
|
||||||
of using an interface provided by the Library.
|
|
||||||
|
|
||||||
A "Combined Work" is a work produced by combining or linking an
|
|
||||||
Application with the Library. The particular version of the Library
|
|
||||||
with which the Combined Work was made is also called the "Linked
|
|
||||||
Version".
|
|
||||||
|
|
||||||
The "Minimal Corresponding Source" for a Combined Work means the
|
|
||||||
Corresponding Source for the Combined Work, excluding any source code
|
|
||||||
for portions of the Combined Work that, considered in isolation, are
|
|
||||||
based on the Application, and not on the Linked Version.
|
|
||||||
|
|
||||||
The "Corresponding Application Code" for a Combined Work means the
|
|
||||||
object code and/or source code for the Application, including any data
|
|
||||||
and utility programs needed for reproducing the Combined Work from the
|
|
||||||
Application, but excluding the System Libraries of the Combined Work.
|
|
||||||
|
|
||||||
1. Exception to Section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
You may convey a covered work under sections 3 and 4 of this License
|
|
||||||
without being bound by section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
2. Conveying Modified Versions.
|
|
||||||
|
|
||||||
If you modify a copy of the Library, and, in your modifications, a
|
|
||||||
facility refers to a function or data to be supplied by an Application
|
|
||||||
that uses the facility (other than as an argument passed when the
|
|
||||||
facility is invoked), then you may convey a copy of the modified
|
|
||||||
version:
|
|
||||||
|
|
||||||
a) under this License, provided that you make a good faith effort to
|
|
||||||
ensure that, in the event an Application does not supply the
|
|
||||||
function or data, the facility still operates, and performs
|
|
||||||
whatever part of its purpose remains meaningful, or
|
|
||||||
|
|
||||||
b) under the GNU GPL, with none of the additional permissions of
|
|
||||||
this License applicable to that copy.
|
|
||||||
|
|
||||||
3. Object Code Incorporating Material from Library Header Files.
|
|
||||||
|
|
||||||
The object code form of an Application may incorporate material from
|
|
||||||
a header file that is part of the Library. You may convey such object
|
|
||||||
code under terms of your choice, provided that, if the incorporated
|
|
||||||
material is not limited to numerical parameters, data structure
|
|
||||||
layouts and accessors, or small macros, inline functions and templates
|
|
||||||
(ten or fewer lines in length), you do both of the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the object code that the
|
|
||||||
Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
4. Combined Works.
|
|
||||||
|
|
||||||
You may convey a Combined Work under terms of your choice that,
|
|
||||||
taken together, effectively do not restrict modification of the
|
|
||||||
portions of the Library contained in the Combined Work and reverse
|
|
||||||
engineering for debugging such modifications, if you also do each of
|
|
||||||
the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the Combined Work that
|
|
||||||
the Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
c) For a Combined Work that displays copyright notices during
|
|
||||||
execution, include the copyright notice for the Library among
|
|
||||||
these notices, as well as a reference directing the user to the
|
|
||||||
copies of the GNU GPL and this license document.
|
|
||||||
|
|
||||||
d) Do one of the following:
|
|
||||||
|
|
||||||
0) Convey the Minimal Corresponding Source under the terms of this
|
|
||||||
License, and the Corresponding Application Code in a form
|
|
||||||
suitable for, and under terms that permit, the user to
|
|
||||||
recombine or relink the Application with a modified version of
|
|
||||||
the Linked Version to produce a modified Combined Work, in the
|
|
||||||
manner specified by section 6 of the GNU GPL for conveying
|
|
||||||
Corresponding Source.
|
|
||||||
|
|
||||||
1) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (a) uses at run time
|
|
||||||
a copy of the Library already present on the user's computer
|
|
||||||
system, and (b) will operate properly with a modified version
|
|
||||||
of the Library that is interface-compatible with the Linked
|
|
||||||
Version.
|
|
||||||
|
|
||||||
e) Provide Installation Information, but only if you would otherwise
|
|
||||||
be required to provide such information under section 6 of the
|
|
||||||
GNU GPL, and only to the extent that such information is
|
|
||||||
necessary to install and execute a modified version of the
|
|
||||||
Combined Work produced by recombining or relinking the
|
|
||||||
Application with a modified version of the Linked Version. (If
|
|
||||||
you use option 4d0, the Installation Information must accompany
|
|
||||||
the Minimal Corresponding Source and Corresponding Application
|
|
||||||
Code. If you use option 4d1, you must provide the Installation
|
|
||||||
Information in the manner specified by section 6 of the GNU GPL
|
|
||||||
for conveying Corresponding Source.)
|
|
||||||
|
|
||||||
5. Combined Libraries.
|
|
||||||
|
|
||||||
You may place library facilities that are a work based on the
|
|
||||||
Library side by side in a single library together with other library
|
|
||||||
facilities that are not Applications and are not covered by this
|
|
||||||
License, and convey such a combined library under terms of your
|
|
||||||
choice, if you do both of the following:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work based
|
|
||||||
on the Library, uncombined with any other library facilities,
|
|
||||||
conveyed under the terms of this License.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library that part of it
|
|
||||||
is a work based on the Library, and explaining where to find the
|
|
||||||
accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
6. Revised Versions of the GNU Lesser General Public License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the GNU Lesser General Public License from time to time. Such new
|
|
||||||
versions will be similar in spirit to the present version, but may
|
|
||||||
differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Library as you received it specifies that a certain numbered version
|
|
||||||
of the GNU Lesser General Public License "or any later version"
|
|
||||||
applies to it, you have the option of following the terms and
|
|
||||||
conditions either of that published version or of any later version
|
|
||||||
published by the Free Software Foundation. If the Library as you
|
|
||||||
received it does not specify a version number of the GNU Lesser
|
|
||||||
General Public License, you may choose any version of the GNU Lesser
|
|
||||||
General Public License ever published by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Library as you received it specifies that a proxy can decide
|
|
||||||
whether future versions of the GNU Lesser General Public License shall
|
|
||||||
apply, that proxy's public statement of acceptance of any version is
|
|
||||||
permanent authorization for you to choose that version for the
|
|
||||||
Library.
|
|
@ -1,229 +0,0 @@
|
|||||||
Changelog
|
|
||||||
---------
|
|
||||||
|
|
||||||
2013-03-16: Kaeza pushed fixes for signs on wrought iron/brass fences not
|
|
||||||
showing the text. This also fixed a potential undesired replacement bug. He
|
|
||||||
also fixed many of the sounds in the mod so that they aren't based on leaves.
|
|
||||||
:-)
|
|
||||||
|
|
||||||
2013-03-11: Kaeza merged in code from my fork of thexyz/PilzAdam's
|
|
||||||
3d/visible-text signs mods and fixed some bugs in my signs-on-fenceposts code
|
|
||||||
in homedecor. If you have any of those three versions of the signs mod,
|
|
||||||
uninstall it. Homedecor will cover its functionality. Thanks to kaeza for the
|
|
||||||
contribution! Also, now signs-on-fences work slightly differently than before
|
|
||||||
when digging - dig to get the sign back from the post, then dig the remaining
|
|
||||||
post to get that back as well.
|
|
||||||
|
|
||||||
2013-02-13: changed glowlight recipes to avoid conflicts with moreblocks (now
|
|
||||||
uses moreblocks glowglass *and* super glowglass together), made IC rely on
|
|
||||||
moreores copper ingot, added recipes to craft glow cubes back into glowlight
|
|
||||||
slabs. See crafting guide for details.
|
|
||||||
|
|
||||||
2012-02-09: Add ability to place a sign directly onto a brass/wrought iron
|
|
||||||
fencepost, rather than crafting a sign-on-fencepost from one of each. Place a
|
|
||||||
brass or wrought iron fencepost, then attempt to place a sign against it.
|
|
||||||
Instead of the sign floating in air, the fencepost will be replaced with one
|
|
||||||
bearing the sign in the same node. Dig to get the two pieces back as separate
|
|
||||||
items, right click the resultant sign to edit the text thereon.
|
|
||||||
|
|
||||||
2012-02-08: Added ability to add signs to brass/wrought iron fenceposts.
|
|
||||||
|
|
||||||
2013-01-23: Completely rewrote all doors code to condense them into two files -
|
|
||||||
one with the nodebox models, and one with the actual node definitions. In the
|
|
||||||
process, cleaned up the code that handles node_ownership and protection mods.
|
|
||||||
Also made the mod automatically enable either left-click or right-click to
|
|
||||||
open/close a door, depending on whether the game supports it (actually it
|
|
||||||
checks for the existance of an unrelated function that happened to be added the
|
|
||||||
same time as the new right-click function). Renamed some textures, duplicated
|
|
||||||
all of the _lr.png textures to make it easier to register the textures in a
|
|
||||||
loop and to allow for more flexible texturing.
|
|
||||||
|
|
||||||
2012-10-11 (late night): Minor update - fixed a recipe conflict with throwing
|
|
||||||
mod. Unprocessed plastic, when made from jungle grass or dry shrubs, now
|
|
||||||
requires three jungle grass (yields 6) or three dry shrubs (yields 3). Still
|
|
||||||
works with 6 leaves also. Extended the above owned-node support to work with
|
|
||||||
glomie's "protector" mod since it has a similar bug as node_ownership has.
|
|
||||||
|
|
||||||
All server Admins: If you have Home Decor and you use either node_ownership
|
|
||||||
or protector (or both), please update your copy of Home Decor as soon as
|
|
||||||
practical.
|
|
||||||
|
|
||||||
2012-10-09: Added code to all doors to check for the presence of node_ownership
|
|
||||||
and adapt accordingly. If that mod is present, you can only place doors in
|
|
||||||
land you own, or land you have been given permission by the owner to build in,
|
|
||||||
or land that is not owned at all. Singleplayer mode still works the same as
|
|
||||||
before. Works around a bug in node_ownership where it doesn't completely
|
|
||||||
handle the on_place= construct in register_node(), causing it to only delete
|
|
||||||
half of an illegally-placed door.
|
|
||||||
|
|
||||||
2012-10-05: Added titanium dioxide and white paint from Unified Dyes as
|
|
||||||
alternates if that mod isn't present. Both are compatible/interchangeable with
|
|
||||||
the ones from that mod. Uses the same crafting recipes as UD uses, plus a
|
|
||||||
couple of alternates in case of materials shortages. Added white and mahogany
|
|
||||||
variants of the aforementioned grid-style glass-and-wood door.
|
|
||||||
|
|
||||||
2012-10-04: Added a couple new types of doors, converted the others to
|
|
||||||
nodeboxes. All door code has been rewritten mostly from scratch. These new
|
|
||||||
doors should convert over just fine, or at least you won't lose anything. You
|
|
||||||
may have to dig and re-place a few if their orientation is wrong. Also note
|
|
||||||
that these always return the left-opening version when you dig one.
|
|
||||||
|
|
||||||
2012-10-03: Refrigerators are now two nodes tall and have a 10x5 inventory
|
|
||||||
space. If you have two stacked up already before this update, you'll need to
|
|
||||||
empty them, dig them, and then re-place one or both, and put their contents
|
|
||||||
back in. Sorry about the inconvenience, the one-node-tall ones were only
|
|
||||||
supposed to be temporary anyway. Besides, now one stores more than twice as
|
|
||||||
much as before. :-) The associated crafting recipe yields only one now, in
|
|
||||||
keeping with this change.
|
|
||||||
|
|
||||||
2012-10-01: Added white glowlights, changed nodenames for yellow glowlights to
|
|
||||||
indicate that they're supposed to be yellow (you'll need to destroy and
|
|
||||||
re-craft them, sorry).
|
|
||||||
|
|
||||||
2012-09-30: Added a few different kinds of fences - bare/unpainted wooden and
|
|
||||||
classic white picket fences, chainlink, barbed wire, and wooden privacy fence
|
|
||||||
(e.g to put around a backyard pool).
|
|
||||||
|
|
||||||
Also added gates that open/close on a click, for the picket fences, chainlink
|
|
||||||
fence, and barbed wire fence. For the privacy fence, use a regular door if you
|
|
||||||
need a gate.
|
|
||||||
|
|
||||||
2012-09-30: Big set of updates today to make the mod a little easier to use in
|
|
||||||
places and to add some more nodes. Recipe changes: Brass and wrought iron
|
|
||||||
poles, table legs, and fences/railings were too expensive in practice.
|
|
||||||
Increased recipe outputs. Small square glass table now comes from one small
|
|
||||||
round table (instead of three-to-two). Large square glass table comes from one
|
|
||||||
small square now instead of two. Small round, small square, and large wooden
|
|
||||||
tables follow the same pattern.
|
|
||||||
|
|
||||||
Recycling: All glass tables can be recycled back into glass blocks via the
|
|
||||||
Vessels mod's recipes. All are 3:1 with glass fragments (and thus, 3:1 with
|
|
||||||
glass blocks), so there's no glass wasted. All wooden tables can be crafted
|
|
||||||
into sticks by putting three of a given item onto the crafting grid. Any
|
|
||||||
such craft yields 4 sticks, so there's no waste. Glass skylights recycle
|
|
||||||
3:1 also, which does result in a little waste.
|
|
||||||
|
|
||||||
New nodes:
|
|
||||||
|
|
||||||
Added working oven (really just a furnace with new textures/recipe)
|
|
||||||
Added mini-fridge that stores 24 slots
|
|
||||||
Added kitchen cabinet that stores 24 slots
|
|
||||||
Added half-size kitchen cabinet that stores 12 slots (6x2)
|
|
||||||
Added kitchen sink with under-sink cabinet that stores 16 slots
|
|
||||||
Added slab-sized, half-slab-sized, and microblock-sized glowlights (e.g.
|
|
||||||
ceiling fixtures and yard/sidewalk lighting)
|
|
||||||
Added curtains in 6 colors: red, green, blue, purple, pink, white
|
|
||||||
|
|
||||||
Misc. changes: 3d-ified nightstands (e.g. nodeboxes), improved their
|
|
||||||
textures somewhat. Got rid of the dressers - they were never brought to a
|
|
||||||
working state, but they're obsolete now (stacked two-drawer nightstands look
|
|
||||||
the same anyway).
|
|
||||||
|
|
||||||
Notes about this update: This mod now requires Moreblocks for some recipes -
|
|
||||||
namely fridge and oven, and uses the Vessels mod's recycle crafts.
|
|
||||||
|
|
||||||
2012-09-27: Changed most uses of dyes so that they can come from the game's
|
|
||||||
in-built groups-based dye system, where appropriate. Unified Dyes can still
|
|
||||||
supply the colors, this just makes it possible to use any other dye system that
|
|
||||||
might come about as long as it uses the groups method. Improved recipe outputs
|
|
||||||
for all shutters and mahogany folding door (better ratios of objects to
|
|
||||||
colorants).
|
|
||||||
|
|
||||||
Added intermediate "unprocessed plastic" step to get from materials to
|
|
||||||
plastic sheeting (now craft some materials to get unprocessed plastic, then
|
|
||||||
smelt that to get the sheeting), added alternate recipes to produce it,
|
|
||||||
improved ratio of materials to plastic. Minor code cleanups.
|
|
||||||
|
|
||||||
Later in the day: Nightstands now offer small inventories - one-drawer units
|
|
||||||
get 8 slots, while two-drawer nightstands get 16 slots (8x2). They're
|
|
||||||
smaller than chests because they're cheaper to make. Note that if you have
|
|
||||||
nightstands already placed, dig them up and place them again to enable their
|
|
||||||
new inventory capabilities.
|
|
||||||
|
|
||||||
2012-09-25: Added alternate recipes for most items that use dyes. Removed
|
|
||||||
Mesecons dependency from TV and stereo (uses in-built silicon lumps if Mesecons
|
|
||||||
isn't present). Replaced speakers' Mesecons Noteblocks with copper ingots from
|
|
||||||
Moreores.
|
|
||||||
|
|
||||||
2012-08-01: Added optional recipes for items that use wool to also use cotton
|
|
||||||
instead. Choose one or the other in any given recipe (you can't mix the two).
|
|
||||||
No, it isn't a Kosher thing. ;-)
|
|
||||||
|
|
||||||
2012-07-28: Noticed I technically had left/right textures swapped on a few
|
|
||||||
blocks. The textures were drawn to counteract this, without my realizing I was
|
|
||||||
doing just that. :-) Fixed. Also replaced all "tile_images" references with
|
|
||||||
"tiles", since the former is deprecated in favor of the latter.
|
|
||||||
|
|
||||||
2012-07-26: Updated to use the Vessels mod to give back empty dye bottles.
|
|
||||||
|
|
||||||
2012-07-24: Made all objects that use a dye require a more appropriate color,
|
|
||||||
made all objects that use a dye give back empty bottles on craft, made grey
|
|
||||||
shutters use the various grey paints directly. Moved this changelog out of the
|
|
||||||
forum post and into this separate file.
|
|
||||||
|
|
||||||
2012-07-12: Moved project to github.
|
|
||||||
|
|
||||||
2012-07-02: Deleted a few redundant files from the unified dyes mod.
|
|
||||||
|
|
||||||
2012-06-30: Added a fancy wood-and-glass door. Textures used here were
|
|
||||||
formerly used for (and have been replaced by new textures for) the default wood
|
|
||||||
door in my realistic texture packs.
|
|
||||||
|
|
||||||
2012-06-27: Relaxed dependency on UnifiedDyes to prevent depending on Flowers.
|
|
||||||
The mod will still use them if available; if not, you just can't craft the
|
|
||||||
various colored objects.
|
|
||||||
|
|
||||||
2012-06-26: Separated dyes into their own mod ("unifieddyes"). Added a copy of
|
|
||||||
flowers and made this mod depend on it and unified dyes. Updated all crafting
|
|
||||||
recipes to fit, got rid of the conditional code for flowers (since it is a
|
|
||||||
dependency now), removed a bunch of redundant register_craftitem code, fixed
|
|
||||||
some copy&paste errors on the window shutters. As a consequence of these
|
|
||||||
changes, white paint, titanium dioxide, and all colors of dyes will have to be
|
|
||||||
removed and replaced (but the things that depend on them are fine).
|
|
||||||
|
|
||||||
2012-06-25: Removed all of the old legacy_wallmounted references - I didn't
|
|
||||||
realize they were deprecated (and they were causing out-of-nodes issues also).
|
|
||||||
|
|
||||||
2012-06-23: Added small speaker, round brass pole, square wrought iron pole
|
|
||||||
(without connecting rungs). Fairly recent version of Minetest required for
|
|
||||||
these to work (uses nodeboxes). Note that if you've placed brass or wrought
|
|
||||||
iron poles in your world already, they will be drawn using these newer styles;
|
|
||||||
if you need the square poles and/or connecting rungs, you'll need to remove
|
|
||||||
them and craft brass/wrought iron fences instead.
|
|
||||||
|
|
||||||
2012-06-16: Tweaked terracotta roof tiles/shingles to give the 4 pieces back on
|
|
||||||
digging a 'shingle'.
|
|
||||||
|
|
||||||
2012-06-15 (a bit later): Did the same for the stereo and television and
|
|
||||||
improved them in the process.
|
|
||||||
|
|
||||||
2012-06-15: Tweaked the speaker textures, added separate images for all 6
|
|
||||||
sides.
|
|
||||||
|
|
||||||
2012-06-14: Added right-opening versions of oak and mahogany "folding" doors -
|
|
||||||
allows one to create double doors. Split the two colors into separate files.
|
|
||||||
Inspired by Calinou's update to the default doors mod - works the same way too.
|
|
||||||
:-)
|
|
||||||
|
|
||||||
2012-06-13 (a lot later): Changed the crafting recipe slightly for nightstands
|
|
||||||
- they're designated as 'oak' now. Added crafting recipe for mahogany
|
|
||||||
variants. If you've already placed nightstands into your world, you should
|
|
||||||
remove them before updating - sorry, you'll have to rebuild them due my having
|
|
||||||
had to change the node names. Added initial crafting recipes for oak and
|
|
||||||
mahogany drawers and complete dressers (dresser components are not yet useful,
|
|
||||||
work in progress. See crafts.lua for more details).
|
|
||||||
|
|
||||||
2012-06-13: Changed buckets of white paint so that the empty bucket is returned
|
|
||||||
when the bucket of paint is crafted into something else (rather than when the
|
|
||||||
bucket of paint is first created). * Fixed copy&paste error from the previous
|
|
||||||
bucket change. * Moved smelting and crafting of white paint from crafts.lua
|
|
||||||
over to dyes.lua.
|
|
||||||
|
|
||||||
2012-06-12: Multiple post-release updates over the course of the day. * Fixed
|
|
||||||
recipe collision with glass panes. * Implemented a full set of dyes derived
|
|
||||||
from flowers, updated all related crafting recipes and screenshots to match. *
|
|
||||||
Collected all dyes into one file. Changed recipes for blue and purple dyes to
|
|
||||||
something that makes a bit more sense. :-) * Tweaked oak shutters to give two
|
|
||||||
pieces on crafting. * Added alternate recipes for orange and green dyes.
|
|
||||||
|
|
||||||
2012-06-12: Initial release.
|
|
@ -3316,6 +3316,24 @@ minetest.register_craft({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("homedecor:flower_pot_small", {
|
||||||
|
description = S("Small Flower Pot"),
|
||||||
|
inventory_image = "homedecor_flowerpot_small_inv.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "homedecor:flower_pot_small",
|
||||||
|
recipe = {
|
||||||
|
{ "default:clay_brick", "", "default:clay_brick" },
|
||||||
|
{ "", "default:clay_brick", "" }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "homedecor:flower_pot_small 3",
|
||||||
|
recipe = { { "homedecor:flower_pot_terracotta" } }
|
||||||
|
})
|
||||||
|
|
||||||
for i in ipairs(homedecor.banister_materials) do
|
for i in ipairs(homedecor.banister_materials) do
|
||||||
|
|
||||||
local name = homedecor.banister_materials[i][1]
|
local name = homedecor.banister_materials[i][1]
|
||||||
|
@ -8,3 +8,4 @@ bees?
|
|||||||
intllib?
|
intllib?
|
||||||
bucket?
|
bucket?
|
||||||
beds?
|
beds?
|
||||||
|
flowers?
|
||||||
|
@ -99,7 +99,7 @@ function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
|||||||
return isceiling, pos
|
return isceiling, pos
|
||||||
end
|
end
|
||||||
|
|
||||||
if screwdriver == nil then screwdriver = {} end
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
homedecor.plain_wood = "homedecor_generic_wood_plain.png^"..
|
homedecor.plain_wood = "homedecor_generic_wood_plain.png^"..
|
||||||
"(homedecor_generic_wood_boards_overlay.png^[colorize:#a7682020:100)"
|
"(homedecor_generic_wood_boards_overlay.png^[colorize:#a7682020:100)"
|
||||||
|
@ -79,6 +79,46 @@ homedecor.register("flower_pot_"..p, {
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local flowers_list = {
|
||||||
|
{ "Rose", "rose", "flowers:rose" },
|
||||||
|
{ "Tulip", "tulip", "flowers:tulip" },
|
||||||
|
{ "Yellow Dandelion", "dandelion_yellow", "flowers:dandelion_yellow" },
|
||||||
|
{ "White Dandelion", "dandelion_white", "flowers:dandelion_white" },
|
||||||
|
{ "Blue Geranium", "geranium", "flowers:geranium" },
|
||||||
|
{ "Viola", "viola", "flowers:viola" },
|
||||||
|
{ "Cactus", "cactus", "default:cactus" },
|
||||||
|
{ "Bonsai", "bonsai", "default:sapling" }
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in ipairs(flowers_list) do
|
||||||
|
local flowerdesc = flowers_list[i][1]
|
||||||
|
local flower = flowers_list[i][2]
|
||||||
|
local craftwith = flowers_list[i][3]
|
||||||
|
|
||||||
|
homedecor.register("potted_"..flower, {
|
||||||
|
description = S("Potted flower ("..flowerdesc..")"),
|
||||||
|
mesh = "homedecor_flowerpot_small.obj",
|
||||||
|
tiles = {"homedecor_potted_"..flower..".png", "homedecor_potted.png"},
|
||||||
|
walkable = false,
|
||||||
|
groups = {snappy = 3},
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -0.2, -0.5, -0.2, 0.2, 0.4, 0.2 }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "homedecor:potted_"..flower,
|
||||||
|
recipe = { craftwith, "homedecor:flower_pot_small" }
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("flowers:flower_"..flower.."_pot", "homedecor:potted_"..flower)
|
||||||
|
minetest.register_alias("flowers:potted_"..flower, "homedecor:potted_"..flower)
|
||||||
|
minetest.register_alias("flowers:flower_pot", "homedecor:flower_pot_small")
|
||||||
|
end
|
||||||
|
|
||||||
homedecor.register("pole_brass", {
|
homedecor.register("pole_brass", {
|
||||||
description = S("Brass Pole"),
|
description = S("Brass Pole"),
|
||||||
mesh = "homedecor_round_pole.obj",
|
mesh = "homedecor_round_pole.obj",
|
||||||
|
@ -0,0 +1,510 @@
|
|||||||
|
# Blender v2.73 (sub 0) OBJ File: 'flowersplus_potted.blend'
|
||||||
|
# www.blender.org
|
||||||
|
o Plane_Plane_None
|
||||||
|
v -0.280963 0.570852 -0.280962
|
||||||
|
v -0.280963 -0.122043 -0.280962
|
||||||
|
v 0.280961 -0.122043 0.280962
|
||||||
|
v 0.280961 0.570851 0.280962
|
||||||
|
v 0.280961 0.570852 -0.280962
|
||||||
|
v 0.280961 -0.122043 -0.280962
|
||||||
|
v -0.280963 -0.122043 0.280962
|
||||||
|
v -0.280963 0.570851 0.280962
|
||||||
|
vt 0.000015 0.999998
|
||||||
|
vt 0.000016 0.000012
|
||||||
|
vt 0.999986 0.000012
|
||||||
|
vt 0.999986 0.999990
|
||||||
|
vn -0.707100 -0.000000 0.707100
|
||||||
|
vn -0.707100 -0.000000 -0.707100
|
||||||
|
g Plane_Plane_None_Plane_Plane_None_None
|
||||||
|
s off
|
||||||
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
|
f 5/1/2 6/2/2 7/3/2 8/4/2
|
||||||
|
o Cylinder.001_Cylinder.001_None
|
||||||
|
v 0.039325 -0.147239 -0.197702
|
||||||
|
v 0.039325 -0.096845 -0.197702
|
||||||
|
v 0.111989 -0.096845 -0.167603
|
||||||
|
v 0.111989 -0.147239 -0.167603
|
||||||
|
v 0.167603 -0.096845 -0.111989
|
||||||
|
v 0.167603 -0.147239 -0.111989
|
||||||
|
v 0.197702 -0.096845 -0.039325
|
||||||
|
v 0.197702 -0.147239 -0.039325
|
||||||
|
v 0.197702 -0.096845 0.039325
|
||||||
|
v 0.197702 -0.147239 0.039325
|
||||||
|
v 0.167603 -0.096845 0.111989
|
||||||
|
v 0.167603 -0.147239 0.111989
|
||||||
|
v 0.111989 -0.096845 0.167604
|
||||||
|
v 0.111989 -0.147239 0.167604
|
||||||
|
v 0.039325 -0.096845 0.197702
|
||||||
|
v 0.039325 -0.147239 0.197702
|
||||||
|
v -0.039325 -0.096845 0.197702
|
||||||
|
v -0.039325 -0.147239 0.197702
|
||||||
|
v -0.111989 -0.096845 0.167604
|
||||||
|
v -0.111989 -0.147239 0.167604
|
||||||
|
v -0.167603 -0.096845 0.111989
|
||||||
|
v -0.167603 -0.147239 0.111989
|
||||||
|
v -0.197702 -0.096845 0.039325
|
||||||
|
v -0.197702 -0.147239 0.039325
|
||||||
|
v -0.197702 -0.096845 -0.039326
|
||||||
|
v -0.197702 -0.147239 -0.039326
|
||||||
|
v -0.167603 -0.096845 -0.111989
|
||||||
|
v -0.167603 -0.147239 -0.111989
|
||||||
|
v -0.111989 -0.096845 -0.167603
|
||||||
|
v -0.111989 -0.147239 -0.167603
|
||||||
|
v -0.039325 -0.147239 -0.197702
|
||||||
|
v -0.039325 -0.096845 -0.197702
|
||||||
|
v 0.098851 -0.499995 -0.019663
|
||||||
|
v 0.000000 -0.499995 -0.000000
|
||||||
|
v -0.083802 -0.499995 0.055994
|
||||||
|
v 0.055995 -0.499995 -0.083802
|
||||||
|
v 0.055995 -0.499995 0.083802
|
||||||
|
v -0.098851 -0.499995 -0.019663
|
||||||
|
v -0.055995 -0.499995 0.083802
|
||||||
|
v -0.083802 -0.499995 -0.055995
|
||||||
|
v -0.019663 -0.499995 0.098851
|
||||||
|
v -0.055994 -0.499995 -0.083802
|
||||||
|
v 0.019663 -0.499995 0.098851
|
||||||
|
v 0.098851 -0.499995 0.019662
|
||||||
|
v 0.083802 -0.499995 0.055994
|
||||||
|
v 0.083802 -0.499995 -0.055995
|
||||||
|
v -0.098851 -0.499995 0.019662
|
||||||
|
v -0.019662 -0.499995 -0.098851
|
||||||
|
v 0.097990 -0.122042 -0.146653
|
||||||
|
v 0.097990 -0.096845 -0.146653
|
||||||
|
v 0.172989 -0.122042 0.034410
|
||||||
|
v 0.172989 -0.096845 0.034410
|
||||||
|
v 0.146653 -0.122042 -0.097990
|
||||||
|
v 0.146653 -0.096845 -0.097990
|
||||||
|
v -0.034409 -0.122042 -0.172989
|
||||||
|
v -0.034409 -0.096845 -0.172989
|
||||||
|
v -0.172989 -0.122042 0.034410
|
||||||
|
v -0.172989 -0.096845 0.034410
|
||||||
|
v -0.146653 -0.122042 0.097990
|
||||||
|
v -0.146653 -0.096845 0.097990
|
||||||
|
v 0.172989 -0.122042 -0.034410
|
||||||
|
v 0.172989 -0.096845 -0.034410
|
||||||
|
v 0.146653 -0.122042 0.097990
|
||||||
|
v 0.146653 -0.096845 0.097990
|
||||||
|
v 0.034410 -0.122042 -0.172989
|
||||||
|
v 0.034410 -0.096845 -0.172989
|
||||||
|
v -0.146653 -0.122042 -0.097990
|
||||||
|
v -0.146653 -0.096845 -0.097990
|
||||||
|
v 0.034410 -0.122042 0.172989
|
||||||
|
v 0.034410 -0.096845 0.172989
|
||||||
|
v -0.172989 -0.122042 -0.034410
|
||||||
|
v -0.172989 -0.096845 -0.034410
|
||||||
|
v -0.034410 -0.122042 0.172989
|
||||||
|
v -0.034410 -0.096845 0.172989
|
||||||
|
v 0.097990 -0.122042 0.146653
|
||||||
|
v 0.097990 -0.096845 0.146653
|
||||||
|
v -0.097990 -0.122042 -0.146653
|
||||||
|
v -0.097990 -0.096845 -0.146653
|
||||||
|
v -0.097990 -0.122042 0.146653
|
||||||
|
v -0.097990 -0.096845 0.146653
|
||||||
|
v 0.000000 -0.122042 -0.000000
|
||||||
|
v 0.019663 -0.499995 -0.098851
|
||||||
|
v 0.034410 -0.147239 -0.172989
|
||||||
|
v 0.097990 -0.147239 -0.146653
|
||||||
|
v 0.146653 -0.147239 -0.097990
|
||||||
|
v 0.172989 -0.147239 -0.034410
|
||||||
|
v 0.172989 -0.147239 0.034410
|
||||||
|
v 0.146653 -0.147239 0.097990
|
||||||
|
v 0.097990 -0.147239 0.146653
|
||||||
|
v 0.034410 -0.147239 0.172989
|
||||||
|
v -0.034410 -0.147239 0.172989
|
||||||
|
v -0.097990 -0.147239 0.146653
|
||||||
|
v -0.146653 -0.147239 0.097990
|
||||||
|
v -0.172989 -0.147239 0.034410
|
||||||
|
v -0.172989 -0.147239 -0.034410
|
||||||
|
v -0.146653 -0.147239 -0.097990
|
||||||
|
v -0.097990 -0.147239 -0.146653
|
||||||
|
v -0.034409 -0.147239 -0.172989
|
||||||
|
vt 0.156250 0.593750
|
||||||
|
vt 0.156250 0.375000
|
||||||
|
vt 0.218750 0.375000
|
||||||
|
vt 0.218750 0.593750
|
||||||
|
vt 0.925348 0.807408
|
||||||
|
vt 0.942592 0.824652
|
||||||
|
vt 0.890625 0.859375
|
||||||
|
vt 0.611122 0.768387
|
||||||
|
vt 0.602441 0.755395
|
||||||
|
vt 0.647502 0.736730
|
||||||
|
vt 0.650550 0.752055
|
||||||
|
vt 0.468750 0.656250
|
||||||
|
vt 0.406250 0.656250
|
||||||
|
vt 0.406250 0.625000
|
||||||
|
vt 0.468750 0.625000
|
||||||
|
vt 0.093750 0.656250
|
||||||
|
vt 0.093750 0.625000
|
||||||
|
vt 0.156250 0.625000
|
||||||
|
vt 0.156250 0.656250
|
||||||
|
vt 0.031250 0.656250
|
||||||
|
vt 0.031250 0.625000
|
||||||
|
vt 0.343750 0.656250
|
||||||
|
vt 0.343750 0.625000
|
||||||
|
vt 0.031250 0.593750
|
||||||
|
vt 0.968750 0.593750
|
||||||
|
vt 0.968750 0.375000
|
||||||
|
vt 0.031250 0.375000
|
||||||
|
vt 0.718750 0.656250
|
||||||
|
vt 0.718750 0.625000
|
||||||
|
vt 0.781250 0.625000
|
||||||
|
vt 0.781250 0.656250
|
||||||
|
vt 0.656250 0.656250
|
||||||
|
vt 0.656250 0.625000
|
||||||
|
vt 0.650550 0.966602
|
||||||
|
vt 0.693226 0.966602
|
||||||
|
vt 0.696274 0.981927
|
||||||
|
vt 0.647501 0.981927
|
||||||
|
vt 0.906250 0.656250
|
||||||
|
vt 0.906250 0.625000
|
||||||
|
vt 0.968750 0.625000
|
||||||
|
vt 0.968750 0.656250
|
||||||
|
vt 0.406250 0.593750
|
||||||
|
vt 0.343750 0.593750
|
||||||
|
vt 0.343750 0.375000
|
||||||
|
vt 0.406250 0.375000
|
||||||
|
vt 0.531250 0.656250
|
||||||
|
vt 0.531250 0.625000
|
||||||
|
vt 0.593750 0.625000
|
||||||
|
vt 0.593750 0.656250
|
||||||
|
vt 0.564614 0.837990
|
||||||
|
vt 0.564614 0.880667
|
||||||
|
vt 0.549289 0.883715
|
||||||
|
vt 0.549289 0.834942
|
||||||
|
vt 0.580946 0.798563
|
||||||
|
vt 0.567954 0.789882
|
||||||
|
vt 0.902818 0.798076
|
||||||
|
vt 0.656250 0.593750
|
||||||
|
vt 0.593750 0.593750
|
||||||
|
vt 0.593750 0.375000
|
||||||
|
vt 0.656250 0.375000
|
||||||
|
vt 0.951924 0.847182
|
||||||
|
vt 0.033364 0.838084
|
||||||
|
vt 0.018040 0.835036
|
||||||
|
vt 0.036704 0.789976
|
||||||
|
vt 0.049696 0.798656
|
||||||
|
vt 0.779161 0.837991
|
||||||
|
vt 0.762830 0.798563
|
||||||
|
vt 0.775821 0.789882
|
||||||
|
vt 0.794486 0.834942
|
||||||
|
vt 0.906250 0.593750
|
||||||
|
vt 0.906250 0.375000
|
||||||
|
vt 0.218750 0.625000
|
||||||
|
vt 0.218750 0.656250
|
||||||
|
vt 0.406250 0.859375
|
||||||
|
vt 0.467016 0.950317
|
||||||
|
vt 0.427588 0.966648
|
||||||
|
vt 0.794486 0.883715
|
||||||
|
vt 0.779161 0.880667
|
||||||
|
vt 0.775821 0.928775
|
||||||
|
vt 0.762830 0.920094
|
||||||
|
vt 0.210084 0.755488
|
||||||
|
vt 0.244571 0.789976
|
||||||
|
vt 0.231580 0.798656
|
||||||
|
vt 0.201403 0.768480
|
||||||
|
vt 0.384912 0.966648
|
||||||
|
vt 0.696274 0.736730
|
||||||
|
vt 0.693226 0.752055
|
||||||
|
vt 0.593750 0.687500
|
||||||
|
vt 0.656250 0.687500
|
||||||
|
vt 0.656250 0.703125
|
||||||
|
vt 0.593750 0.703125
|
||||||
|
vt 0.156250 0.687500
|
||||||
|
vt 0.218750 0.687500
|
||||||
|
vt 0.218750 0.703125
|
||||||
|
vt 0.156250 0.703125
|
||||||
|
vt 0.611122 0.950271
|
||||||
|
vt 0.602441 0.963262
|
||||||
|
vt 0.718750 0.687500
|
||||||
|
vt 0.718750 0.703125
|
||||||
|
vt 0.263236 0.883808
|
||||||
|
vt 0.244571 0.928868
|
||||||
|
vt 0.231580 0.920187
|
||||||
|
vt 0.247911 0.880760
|
||||||
|
vt 0.567954 0.928775
|
||||||
|
vt 0.580946 0.920094
|
||||||
|
vt 0.781250 0.687500
|
||||||
|
vt 0.781250 0.703125
|
||||||
|
vt 0.781250 0.593750
|
||||||
|
vt 0.718750 0.593750
|
||||||
|
vt 0.718750 0.375000
|
||||||
|
vt 0.781250 0.375000
|
||||||
|
vt 0.951924 0.871568
|
||||||
|
vt 0.071191 0.755488
|
||||||
|
vt 0.116251 0.736824
|
||||||
|
vt 0.119300 0.752149
|
||||||
|
vt 0.079872 0.768480
|
||||||
|
vt 0.298977 0.838037
|
||||||
|
vt 0.315308 0.798609
|
||||||
|
vt 0.467016 0.768433
|
||||||
|
vt 0.497192 0.798609
|
||||||
|
vt 0.210084 0.963356
|
||||||
|
vt 0.201403 0.950364
|
||||||
|
vt 0.843750 0.687500
|
||||||
|
vt 0.843750 0.703125
|
||||||
|
vt 0.468750 0.687500
|
||||||
|
vt 0.531250 0.687500
|
||||||
|
vt 0.531250 0.703125
|
||||||
|
vt 0.468750 0.703125
|
||||||
|
vt 0.071192 0.963356
|
||||||
|
vt 0.079872 0.950364
|
||||||
|
vt 0.119300 0.966695
|
||||||
|
vt 0.116252 0.982020
|
||||||
|
vt 0.942592 0.894098
|
||||||
|
vt 0.281250 0.687500
|
||||||
|
vt 0.281250 0.703125
|
||||||
|
vt 0.165024 0.982020
|
||||||
|
vt 0.161976 0.966695
|
||||||
|
vt 0.161976 0.752149
|
||||||
|
vt 0.165024 0.736824
|
||||||
|
vt 0.513523 0.838037
|
||||||
|
vt 0.531250 0.593750
|
||||||
|
vt 0.531250 0.375000
|
||||||
|
vt 0.878432 0.920674
|
||||||
|
vt 0.855901 0.911342
|
||||||
|
vt 0.843750 0.656250
|
||||||
|
vt 0.843750 0.625000
|
||||||
|
vt 0.468750 0.593750
|
||||||
|
vt 0.468750 0.375000
|
||||||
|
vt 0.031250 0.687500
|
||||||
|
vt 0.093750 0.687500
|
||||||
|
vt 0.093750 0.703125
|
||||||
|
vt 0.031250 0.703125
|
||||||
|
vt 0.406250 0.687500
|
||||||
|
vt 0.406250 0.703125
|
||||||
|
vt 0.741334 0.963262
|
||||||
|
vt 0.732653 0.950271
|
||||||
|
vt 0.018040 0.883808
|
||||||
|
vt 0.033364 0.880760
|
||||||
|
vt 0.049696 0.920188
|
||||||
|
vt 0.036704 0.928868
|
||||||
|
vt 0.315308 0.920140
|
||||||
|
vt 0.298977 0.880713
|
||||||
|
vt 0.345485 0.768433
|
||||||
|
vt 0.513523 0.880713
|
||||||
|
vt 0.855902 0.807408
|
||||||
|
vt 0.878432 0.798076
|
||||||
|
vt 0.906250 0.687500
|
||||||
|
vt 0.968750 0.687500
|
||||||
|
vt 0.968750 0.703125
|
||||||
|
vt 0.906250 0.703125
|
||||||
|
vt 0.829326 0.871568
|
||||||
|
vt 0.829326 0.847182
|
||||||
|
vt 0.247911 0.838084
|
||||||
|
vt 0.263236 0.835036
|
||||||
|
vt 0.925348 0.911342
|
||||||
|
vt 0.384912 0.752101
|
||||||
|
vt 0.902818 0.920674
|
||||||
|
vt 0.732653 0.768387
|
||||||
|
vt 0.741334 0.755395
|
||||||
|
vt 0.281250 0.625000
|
||||||
|
vt 0.281250 0.656250
|
||||||
|
vt 0.345485 0.950317
|
||||||
|
vt 0.843750 0.593750
|
||||||
|
vt 0.843750 0.375000
|
||||||
|
vt 0.281250 0.593750
|
||||||
|
vt 0.281250 0.375000
|
||||||
|
vt 0.343750 0.687500
|
||||||
|
vt 0.343750 0.703125
|
||||||
|
vt 0.093750 0.593750
|
||||||
|
vt 0.093750 0.375000
|
||||||
|
vt 0.427588 0.752101
|
||||||
|
vt 0.838658 0.894098
|
||||||
|
vt 0.838658 0.824652
|
||||||
|
vt 0.497192 0.920140
|
||||||
|
vn 0.479200 -0.817200 0.320200
|
||||||
|
vn 0.813000 -0.209500 0.543200
|
||||||
|
vn 0.959000 -0.209500 0.190800
|
||||||
|
vn 0.565300 -0.817200 0.112400
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn -0.320200 -0.817200 -0.479200
|
||||||
|
vn -0.414600 -0.665700 -0.620400
|
||||||
|
vn -0.145600 -0.665700 -0.731900
|
||||||
|
vn -0.112400 -0.817200 -0.565300
|
||||||
|
vn 0.195100 0.000000 -0.980800
|
||||||
|
vn 0.555600 0.000000 -0.831500
|
||||||
|
vn 0.414600 -0.665700 -0.620400
|
||||||
|
vn 0.145600 -0.665700 -0.731900
|
||||||
|
vn 0.555600 0.000000 0.831500
|
||||||
|
vn 0.414600 -0.665700 0.620400
|
||||||
|
vn 0.620400 -0.665700 0.414600
|
||||||
|
vn 0.831500 0.000000 0.555600
|
||||||
|
vn 0.195100 0.000000 0.980800
|
||||||
|
vn 0.145600 -0.665700 0.731900
|
||||||
|
vn 0.831500 -0.000000 -0.555600
|
||||||
|
vn 0.620400 -0.665700 -0.414600
|
||||||
|
vn 0.112400 -0.817200 0.565300
|
||||||
|
vn -0.112400 -0.817200 0.565300
|
||||||
|
vn -0.190800 -0.209500 0.959000
|
||||||
|
vn 0.190800 -0.209500 0.959000
|
||||||
|
vn -0.980800 -0.000000 -0.195100
|
||||||
|
vn -0.731900 -0.665700 -0.145600
|
||||||
|
vn -0.731900 -0.665700 0.145600
|
||||||
|
vn -0.980800 -0.000000 0.195100
|
||||||
|
vn -0.831500 -0.000000 -0.555600
|
||||||
|
vn -0.620400 -0.665700 -0.414600
|
||||||
|
vn -0.145600 -0.665700 0.731900
|
||||||
|
vn -0.555600 0.000000 0.831500
|
||||||
|
vn -0.414600 -0.665700 0.620400
|
||||||
|
vn -0.195100 0.000000 0.980800
|
||||||
|
vn 0.320200 -0.817200 -0.479200
|
||||||
|
vn 0.479200 -0.817200 -0.320200
|
||||||
|
vn 0.813000 -0.209500 -0.543200
|
||||||
|
vn 0.543200 -0.209500 -0.813000
|
||||||
|
vn -0.195100 0.000000 -0.980800
|
||||||
|
vn -0.555600 0.000000 -0.831500
|
||||||
|
vn -0.565300 -0.817200 -0.112400
|
||||||
|
vn -0.565300 -0.817200 0.112400
|
||||||
|
vn -0.479200 -0.817200 -0.320200
|
||||||
|
vn -0.543200 -0.209500 -0.813000
|
||||||
|
vn -0.813000 -0.209500 -0.543200
|
||||||
|
vn 0.644500 0.753700 -0.128200
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.546400 0.753700 -0.365100
|
||||||
|
vn 0.565300 -0.817200 -0.112400
|
||||||
|
vn 0.731900 -0.665700 -0.145600
|
||||||
|
vn -0.320200 -0.817200 0.479200
|
||||||
|
vn -0.543200 -0.209500 0.813000
|
||||||
|
vn 0.731900 -0.665700 0.145600
|
||||||
|
vn 0.980800 0.000000 0.195100
|
||||||
|
vn -0.546400 0.753700 -0.365100
|
||||||
|
vn -0.365100 0.753700 -0.546400
|
||||||
|
vn 0.112400 -0.817200 -0.565300
|
||||||
|
vn -0.831500 0.000000 0.555600
|
||||||
|
vn -0.546400 0.753700 0.365100
|
||||||
|
vn -0.365100 0.753700 0.546400
|
||||||
|
vn 0.980800 0.000000 -0.195100
|
||||||
|
vn -0.644500 0.753700 0.128200
|
||||||
|
vn -0.620400 -0.665700 0.414600
|
||||||
|
vn -0.479200 -0.817200 0.320200
|
||||||
|
vn -0.644500 0.753700 -0.128200
|
||||||
|
vn -0.959000 -0.209500 -0.190800
|
||||||
|
vn -0.959000 -0.209500 0.190800
|
||||||
|
vn 0.128200 0.753700 -0.644500
|
||||||
|
vn 0.365100 0.753700 -0.546400
|
||||||
|
vn -0.128200 0.753700 0.644500
|
||||||
|
vn 0.128200 0.753700 0.644500
|
||||||
|
vn 0.365100 0.753700 0.546400
|
||||||
|
vn 0.644500 0.753700 0.128200
|
||||||
|
vn -0.128200 0.753700 -0.644500
|
||||||
|
vn -0.190800 -0.209500 -0.959000
|
||||||
|
vn 0.190800 -0.209500 -0.959000
|
||||||
|
vn 0.320200 -0.817200 0.479200
|
||||||
|
vn 0.546400 0.753700 0.365100
|
||||||
|
vn -0.813000 -0.209500 0.543200
|
||||||
|
vn 0.959000 -0.209500 -0.190800
|
||||||
|
vn 0.543200 -0.209500 0.813000
|
||||||
|
g Cylinder.001_Cylinder.001_None_Cylinder.001_Cylinder.001_None_None_flowers_potted.png
|
||||||
|
s 1
|
||||||
|
f 96/5/3 53/6/4 52/7/5 95/8/6
|
||||||
|
f 44/9/7 54/10/7 42/11/7
|
||||||
|
f 105/12/8 38/13/9 39/14/10 106/15/11
|
||||||
|
f 10/16/12 11/17/13 12/18/14 9/19/15
|
||||||
|
f 21/20/16 22/21/17 20/22/18 19/23/19
|
||||||
|
f 23/24/20 24/25/21 22/21/17 21/20/16
|
||||||
|
f 13/26/22 14/27/23 12/18/14 11/17/13
|
||||||
|
f 98/28/24 99/29/25 49/30/26 51/31/27
|
||||||
|
f 33/32/28 34/33/29 32/34/30 31/35/31
|
||||||
|
f 35/36/32 36/37/33 34/33/29 33/32/28
|
||||||
|
f 99/38/25 98/39/24 24/40/21 26/41/34
|
||||||
|
f 27/42/35 28/43/36 26/44/34 25/45/37
|
||||||
|
f 92/46/38 93/47/39 54/48/40 44/49/41
|
||||||
|
f 40/50/42 39/51/10 38/52/9 37/53/43
|
||||||
|
f 103/54/44 102/55/45 32/56/30 34/57/29
|
||||||
|
f 104/58/46 36/59/33 38/13/9 105/12/8
|
||||||
|
f 90/60/7 44/9/7 42/11/7
|
||||||
|
f 104/61/46 105/62/8 50/63/47 48/64/48
|
||||||
|
f 54/10/7 41/65/7 42/11/7
|
||||||
|
f 66/66/49 31/67/50 29/68/50 68/69/51
|
||||||
|
f 94/70/52 93/71/39 14/72/23 16/73/53
|
||||||
|
f 100/74/54 47/75/55 49/30/26 99/29/25
|
||||||
|
f 19/23/19 20/22/18 18/76/56 17/77/57
|
||||||
|
f 89/78/50 57/79/50 73/80/50
|
||||||
|
f 94/70/52 16/73/53 18/81/56 95/82/6
|
||||||
|
f 25/45/37 26/44/34 24/25/21 23/24/20
|
||||||
|
f 95/82/6 18/81/56 20/83/18 96/84/3
|
||||||
|
f 21/85/50 19/86/50 72/87/58 84/88/59
|
||||||
|
f 63/89/50 89/78/50 73/80/50
|
||||||
|
f 9/90/15 91/91/60 106/15/11 39/14/10
|
||||||
|
f 57/92/35 61/93/61 62/94/62 58/95/63
|
||||||
|
f 67/96/22 65/97/64 66/98/49 68/99/51
|
||||||
|
f 100/100/54 99/38/25 26/41/34 28/101/36
|
||||||
|
f 61/93/61 69/102/31 70/103/65 62/94/62
|
||||||
|
f 15/104/50 13/105/50 62/106/62 70/107/65
|
||||||
|
f 30/108/66 32/56/30 102/55/45 101/109/67
|
||||||
|
f 59/110/28 60/111/68 70/103/65 69/102/31
|
||||||
|
f 102/112/45 103/113/44 46/114/69 55/115/70
|
||||||
|
f 41/65/7 52/116/7 42/11/7
|
||||||
|
f 27/117/50 25/118/50 82/119/71 88/120/72
|
||||||
|
f 89/78/50 65/121/50 67/122/50
|
||||||
|
f 89/78/50 83/123/50 71/124/50
|
||||||
|
f 11/125/50 58/126/63 62/106/62 13/105/50
|
||||||
|
f 59/110/28 71/127/32 72/128/58 60/111/68
|
||||||
|
f 63/129/20 73/130/37 74/131/73 64/132/74
|
||||||
|
f 37/133/50 86/134/75 64/135/74 40/136/50
|
||||||
|
f 52/116/7 53/137/7 42/11/7
|
||||||
|
f 79/138/57 80/139/76 66/98/49 65/97/64
|
||||||
|
f 10/140/50 74/141/73 58/126/63 11/125/50
|
||||||
|
f 78/142/77 23/143/50 21/85/50 84/88/59
|
||||||
|
f 89/78/50 71/124/50 59/144/50
|
||||||
|
f 105/62/8 106/145/11 56/146/78 50/63/47
|
||||||
|
f 49/147/7 47/148/7 42/11/7
|
||||||
|
f 29/149/61 30/150/66 28/43/36 27/42/35
|
||||||
|
f 56/146/78 106/145/11 91/151/60 90/152/79
|
||||||
|
f 81/153/12 87/154/13 88/155/72 82/156/71
|
||||||
|
f 9/19/15 39/51/10 40/50/42 10/16/12
|
||||||
|
f 85/157/16 63/129/20 64/132/74 86/158/75
|
||||||
|
f 20/83/18 22/159/17 97/160/80 96/84/3
|
||||||
|
f 92/46/38 44/49/41 90/152/79 91/151/60
|
||||||
|
f 33/161/50 80/162/76 76/163/81 35/164/50
|
||||||
|
f 89/78/50 75/165/50 79/166/50
|
||||||
|
f 89/78/50 67/122/50 87/167/50
|
||||||
|
f 89/78/50 59/144/50 69/168/50
|
||||||
|
f 50/169/7 56/170/7 42/11/7
|
||||||
|
f 83/171/43 77/172/42 78/173/77 84/174/59
|
||||||
|
f 77/172/42 81/153/12 82/156/71 78/173/77
|
||||||
|
f 98/39/24 97/160/80 22/159/17 24/40/21
|
||||||
|
f 55/175/7 46/176/7 42/11/7
|
||||||
|
f 60/177/68 17/178/50 15/104/50 70/107/65
|
||||||
|
f 45/179/7 42/11/7 53/137/7
|
||||||
|
f 87/154/13 67/96/22 68/99/51 88/155/72
|
||||||
|
f 28/101/36 30/108/66 101/109/67 100/100/54
|
||||||
|
f 72/87/58 19/86/50 17/178/50 60/177/68
|
||||||
|
f 40/136/50 64/135/74 74/141/73 10/140/50
|
||||||
|
f 89/78/50 87/167/50 81/180/50
|
||||||
|
f 51/181/7 49/147/7 42/11/7
|
||||||
|
f 71/127/32 83/171/43 84/174/59 72/128/58
|
||||||
|
f 31/35/31 32/34/30 30/150/66 29/149/61
|
||||||
|
f 93/71/39 92/182/38 12/183/14 14/72/23
|
||||||
|
f 92/182/38 91/91/60 9/90/15 12/183/14
|
||||||
|
f 37/53/43 38/52/9 36/37/33 35/36/32
|
||||||
|
f 17/77/57 18/76/56 16/184/53 15/185/64
|
||||||
|
f 89/78/50 63/89/50 85/186/50
|
||||||
|
f 90/60/7 42/11/7 56/170/7
|
||||||
|
f 101/187/67 102/112/45 55/115/70 43/188/82
|
||||||
|
f 93/47/39 94/189/52 41/190/83 54/48/40
|
||||||
|
f 15/185/64 16/184/53 14/27/23 13/26/22
|
||||||
|
f 89/78/50 79/166/50 65/121/50
|
||||||
|
f 94/189/52 95/8/6 52/7/5 41/190/83
|
||||||
|
f 75/191/19 76/192/81 80/139/76 79/138/57
|
||||||
|
f 97/193/80 98/28/24 51/31/27 45/194/84
|
||||||
|
f 104/58/46 103/54/44 34/57/29 36/59/33
|
||||||
|
f 89/78/50 81/180/50 77/195/50
|
||||||
|
f 85/157/16 86/158/75 76/192/81 75/191/19
|
||||||
|
f 43/196/7 55/175/7 42/11/7
|
||||||
|
f 104/61/46 48/64/48 46/114/69 103/113/44
|
||||||
|
f 89/78/50 85/186/50 75/165/50
|
||||||
|
f 47/148/7 43/196/7 42/11/7
|
||||||
|
f 76/163/81 86/134/75 37/133/50 35/164/50
|
||||||
|
f 100/74/54 101/187/67 43/188/82 47/75/55
|
||||||
|
f 50/169/7 42/11/7 48/197/7
|
||||||
|
f 89/78/50 77/195/50 83/123/50
|
||||||
|
f 96/5/3 97/193/80 45/194/84 53/6/4
|
||||||
|
f 89/78/50 69/168/50 61/198/50
|
||||||
|
f 25/118/50 23/143/50 78/142/77 82/119/71
|
||||||
|
f 48/197/7 42/11/7 46/176/7
|
||||||
|
f 88/120/72 68/69/51 29/68/50 27/117/50
|
||||||
|
f 66/66/49 80/162/76 33/161/50 31/67/50
|
||||||
|
f 89/78/50 61/198/50 57/79/50
|
||||||
|
f 51/181/7 42/11/7 45/179/7
|
||||||
|
f 73/130/37 57/92/35 58/95/63 74/131/73
|
After Width: | Height: | Size: 816 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
mods/homedecor_modpack/homedecor/textures/homedecor_potted.png
Normal file
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 276 B |
After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 131 B |
After Width: | Height: | Size: 133 B |
After Width: | Height: | Size: 163 B |
After Width: | Height: | Size: 136 B |
After Width: | Height: | Size: 143 B |
After Width: | Height: | Size: 130 B |
@ -17,7 +17,6 @@ homedecor.register("trash_can_green", {
|
|||||||
on_punch = function(pos, node, puncher, pointed_thing)
|
on_punch = function(pos, node, puncher, pointed_thing)
|
||||||
minetest.set_node(pos, {name = "homedecor:trash_can_green_open", param2 = node.param2})
|
minetest.set_node(pos, {name = "homedecor:trash_can_green_open", param2 = node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
homedecor.register("trash_can_green_open", {
|
homedecor.register("trash_can_green_open", {
|
||||||
@ -27,6 +26,7 @@ homedecor.register("trash_can_green_open", {
|
|||||||
groups = {snappy=3, not_in_creative_inventory=1},
|
groups = {snappy=3, not_in_creative_inventory=1},
|
||||||
selection_box = tg_cbox,
|
selection_box = tg_cbox,
|
||||||
collision_box = tg_cbox,
|
collision_box = tg_cbox,
|
||||||
|
drop = "homedecor:trash_can_green",
|
||||||
on_punch = function(pos, node, puncher, pointed_thing)
|
on_punch = function(pos, node, puncher, pointed_thing)
|
||||||
minetest.set_node(pos, {name = "homedecor:trash_can_green", param2 = node.param2})
|
minetest.set_node(pos, {name = "homedecor:trash_can_green", param2 = node.param2})
|
||||||
end,
|
end,
|
||||||
@ -65,7 +65,7 @@ homedecor.register("trash_can_green_open", {
|
|||||||
inv:set_list("main", {})
|
inv:set_list("main", {})
|
||||||
minetest.sound_play("homedecor_trash_all", {to_player=sender:get_player_name(), gain = 1.0})
|
minetest.sound_play("homedecor_trash_all", {to_player=sender:get_player_name(), gain = 1.0})
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
local trash_cbox = {
|
local trash_cbox = {
|
||||||
|
@ -1,165 +0,0 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
|
|
||||||
This version of the GNU Lesser General Public License incorporates
|
|
||||||
the terms and conditions of version 3 of the GNU General Public
|
|
||||||
License, supplemented by the additional permissions listed below.
|
|
||||||
|
|
||||||
0. Additional Definitions.
|
|
||||||
|
|
||||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
||||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
||||||
General Public License.
|
|
||||||
|
|
||||||
"The Library" refers to a covered work governed by this License,
|
|
||||||
other than an Application or a Combined Work as defined below.
|
|
||||||
|
|
||||||
An "Application" is any work that makes use of an interface provided
|
|
||||||
by the Library, but which is not otherwise based on the Library.
|
|
||||||
Defining a subclass of a class defined by the Library is deemed a mode
|
|
||||||
of using an interface provided by the Library.
|
|
||||||
|
|
||||||
A "Combined Work" is a work produced by combining or linking an
|
|
||||||
Application with the Library. The particular version of the Library
|
|
||||||
with which the Combined Work was made is also called the "Linked
|
|
||||||
Version".
|
|
||||||
|
|
||||||
The "Minimal Corresponding Source" for a Combined Work means the
|
|
||||||
Corresponding Source for the Combined Work, excluding any source code
|
|
||||||
for portions of the Combined Work that, considered in isolation, are
|
|
||||||
based on the Application, and not on the Linked Version.
|
|
||||||
|
|
||||||
The "Corresponding Application Code" for a Combined Work means the
|
|
||||||
object code and/or source code for the Application, including any data
|
|
||||||
and utility programs needed for reproducing the Combined Work from the
|
|
||||||
Application, but excluding the System Libraries of the Combined Work.
|
|
||||||
|
|
||||||
1. Exception to Section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
You may convey a covered work under sections 3 and 4 of this License
|
|
||||||
without being bound by section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
2. Conveying Modified Versions.
|
|
||||||
|
|
||||||
If you modify a copy of the Library, and, in your modifications, a
|
|
||||||
facility refers to a function or data to be supplied by an Application
|
|
||||||
that uses the facility (other than as an argument passed when the
|
|
||||||
facility is invoked), then you may convey a copy of the modified
|
|
||||||
version:
|
|
||||||
|
|
||||||
a) under this License, provided that you make a good faith effort to
|
|
||||||
ensure that, in the event an Application does not supply the
|
|
||||||
function or data, the facility still operates, and performs
|
|
||||||
whatever part of its purpose remains meaningful, or
|
|
||||||
|
|
||||||
b) under the GNU GPL, with none of the additional permissions of
|
|
||||||
this License applicable to that copy.
|
|
||||||
|
|
||||||
3. Object Code Incorporating Material from Library Header Files.
|
|
||||||
|
|
||||||
The object code form of an Application may incorporate material from
|
|
||||||
a header file that is part of the Library. You may convey such object
|
|
||||||
code under terms of your choice, provided that, if the incorporated
|
|
||||||
material is not limited to numerical parameters, data structure
|
|
||||||
layouts and accessors, or small macros, inline functions and templates
|
|
||||||
(ten or fewer lines in length), you do both of the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the object code that the
|
|
||||||
Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
4. Combined Works.
|
|
||||||
|
|
||||||
You may convey a Combined Work under terms of your choice that,
|
|
||||||
taken together, effectively do not restrict modification of the
|
|
||||||
portions of the Library contained in the Combined Work and reverse
|
|
||||||
engineering for debugging such modifications, if you also do each of
|
|
||||||
the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the Combined Work that
|
|
||||||
the Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
c) For a Combined Work that displays copyright notices during
|
|
||||||
execution, include the copyright notice for the Library among
|
|
||||||
these notices, as well as a reference directing the user to the
|
|
||||||
copies of the GNU GPL and this license document.
|
|
||||||
|
|
||||||
d) Do one of the following:
|
|
||||||
|
|
||||||
0) Convey the Minimal Corresponding Source under the terms of this
|
|
||||||
License, and the Corresponding Application Code in a form
|
|
||||||
suitable for, and under terms that permit, the user to
|
|
||||||
recombine or relink the Application with a modified version of
|
|
||||||
the Linked Version to produce a modified Combined Work, in the
|
|
||||||
manner specified by section 6 of the GNU GPL for conveying
|
|
||||||
Corresponding Source.
|
|
||||||
|
|
||||||
1) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (a) uses at run time
|
|
||||||
a copy of the Library already present on the user's computer
|
|
||||||
system, and (b) will operate properly with a modified version
|
|
||||||
of the Library that is interface-compatible with the Linked
|
|
||||||
Version.
|
|
||||||
|
|
||||||
e) Provide Installation Information, but only if you would otherwise
|
|
||||||
be required to provide such information under section 6 of the
|
|
||||||
GNU GPL, and only to the extent that such information is
|
|
||||||
necessary to install and execute a modified version of the
|
|
||||||
Combined Work produced by recombining or relinking the
|
|
||||||
Application with a modified version of the Linked Version. (If
|
|
||||||
you use option 4d0, the Installation Information must accompany
|
|
||||||
the Minimal Corresponding Source and Corresponding Application
|
|
||||||
Code. If you use option 4d1, you must provide the Installation
|
|
||||||
Information in the manner specified by section 6 of the GNU GPL
|
|
||||||
for conveying Corresponding Source.)
|
|
||||||
|
|
||||||
5. Combined Libraries.
|
|
||||||
|
|
||||||
You may place library facilities that are a work based on the
|
|
||||||
Library side by side in a single library together with other library
|
|
||||||
facilities that are not Applications and are not covered by this
|
|
||||||
License, and convey such a combined library under terms of your
|
|
||||||
choice, if you do both of the following:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work based
|
|
||||||
on the Library, uncombined with any other library facilities,
|
|
||||||
conveyed under the terms of this License.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library that part of it
|
|
||||||
is a work based on the Library, and explaining where to find the
|
|
||||||
accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
6. Revised Versions of the GNU Lesser General Public License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the GNU Lesser General Public License from time to time. Such new
|
|
||||||
versions will be similar in spirit to the present version, but may
|
|
||||||
differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Library as you received it specifies that a certain numbered version
|
|
||||||
of the GNU Lesser General Public License "or any later version"
|
|
||||||
applies to it, you have the option of following the terms and
|
|
||||||
conditions either of that published version or of any later version
|
|
||||||
published by the Free Software Foundation. If the Library as you
|
|
||||||
received it does not specify a version number of the GNU Lesser
|
|
||||||
General Public License, you may choose any version of the GNU Lesser
|
|
||||||
General Public License ever published by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Library as you received it specifies that a proxy can decide
|
|
||||||
whether future versions of the GNU Lesser General Public License shall
|
|
||||||
apply, that proxy's public statement of acceptance of any version is
|
|
||||||
permanent authorization for you to choose that version for the
|
|
||||||
Library.
|
|
@ -1,4 +1,5 @@
|
|||||||
local inbox = {}
|
local inbox = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output ="inbox:empty",
|
output ="inbox:empty",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local tmp = {}
|
local tmp = {}
|
||||||
local itemframes = {}
|
itemframes = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
minetest.register_entity("itemframes:item",{
|
minetest.register_entity("itemframes:item",{
|
||||||
hp_max = 1,
|
hp_max = 1,
|
||||||
@ -68,11 +69,11 @@ local update_item = function(pos, node)
|
|||||||
if node.name == "itemframes:frame" then
|
if node.name == "itemframes:frame" then
|
||||||
local posad = facedir[node.param2]
|
local posad = facedir[node.param2]
|
||||||
if not posad then return end
|
if not posad then return end
|
||||||
pos.x = pos.x + posad.x*6.5/16
|
pos.x = pos.x + posad.x*6.5/16
|
||||||
pos.y = pos.y + posad.y*6.5/16
|
pos.y = pos.y + posad.y*6.5/16
|
||||||
pos.z = pos.z + posad.z*6.5/16
|
pos.z = pos.z + posad.z*6.5/16
|
||||||
elseif minetest.get_item_group(node.name, "group:pedestal") then
|
elseif minetest.get_item_group(node.name, "group:pedestal") then
|
||||||
pos.y = pos.y + 12/16+.33
|
pos.y = pos.y + 12/16+.33
|
||||||
end
|
end
|
||||||
tmp.nodename = node.name
|
tmp.nodename = node.name
|
||||||
tmp.texture = ItemStack(meta:get_string("item")):get_name()
|
tmp.texture = ItemStack(meta:get_string("item")):get_name()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
lrfurn = {}
|
lrfurn = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
lrfurn.fdir_to_fwd = {
|
lrfurn.fdir_to_fwd = {
|
||||||
{ 0, 1 },
|
{ 0, 1 },
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
minetest.register_node("plasmascreen:stand", {
|
minetest.register_node("plasmascreen:stand", {
|
||||||
description = "Plasma Screen TV Stand",
|
description = "Plasma Screen TV Stand",
|
||||||
tiles = {"plasmascreen_back.png"},
|
tiles = {"plasmascreen_back.png"},
|
||||||
@ -142,6 +144,7 @@ minetest.register_node("plasmascreen:tv_off", {
|
|||||||
light_source = 10,
|
light_source = 10,
|
||||||
selection_box = tv_cbox,
|
selection_box = tv_cbox,
|
||||||
collision_box = tv_cbox,
|
collision_box = tv_cbox,
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
if not checkwall(pos) then
|
if not checkwall(pos) then
|
||||||
|
@ -1,165 +0,0 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
|
|
||||||
This version of the GNU Lesser General Public License incorporates
|
|
||||||
the terms and conditions of version 3 of the GNU General Public
|
|
||||||
License, supplemented by the additional permissions listed below.
|
|
||||||
|
|
||||||
0. Additional Definitions.
|
|
||||||
|
|
||||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
||||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
||||||
General Public License.
|
|
||||||
|
|
||||||
"The Library" refers to a covered work governed by this License,
|
|
||||||
other than an Application or a Combined Work as defined below.
|
|
||||||
|
|
||||||
An "Application" is any work that makes use of an interface provided
|
|
||||||
by the Library, but which is not otherwise based on the Library.
|
|
||||||
Defining a subclass of a class defined by the Library is deemed a mode
|
|
||||||
of using an interface provided by the Library.
|
|
||||||
|
|
||||||
A "Combined Work" is a work produced by combining or linking an
|
|
||||||
Application with the Library. The particular version of the Library
|
|
||||||
with which the Combined Work was made is also called the "Linked
|
|
||||||
Version".
|
|
||||||
|
|
||||||
The "Minimal Corresponding Source" for a Combined Work means the
|
|
||||||
Corresponding Source for the Combined Work, excluding any source code
|
|
||||||
for portions of the Combined Work that, considered in isolation, are
|
|
||||||
based on the Application, and not on the Linked Version.
|
|
||||||
|
|
||||||
The "Corresponding Application Code" for a Combined Work means the
|
|
||||||
object code and/or source code for the Application, including any data
|
|
||||||
and utility programs needed for reproducing the Combined Work from the
|
|
||||||
Application, but excluding the System Libraries of the Combined Work.
|
|
||||||
|
|
||||||
1. Exception to Section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
You may convey a covered work under sections 3 and 4 of this License
|
|
||||||
without being bound by section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
2. Conveying Modified Versions.
|
|
||||||
|
|
||||||
If you modify a copy of the Library, and, in your modifications, a
|
|
||||||
facility refers to a function or data to be supplied by an Application
|
|
||||||
that uses the facility (other than as an argument passed when the
|
|
||||||
facility is invoked), then you may convey a copy of the modified
|
|
||||||
version:
|
|
||||||
|
|
||||||
a) under this License, provided that you make a good faith effort to
|
|
||||||
ensure that, in the event an Application does not supply the
|
|
||||||
function or data, the facility still operates, and performs
|
|
||||||
whatever part of its purpose remains meaningful, or
|
|
||||||
|
|
||||||
b) under the GNU GPL, with none of the additional permissions of
|
|
||||||
this License applicable to that copy.
|
|
||||||
|
|
||||||
3. Object Code Incorporating Material from Library Header Files.
|
|
||||||
|
|
||||||
The object code form of an Application may incorporate material from
|
|
||||||
a header file that is part of the Library. You may convey such object
|
|
||||||
code under terms of your choice, provided that, if the incorporated
|
|
||||||
material is not limited to numerical parameters, data structure
|
|
||||||
layouts and accessors, or small macros, inline functions and templates
|
|
||||||
(ten or fewer lines in length), you do both of the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the object code that the
|
|
||||||
Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
4. Combined Works.
|
|
||||||
|
|
||||||
You may convey a Combined Work under terms of your choice that,
|
|
||||||
taken together, effectively do not restrict modification of the
|
|
||||||
portions of the Library contained in the Combined Work and reverse
|
|
||||||
engineering for debugging such modifications, if you also do each of
|
|
||||||
the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the Combined Work that
|
|
||||||
the Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
c) For a Combined Work that displays copyright notices during
|
|
||||||
execution, include the copyright notice for the Library among
|
|
||||||
these notices, as well as a reference directing the user to the
|
|
||||||
copies of the GNU GPL and this license document.
|
|
||||||
|
|
||||||
d) Do one of the following:
|
|
||||||
|
|
||||||
0) Convey the Minimal Corresponding Source under the terms of this
|
|
||||||
License, and the Corresponding Application Code in a form
|
|
||||||
suitable for, and under terms that permit, the user to
|
|
||||||
recombine or relink the Application with a modified version of
|
|
||||||
the Linked Version to produce a modified Combined Work, in the
|
|
||||||
manner specified by section 6 of the GNU GPL for conveying
|
|
||||||
Corresponding Source.
|
|
||||||
|
|
||||||
1) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (a) uses at run time
|
|
||||||
a copy of the Library already present on the user's computer
|
|
||||||
system, and (b) will operate properly with a modified version
|
|
||||||
of the Library that is interface-compatible with the Linked
|
|
||||||
Version.
|
|
||||||
|
|
||||||
e) Provide Installation Information, but only if you would otherwise
|
|
||||||
be required to provide such information under section 6 of the
|
|
||||||
GNU GPL, and only to the extent that such information is
|
|
||||||
necessary to install and execute a modified version of the
|
|
||||||
Combined Work produced by recombining or relinking the
|
|
||||||
Application with a modified version of the Linked Version. (If
|
|
||||||
you use option 4d0, the Installation Information must accompany
|
|
||||||
the Minimal Corresponding Source and Corresponding Application
|
|
||||||
Code. If you use option 4d1, you must provide the Installation
|
|
||||||
Information in the manner specified by section 6 of the GNU GPL
|
|
||||||
for conveying Corresponding Source.)
|
|
||||||
|
|
||||||
5. Combined Libraries.
|
|
||||||
|
|
||||||
You may place library facilities that are a work based on the
|
|
||||||
Library side by side in a single library together with other library
|
|
||||||
facilities that are not Applications and are not covered by this
|
|
||||||
License, and convey such a combined library under terms of your
|
|
||||||
choice, if you do both of the following:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work based
|
|
||||||
on the Library, uncombined with any other library facilities,
|
|
||||||
conveyed under the terms of this License.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library that part of it
|
|
||||||
is a work based on the Library, and explaining where to find the
|
|
||||||
accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
6. Revised Versions of the GNU Lesser General Public License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the GNU Lesser General Public License from time to time. Such new
|
|
||||||
versions will be similar in spirit to the present version, but may
|
|
||||||
differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Library as you received it specifies that a certain numbered version
|
|
||||||
of the GNU Lesser General Public License "or any later version"
|
|
||||||
applies to it, you have the option of following the terms and
|
|
||||||
conditions either of that published version or of any later version
|
|
||||||
published by the Free Software Foundation. If the Library as you
|
|
||||||
received it does not specify a version number of the GNU Lesser
|
|
||||||
General Public License, you may choose any version of the GNU Lesser
|
|
||||||
General Public License ever published by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Library as you received it specifies that a proxy can decide
|
|
||||||
whether future versions of the GNU Lesser General Public License shall
|
|
||||||
apply, that proxy's public statement of acceptance of any version is
|
|
||||||
permanent authorization for you to choose that version for the
|
|
||||||
Library.
|
|
@ -11,12 +11,12 @@
|
|||||||
-- }
|
-- }
|
||||||
|
|
||||||
signs_lib = {}
|
signs_lib = {}
|
||||||
|
screwdriver = screwdriver or {}
|
||||||
|
|
||||||
local screwdriver = screwdriver or {}
|
|
||||||
signs_lib.wallmounted_rotate = function(pos, node, user, mode, new_param2)
|
signs_lib.wallmounted_rotate = function(pos, node, user, mode, new_param2)
|
||||||
if mode ~= screwdriver.ROTATE_AXIS then return false end
|
if mode ~= screwdriver.ROTATE_AXIS then return false end
|
||||||
minetest.swap_node(pos, {name = node.name, param2 = (node.param2 + 1) % 6})
|
minetest.swap_node(pos, {name = node.name, param2 = (node.param2 + 1) % 6})
|
||||||
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
for _, v in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do
|
||||||
local e = v:get_luaentity()
|
local e = v:get_luaentity()
|
||||||
if e and e.name == "signs:text" then
|
if e and e.name == "signs:text" then
|
||||||
v:remove()
|
v:remove()
|
||||||
|
@ -162,3 +162,4 @@ irc:register_bot_command("players", {
|
|||||||
..table.concat(names, ", ")
|
..table.concat(names, ", ")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -26,4 +26,4 @@ local function setting(settingtype, name, default)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Show Map Tools stuff in creative inventory (1 or 0):
|
-- Show Map Tools stuff in creative inventory (1 or 0):
|
||||||
setting("integer", "hide_from_creative_inventory", 0)
|
setting("integer", "hide_from_creative_inventory", 0)
|
||||||
|
@ -190,7 +190,7 @@ minetest.register_node("maptools:sandstone", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("maptools:sandstonebrick", {
|
minetest.register_node("maptools:sandstone_brick", {
|
||||||
description = S("Unbreakable Sandstone Brick"),
|
description = S("Unbreakable Sandstone Brick"),
|
||||||
range = 12,
|
range = 12,
|
||||||
stack_max = 10000,
|
stack_max = 10000,
|
||||||
|
Before Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 161 B |
@ -82,19 +82,3 @@ if minetest.registered_nodes["doors:trapdoor"] then
|
|||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.registered_nodes["doors:trapdoor_cherry"] then
|
|
||||||
minetest.override_item("doors:trapdoor_cherry", {
|
|
||||||
mesecons = {effector = {
|
|
||||||
action_on = trapdoor_switch,
|
|
||||||
action_off = trapdoor_switch
|
|
||||||
}},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.override_item("doors:trapdoor_cherry_open", {
|
|
||||||
mesecons = {effector = {
|
|
||||||
action_on = trapdoor_switch,
|
|
||||||
action_off = trapdoor_switch
|
|
||||||
}},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
@ -239,6 +239,7 @@ HADES_THRONE_ENDPOS_ABS = {x=htx, y=hty, z=htz}]]
|
|||||||
local c
|
local c
|
||||||
local function define_contents()
|
local function define_contents()
|
||||||
c = {
|
c = {
|
||||||
|
ignore = minetest.get_content_id("ignore"),
|
||||||
air = minetest.get_content_id("air"),
|
air = minetest.get_content_id("air"),
|
||||||
lava = minetest.get_content_id("default:lava_source"),
|
lava = minetest.get_content_id("default:lava_source"),
|
||||||
gravel = minetest.get_content_id("default:gravel"),
|
gravel = minetest.get_content_id("default:gravel"),
|
||||||
@ -397,10 +398,12 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
local forest_possible = maxp.y > f_h_min and minp.y < f_h_max
|
local forest_possible = maxp.y > f_h_min and minp.y < f_h_max
|
||||||
|
|
||||||
--local pmap_f_bottom = minetest.get_perlin_map(perlins.forest_bottom, map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z})
|
--local pmap_f_bottom = minetest.get_perlin_map(perlins.forest_bottom, map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z})
|
||||||
local perlin_f_bottom, pmap_f_top
|
local perlin_f_bottom, pmap_f_top, strassx, strassz
|
||||||
if forest_possible then
|
if forest_possible then
|
||||||
perlin_f_bottom = minetest.get_perlin(11, 3, 0.8, tmp2)
|
perlin_f_bottom = minetest.get_perlin(11, 3, 0.8, tmp2)
|
||||||
pmap_f_top = minetest.get_perlin_map(perlins.forest_top, map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z})
|
pmap_f_top = minetest.get_perlin_map(perlins.forest_top, map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z})
|
||||||
|
strassx = get_ws_list(2, minp.x)
|
||||||
|
strassz = get_ws_list(2, minp.z)
|
||||||
end
|
end
|
||||||
|
|
||||||
local num2, tab2
|
local num2, tab2
|
||||||
@ -479,8 +482,13 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
if not f_perlins[pstr] then
|
if not f_perlins[pstr] then
|
||||||
f_perlins[pstr] = math.floor(f_h_min+(math.abs(perlin_f_bottom:get2d({x=p.x, y=p.z})+1))*f_yscale_bottom+0.5)
|
f_perlins[pstr] = math.floor(f_h_min+(math.abs(perlin_f_bottom:get2d({x=p.x, y=p.z})+1))*f_yscale_bottom+0.5)
|
||||||
end
|
end
|
||||||
f_bottom = f_perlins[pstr]+math.random(0,f_bottom_scale-1)
|
local top_noise = pmap_f_top[count]+1
|
||||||
f_top = math.floor(f_h_max-(pmap_f_top[count]+1)*f_yscale_top+0.5)
|
if top_noise < 0 then
|
||||||
|
top_noise = -top_noise/10
|
||||||
|
--nether:inform("ERROR: (perlin noise) "..pmap_f_top[count].." is not inside [-1; 1]", 1)
|
||||||
|
end
|
||||||
|
f_top = math.floor(f_h_max - top_noise*f_yscale_top + 0.5)
|
||||||
|
f_bottom = f_perlins[pstr]+pr:next(0,f_bottom_scale-1)
|
||||||
is_forest = f_bottom < f_top
|
is_forest = f_bottom < f_top
|
||||||
f_h_dirt = f_bottom-pr:next(0,1)
|
f_h_dirt = f_bottom-pr:next(0,1)
|
||||||
end
|
end
|
||||||
@ -540,6 +548,18 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
) then
|
) then
|
||||||
data[p_addpos] = c.air
|
data[p_addpos] = c.air
|
||||||
end
|
end
|
||||||
|
elseif is_forest
|
||||||
|
and y == f_top then
|
||||||
|
local sel = math.floor(strassx[x]+strassz[z]+0.5)%10
|
||||||
|
if sel <= 5 then
|
||||||
|
data[p_addpos] = return_nether_ore(d_p_addp, true)
|
||||||
|
elseif sel == 6 then
|
||||||
|
data[p_addpos] = c.netherrack_black
|
||||||
|
elseif sel == 7 then
|
||||||
|
data[p_addpos] = c.glowstone
|
||||||
|
else
|
||||||
|
data[p_addpos] = c.air
|
||||||
|
end
|
||||||
|
|
||||||
elseif y <= NETHER_BOTTOM then
|
elseif y <= NETHER_BOTTOM then
|
||||||
if y <= bottom then
|
if y <= bottom then
|
||||||
@ -668,6 +688,10 @@ function nether.grow_netherstructure(pos, generated)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function soft_node(id)
|
||||||
|
return id == c.air or id == c.ignore
|
||||||
|
end
|
||||||
|
|
||||||
local function update_minmax(min, max, p)
|
local function update_minmax(min, max, p)
|
||||||
min.x = math.min(min.x, p.x)
|
min.x = math.min(min.x, p.x)
|
||||||
max.x = math.max(max.x, p.x)
|
max.x = math.max(max.x, p.x)
|
||||||
@ -840,7 +864,7 @@ function nether.grow_tree(pos, generated)
|
|||||||
|
|
||||||
for _,p in pairs(leaf_ps) do
|
for _,p in pairs(leaf_ps) do
|
||||||
p = area:indexp(p)
|
p = area:indexp(p)
|
||||||
if nodes[p] == c.air then
|
if soft_node(nodes[p]) then
|
||||||
nodes[p] = c.nether_leaves
|
nodes[p] = c.nether_leaves
|
||||||
param2s[p] = math.random(0,44)
|
param2s[p] = math.random(0,44)
|
||||||
end
|
end
|
||||||
@ -848,7 +872,7 @@ function nether.grow_tree(pos, generated)
|
|||||||
|
|
||||||
for _,p in pairs(fruit_ps) do
|
for _,p in pairs(fruit_ps) do
|
||||||
p = area:indexp(p)
|
p = area:indexp(p)
|
||||||
if nodes[p] == c.air then
|
if soft_node(nodes[p]) then
|
||||||
nodes[p] = c.nether_apple
|
nodes[p] = c.nether_apple
|
||||||
--param2s[p] = math.random(0,44)
|
--param2s[p] = math.random(0,44)
|
||||||
end
|
end
|
||||||
|