Stop counting color code as part of sign character limit, and portal/network name #17

Closed
opened 2021-11-12 13:41:24 +01:00 by EpicKnarvik97 · 1 comment

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.

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.
EpicKnarvik97 added the
enhancement
label 2021-11-12 13:41:24 +01:00
Author
Owner

Finished in the dev branch.

Finished in the dev branch.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: EpicKnarvik97/Stargate#17
No description provided.