Tweak "Parallel Same-Sound Limit" Option #594
Open
+12
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So there are a couple things I'd like to pitch here... But first, I need to explain what my main issue with this option is in its current form.
I will admit I didn't understand what this option was supposed to do at first, and I don't think that the option's current wording helped. But I need to explain how this option works, to show why I think it should be tweaked.
So there are two options:
First off, we need to understand what "Parallel Same-Sound Limit" does. Essentially, what this option tries to limit the amount of sounds that are played. However it only limits the sounds with two criteria: 1) if it is the same sound, and 2) if it is playing at the same time.
The best example of this would be a group of Revenants, as they are very loud and are very noisy. This option can be used to limit how many Revenant "wake" sounds happen under a certain "window". This is where the second option comes in called "Parallel Same-Sound Window". Essentially this value is within how many tics does it limit the same-sounds.
Now that we have an understanding of the option, I'm going to explain my issue with the setting. The value of "Parallel Same-Sound Limit" can be set from 0-32. 32 translates to 32 iterations of the same-sound can be played at once, whereas 1 translates to only 1 of the same-sound can be played at once. Following this logic, the higher the value, the more sounds can play...
However, what happens when you set the "Parallel Same-Sound Limit" to 0? Well apparently the limit is removed altogether. The problem here is that the logic is supposed to be the lower the value, the more sounds are being limited. The higher the value, the less sounds limited. However 0 breaks the logic, as the limit is removed, acting far closer to the value of 32 for the limit.
My suggestion is to separate the on/off functionality of 0 currently present the "Parallel Same-Sound Limit" option, into a new boolean option acting as an on/off switch. With the current option becoming a "Parallel Same-Sound Number" option to specify how many sounds to limit instead.
I will mention that I have these options renamed in Nyan Doom as the following:
Although I haven't renamed these options in this PR, as I'm not sure if people would like them renamed. These names just make slightly more sense to me.