Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
This package has been marked as deprecated, and it's suggested another
alternative is used.
AudibleDistanceLib
A small library for audible distance determination.
| Last updated | 2 years ago |
| Total downloads | 52536 |
| Total rating | 1 |
| Categories | Libraries |
| Dependency string | JustJelly-AudibleDistanceLib-0.0.0 |
| Dependants | 87 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
AudibleDistanceLib
A small library for audible distance determination.
Usage
Example
using static AudibleDistanceLib.AudibleDistanceLib;
[HarmonyPrefix]
[HarmonyPatch(nameof(AudioSource.PlayOneShotHelper), new[] { typeof(AudioSource), typeof(AudioClip), typeof(float) })]
public static void PlayOneShotHelper_Prefix(AudioSource source, ref AudioClip clip, float volumeScale)
{
if (IsInWithinAudiableDistance(GameNetworkManager.Instance, audioSource, volumeScale, minimumAudibleVolume: 12f))
{
// do something
}
}