-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Label Rendering For Vending Machines and Item Preferences Menus (#1538)
# 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. --- - [x] Added label rendering for VendingMachineMenu.xaml.cs - [x] Stripped reagent jugs' names off their fake labels - [x] Added label rendering for LoadoutPreferenceSelector.xaml.cs - [x] Stripped pill canisters' names off their fake labels - [x] Reformatted pills *that do not have explicit descriptions* to match "pill (label)" format --- <!-- This is default collapsed, readers click to expand it and see all your media The PR media section can get very large at times, so this is a good way to keep it clean The title is written using HTML tags The title must be within the <summary> tags or you won't see it --> <details><summary><h1>Media</h1></summary> <p> Fig 1, the issue with ChemVend's reagent jugs: ![Fig 1](https://github.com/user-attachments/assets/05983f8d-1bc6-4352-b13c-194a6ea172e9) Fig 2, the issue with pill canisters: ![Fig 2](https://github.com/user-attachments/assets/5afec42f-ef55-4b9d-af2f-2cef6174225d) Fig 3, demonstration of the solution: ![Fig 3](https://github.com/user-attachments/assets/bbc2d1b3-e773-4654-a32a-ab5d7205e0e9) </p> </details> --- # Changelog :cl: NeLepus - add: Added label rendering for vending machines & item preferences - tweak: Formatted pill without descriptions to follow "pill (label)" - remove: Fake label duplicates in reagent jugs and pill canisters
- Loading branch information
Showing
5 changed files
with
51 additions
and
57 deletions.
There are no files selected for viewing
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
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
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
Oops, something went wrong.