Change pause special character behavior (\p) to allow multiplications… #1109
+39
−1
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.
… instead of having to spam it.
Adds a parser to any numbers after a detected \p for pause chat message, matches it upto a given max to be multiplied to a given base const. (The regex will limit this to 1000 regardless, but the const is hard-coded either way.). ordered them according to the pattern in courtroom.h but it would be nicer if they were not separated.
Also skips by the given amount of characters by calculating it via the text pos, so \p20 would skip 4, \p200 would skip 5, etc.
Currently technically silently fails if the user tries doing -1 or \p50000 or so, so it spits out any numbers beyond the initial 4 digits to at least indicate that.