From 1ef8d0570bcae1b4b2b26637c403b96bf4d2d3b8 Mon Sep 17 00:00:00 2001 From: phenine <99gs3fnr@anonaddy.me> Date: Fri, 6 Sep 2024 00:45:08 +0800 Subject: [PATCH] `openmw.ambient` grammar, punctuation and wording tweaks --- files/lua_api/openmw/ambient.lua | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/files/lua_api/openmw/ambient.lua b/files/lua_api/openmw/ambient.lua index ff776f84fb..af854510a1 100644 --- a/files/lua_api/openmw/ambient.lua +++ b/files/lua_api/openmw/ambient.lua @@ -1,6 +1,6 @@ --- --- `openmw.ambient` controls background sounds, specific to given player (2D-sounds). --- Can be used only by menu scripts and local scripts, that are attached to a player. +-- `openmw.ambient` controls background 2D sounds specific to a given player. +-- Can be used only by menu scripts and local scripts that are attached to a player. -- @module ambient -- @usage local ambient = require('openmw.ambient') @@ -12,11 +12,11 @@ -- @param #string soundId ID of Sound record to play -- @param #table options An optional table with additional optional arguments. Can contain: -- --- * `timeOffset` - a floating point number >= 0, to skip some time (in seconds) from beginning of sound file (default: 0); --- * `volume` - a floating point number >= 0, to set a sound volume (default: 1); --- * `pitch` - a floating point number >= 0, to set a sound pitch (default: 1); --- * `scale` - a boolean, to set if sound pitch should be scaled by simulation time scaling (default: true); --- * `loop` - a boolean, to set if sound should be repeated when it ends (default: false); +-- * `timeOffset` - a floating point number >= 0, to skip some time (in seconds) from the beginning of the sound (default: 0); +-- * `volume` - a floating point number >= 0, to set the sound's volume (default: 1); +-- * `pitch` - a floating point number >= 0, to set the sound's pitch (default: 1); +-- * `scale` - a boolean, to set if the sound's pitch should be scaled by simulation time scaling (default: true); +-- * `loop` - a boolean, to set if the sound should be repeated when it ends (default: false); -- @usage local params = { -- timeOffset=0.1 -- volume=0.3, @@ -29,14 +29,14 @@ --- -- Play a 2D sound file -- @function [parent=#ambient] playSoundFile --- @param #string fileName Path to sound file in VFS +-- @param #string fileName Path to a sound file in VFS -- @param #table options An optional table with additional optional arguments. Can contain: -- --- * `timeOffset` - a floating point number >= 0, to skip some time (in seconds) from beginning of sound file (default: 0); --- * `volume` - a floating point number >= 0, to set a sound volume (default: 1); --- * `pitch` - a floating point number >= 0, to set a sound pitch (default: 1); --- * `scale` - a boolean, to set if sound pitch should be scaled by simulation time scaling (default: true); --- * `loop` - a boolean, to set if sound should be repeated when it ends (default: false); +-- * `timeOffset` - a floating point number >= 0, to skip some time (in seconds) from the beginning of the sound file (default: 0); +-- * `volume` - a floating point number >= 0, to set a the sound's volume (default: 1); +-- * `pitch` - a floating point number >= 0, to set a the sound's pitch (default: 1); +-- * `scale` - a boolean, to set if the sound's pitch should be scaled by simulation time scaling (default: true); +-- * `loop` - a boolean, to set if the sound should be repeated when it ends (default: false); -- @usage local params = { -- timeOffset=0.1 -- volume=0.3, @@ -55,37 +55,37 @@ --- -- Stop a sound file -- @function [parent=#ambient] stopSoundFile --- @param #string fileName Path to sound file in VFS +-- @param #string fileName Path to a sound file in VFS -- @usage ambient.stopSoundFile("Sound\\test.mp3"); --- --- Check if sound is playing +-- Check if a sound is playing -- @function [parent=#ambient] isSoundPlaying -- @param #string soundId ID of Sound record to check -- @return #boolean -- @usage local isPlaying = ambient.isSoundPlaying("shock bolt"); --- --- Check if sound file is playing +-- Check if a sound file is playing -- @function [parent=#ambient] isSoundFilePlaying --- @param #string fileName Path to sound file in VFS +-- @param #string fileName Path to a sound file in VFS -- @return #boolean -- @usage local isPlaying = ambient.isSoundFilePlaying("Sound\\test.mp3"); --- -- Play a sound file as a music track -- @function [parent=#ambient] streamMusic --- @param #string fileName Path to file in VFS +-- @param #string fileName Path to a file in VFS -- @param #table options An optional table with additional optional arguments. Can contain: -- --- * `fadeOut` - a floating point number >= 0, time (in seconds) to fade out current track before playing this one (default 1.0); +-- * `fadeOut` - a floating point number >= 0, time (in seconds) to fade out the current track before playing this one (default 1.0); -- @usage local params = { -- fadeOut=2.0 -- }; -- ambient.streamMusic("Music\\Test\\Test.mp3", params) --- --- Stop to play current music +-- Stop the currently playing music -- @function [parent=#ambient] stopMusic -- @usage ambient.stopMusic(); @@ -98,7 +98,7 @@ --- -- Play an ambient voiceover. -- @function [parent=#ambient] say --- @param #string fileName Path to sound file in VFS +-- @param #string fileName Path to a sound file in VFS -- @param #string text Subtitle text (optional) -- @usage -- play voiceover and print messagebox -- ambient.say("Sound\\Vo\\Misc\\voice.mp3", "Subtitle text") @@ -108,7 +108,7 @@ --- -- Stop an ambient voiceover -- @function [parent=#ambient] stopSay --- @param #string fileName Path to sound file in VFS +-- @param #string fileName Path to a sound file in VFS -- @usage ambient.stopSay(); ---