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

Label Rendering For Vending Machines and Item Preferences Menus #1538

Merged
merged 19 commits into from
Jan 15, 2025

Conversation

NeLepus
Copy link
Contributor

@NeLepus NeLepus commented Jan 14, 2025

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.


  • Added label rendering for VendingMachineMenu.xaml.cs
  • Stripped reagent jugs' names off their fake labels
  • Added label rendering for LoadoutPreferenceSelector.xaml.cs
  • Stripped pill canisters' names off their fake labels
  • Reformatted pills that do not have explicit descriptions to match "pill (label)" format

Media

Fig 1, the issue with ChemVend's reagent jugs:
Fig 1

Fig 2, the issue with pill canisters:
Fig 2

Fig 3, demonstration of the solution:
Fig 3


Changelog

🆑 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

@github-actions 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 SimpleStation14 changed the title Added label rendering vending machines and item preferences Added Label Rendering Vending Machines and Item Preferences Jan 14, 2025
@NeLepus NeLepus changed the title Added Label Rendering Vending Machines and Item Preferences Label Rendering For Vending Machines and Item Preferences Menus Jan 14, 2025
@VMSolidus VMSolidus merged commit f0f9512 into Simple-Station:master Jan 15, 2025
10 of 11 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants