Stop counting color code as part of sign character limit, and portal/network name #17
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As it is right now, the lenght of names, including color codes are used to determine whether a string can fit on a sign line. As they are translated into special formatting characters, there should be no need to include color codes in the string length. Strip them before counting the length.
When network and stargate names are compared, this should also be done without the color codes. Perhaps treat it as one internal name and one external name, where the internal name is lowercased, stripped of tags and spaces are replaced with underscores. It would prevent some confusion caused by different coloring of a network name not matching the same network. Unless some servers use the name name, just differentiating between color codes or case, it should work. The current, "external", name should be the only one saved, as the name can be cleaned when constructing a portal object.
Additionally, this would be a nice time to check if the character limit can be increased from 11 characters to 13 characters. I think all two-character padding has been removed, making this possible.
Finished in the dev branch.