Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add max length to worldname input #55152

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

robkuijper
Copy link
Contributor

@robkuijper robkuijper commented Feb 6, 2022

Made a constant to manage this attribute so it is easy to change
if the current max is deemed too short in the future.

Summary

Bugfixes "Disallow long worldnames that throw off UI display"

Purpose of change

Worldnames can be absurdly long, this should be capped to circumvent issues with displaying and saving worlds.
Fixes #55148

Describe the solution

Put a hard cap on the max amount of characters that can be fit into a worldname by checking the length of the current name against a constant.

Describe alternatives you've considered

An alternative would be to make this cap only prompt the player with a warning when the worldname is being verified, instead of disallowing additional input.

Testing

Try to create a new world and fil up the name to the max. You should not be able to input more characters once you reach the defined limit.

Additional context

Made a constant to manage this attribute so it is easy to change
if the current max is deemed too short in the future.
fixes CleverRaven#55148
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 6, 2022
@Maleclypse Maleclypse added <Bugfix> This is a fix for a bug (or closes open issue) Character / World Generation Issues and enhancements concerning stages of creating a character or a world labels Feb 6, 2022
@kevingranade kevingranade merged commit f7c3192 into CleverRaven:master Feb 7, 2022
@robkuijper robkuijper deleted the cap-worlname-length branch February 7, 2022 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) Character / World Generation Issues and enhancements concerning stages of creating a character or a world
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating worlds with extremely long world names lets the input field look weird
3 participants