Skip to content

Commit

Permalink
Minor fixes and improvement to Flavor Text (shiptest-ss13#2952)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

Improves and fixes issues where flavor text would sanitize certain
characters and refuse new lines while also giving new looks to the
flavor text page. Bits of codes for the popup was taken from
MapleStation but I can't find the specific PR for it.

Flavor text's length was also chopped from a whooping 4096 to 1024 for
the sake of keeping it lag free, it should still allow you to make a
pretty robust flavor text and it shouldn't really impact anyone as the
average flavor text length I've seen on a round was around 362
characters, with the highest being 645 characters.

![dreamseeker_RBS1nF48VM](https://github.com/shiptest-ss13/Shiptest/assets/66234359/8b541cf1-c51f-4893-b388-fe01b6f413fc)

Additionally changes the text a bit on the flavor text's edit popup so
it leads to less confusion.

I'm intending to do a full refactor for flavor text itself and hopefully
make use of TGUI but this might take quite a bit and I can't really make
any guarantees, so hopefully this helps for now.

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

Flavor text has been buggy and limiting for quite a while, while this PR
doesn't solve many code shenanigans it should at least help people
describe how their characters a lot better and with less wall of texts.

As for the text changes; I believe this might make more sense and
hopefully lead to less confusion that I'd see some have when it comes to
flavor text.

:cl: Hardly
add: Added some style to the flavor text popup
fix: Fixed flavor text not accepting certain characters or new lines
tweak: Changed up Flavor Text editing text a bit
tweak: Flavor text's max length has been chopped from 4096 to 1024
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: FalloutFalcon <[email protected]>
  • Loading branch information
2 people authored and MrCat15352 committed Jun 22, 2024
1 parent 93527db commit 39a3188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ standards:

- exactly:
[
265,
268,
"non-bitwise << uses",
'(?<!\d)(?<!\d\s)(?<!<)<<(?!=|\s\d|\d|<|\/)',
]
Expand Down

0 comments on commit 39a3188

Please sign in to comment.