From c81ef856ea64613b6c01155b2a1ad43d5016ab0b Mon Sep 17 00:00:00 2001 From: Bs0Dd Date: Wed, 6 Jul 2022 13:15:45 +0200 Subject: [PATCH] Ranges for playSound variables --- src/main/resources/assets/oc2/doc/en_us/item/sound_card.md | 4 ++-- src/main/resources/assets/oc2/doc/ru_ru/item/sound_card.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/resources/assets/oc2/doc/en_us/item/sound_card.md b/src/main/resources/assets/oc2/doc/en_us/item/sound_card.md index cf52da1d..d8eae234 100644 --- a/src/main/resources/assets/oc2/doc/en_us/item/sound_card.md +++ b/src/main/resources/assets/oc2/doc/en_us/item/sound_card.md @@ -14,8 +14,8 @@ Device name: `sound` ### Methods `playSound(name:string[,volume,pitch])` plays back the sound effect with the specified name. - `name` is the name of the effect to play. -- `volume` is the volume at which to play the effect, with `1` being the normal volume. Optional, defaulting to `1`. -- `pitch` is the volume at which to play the effect, with `1` being the normal pitch. Optional, defaulting to `1`. +- `volume` is the volume at which to play the effect in the range from `0` to `1`, with `1` being the normal volume. Optional, defaulting to `1`. +- `pitch` is the pitch at which to play the effect in the range from `0.5` to `2`, with `1` being the normal pitch. Optional, defaulting to `1`. - Throws if the specified name is invalid. `findSound(name:string):table` returns a list of available sound effects matching the given name. Note that the number of results is limited, so overly generic queries will result in truncated results. diff --git a/src/main/resources/assets/oc2/doc/ru_ru/item/sound_card.md b/src/main/resources/assets/oc2/doc/ru_ru/item/sound_card.md index 65be26af..7ed7cd2e 100644 --- a/src/main/resources/assets/oc2/doc/ru_ru/item/sound_card.md +++ b/src/main/resources/assets/oc2/doc/ru_ru/item/sound_card.md @@ -12,8 +12,10 @@ Название устройства: `sound` ### Методы -`playSound(name:string)` проигрывает звуковой эффект с указанным именем. +`playSound(name:string[,volume,pitch])` проигрывает звуковой эффект с указанным именем. - `name` - название эффекта для проигрывания. +- `volume` - громкость проигрывания эффекта в диапазоне от `0` до `1`, где `1` - нормальная громкость. Опционально, по умолчанию `1`. +- `pitch` - высота звука для проигрываемого эффекта в диапазоне от `0.5` до `2`, где `1` - нормальная высота. Опционально, по умолчанию `1`. - Создает ошибку, если такого эффекта не существует. `findSound(name:string):table` возвращает список доступных звуковых эффектов с таким именем. Учитывайте, что количество выдаваемых результатов ограничено, поэтому запросы с большим количеством результатов будут обрезаться.