-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: Increase maximum supported length of chest names #4076
base: 1.4.4
Are you sure you want to change the base?
Conversation
Increased the MaxNameLength and start utilizing this variable
@JavidPack, @Solxanich & @direwolf420 what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review
- public const int MaxNameLength = 20; | ||
+ public const int MaxNameLength = 63; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding it not being used as MaxNameLength
in the source: Since tml uses decompiled vanilla code, const
only appear in their literal value.
Regarding where it's used, look at what https://github.com/NotLe0n/BetterChests/blob/1.4.4/src/Edits/ChestNameEdits.cs edits, you are missing some places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added missing changes but utilize further this const
revert changes in ChestUI change doc for MessageID 33(SyncPlayerChest)
revert changes in ChestUI change doc for MessageID 33(SyncPlayerChest)
What is the new feature?
Increase the MaxNameLength for chest names and implemented the usage of this variable instead of hardcoded (magic)number in the ChestUI and UIVirtualKeyboard.
Why should this be part of tModLoader?
Feature was requested by @direwolf420 in #3909.
To quote him:
Are there alternative designs?
We could increase the hardcoded values, but it does not make much sense to me because the variable MaxNameLength already exist in the Chest class and take usage should make the thing easier to change for modders too.
Sample usage for the new feature
Rename chest with longer names ;)
ExampleMod updates
None
Closes #3909