2020-06-13 13:41:56 +02:00
|
|
|
-- Audio API (Internal)
|
|
|
|
--
|
|
|
|
-- Contains functions for providing audio feedback
|
2020-06-10 13:02:46 +02:00
|
|
|
local audio = {
|
|
|
|
-- Play a feedback sound localized on the given player
|
2020-06-13 13:41:56 +02:00
|
|
|
--
|
2020-06-10 13:02:46 +02:00
|
|
|
-- sound: The sound to play
|
|
|
|
-- player: The player who triggered the sound
|
|
|
|
play_feedback = function(sound, player)
|
|
|
|
minetest.sound_play(sound, { pos=player:get_pos(), max_hear_distance=5 }, true);
|
|
|
|
end
|
|
|
|
};
|
|
|
|
|
|
|
|
return audio;
|