-
Notifications
You must be signed in to change notification settings - Fork 190
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
Label Rendering For Vending Machines and Item Preferences Menus #1538
Merged
+51
−57
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n-Engines into labels-for-menus
github-actions
bot
added
Changes: C#
Changes any cs files
Changes: UI
Changes any XAML files
Changes: YML
Changes any yml files
labels
Jan 14, 2025
SimpleStation14
changed the title
Added label rendering vending machines and item preferences
Added Label Rendering Vending Machines and Item Preferences
Jan 14, 2025
NeLepus
changed the title
Added Label Rendering Vending Machines and Item Preferences
Label Rendering For Vending Machines and Item Preferences Menus
Jan 14, 2025
…n-Engines into labels-for-menus
VMSolidus
approved these changes
Jan 15, 2025
SimpleStation14
added a commit
that referenced
this pull request
Jan 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changes: C#
Changes any cs files
Changes: UI
Changes any XAML files
Changes: YML
Changes any yml files
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR removes label duplicates from item names in order to make actual labels work properly and make them visible in vending machines' menus as well as loadout preferences.
As we can see in Fig 1, the aluminium jug is not only labelled as "aluminium 10u" but contains "(aluminium 10u)" in the item name, which drives chemists homicidal when it comes to labelling the jugs.
This issue also appears with other labelled items such as pill canisters in item preferences (see Fig 2), which led to a row of nameless pill canisters being present in our server's menu.
My solution is to fetch the item's LabelComponent in the menu so this redundancy is no more needed.
See Fig 3 for an example.
The VendingMachineMenu.xaml.cs code fetches and localizes the text from the LabelComponent from the prototype the same way it fetches sprites, and in the LoadoutPreferenceSelector.xaml.cs the task is pretty straightforward since the item is spawned in the Nullspace anyway.
Media
Fig 1, the issue with ChemVend's reagent jugs:
Fig 2, the issue with pill canisters:
Fig 3, demonstration of the solution:
Changelog
🆑 NeLepus