Commit 461fb81
Chat tick pause multiplier fix + denotes ms instead of multiplier (#1110)
* Change pause special character behavior (\p) to allow multiplications 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.
* Format
format
* format 2
format 2
* numbers denote ms instead of multiplier
also removes unnecessary variables, as well as adds validation
fix for commit so it doesn't ruin history
* Simpler parse function
now defaults to 1s on \p with no numbers
Co-Authored-By: Leifa <26681464+TrickyLeifa@users.noreply.github.com>
* Change validation from bool check to std optional
the voices will tell you this is more "idiomatic" and "readable"
* doesnt need to be explicit
* Don't need max int anymore.
---------
Co-authored-by: Leifa <26681464+TrickyLeifa@users.noreply.github.com>
Co-authored-by: stonedDiscord <Tukz@gmx.de>1 parent 1176bb5 commit 461fb81
1 file changed
Lines changed: 37 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3506 | 3506 | | |
3507 | 3507 | | |
3508 | 3508 | | |
| 3509 | + | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
3509 | 3532 | | |
3510 | 3533 | | |
3511 | 3534 | | |
| |||
3723 | 3746 | | |
3724 | 3747 | | |
3725 | 3748 | | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
3726 | 3756 | | |
3727 | 3757 | | |
3728 | 3758 | | |
| |||
4420 | 4450 | | |
4421 | 4451 | | |
4422 | 4452 | | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
4423 | 4460 | | |
4424 | 4461 | | |
4425 | 4462 | | |
| |||
4441 | 4478 | | |
4442 | 4479 | | |
4443 | 4480 | | |
4444 | | - | |
4445 | | - | |
4446 | | - | |
4447 | | - | |
4448 | | - | |
4449 | 4481 | | |
4450 | 4482 | | |
4451 | 4483 | | |
| |||
0 commit comments