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

Food Cart UI rework #22866

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

Scrambledeggs00
Copy link
Contributor

@Scrambledeggs00 Scrambledeggs00 commented Dec 20, 2024

Document the changes in your pull request

I've changed the food cart's UI from byond HTML into TGUI as it looks nicer. The new UI is broken up into two parts: food and drinks.

Food Tab

  • Food Capacity section shows the current amount of food and the total capacity of the cart, which is 80 food items.
  • Food Selection section shows the cart's food, with each food item showing an image, its name, quantity within the cart's storage, and a button for dispensing one.
  • Similar to the ice cream vat, the cart will dispense the last item of the dispensed type put into it.

Drink Tab

  • Glass Storage section shows the current amount of drinking glasses in storage, with carts starting with 10, and the total capacity, which is 30.
  • Drink Capacity section shows the current units of reagents stored in the cart along with the total reagent capacity of the cart, which is 200.
  • Transfer Amount section has a list of buttons that determines how many units are shifted between the different storages and how much are purged.
  • Cart Drink Storage is the main reagent storage. As previously stated, it has a max volume of 200u. Reagents within it can either be purged from the cart or transferred to the mixer based on the transfer amount selected.
  • Cart Mixer Storage is the storage used to dispense drinking glasses. It has a max volume of 50u, enough to fully fill a drinking glass. Reagents within can either be transferred back to the cart's main storage based on the transfer amount selected or all be poured into a drinking glass and dispensed to the user.
  • Both storages have the NO_REACT flag, meaning you cannot make mixed drinks within the cart. I did this so that drinks would mix upon being dispensed, which is pretty cool :]
  • I do not know how to prevent reagent containers from transferring, so the cart can actually hold 250u, 200u in main, and 50u in mixer.

The UI also has info tooltips to explain certain UI elements. Simply hover your mouse over the blue circles with a white i to see the tooltip.

Also, when destroyed, food carts will now spill their reagents. A chat warning will also be sent if either the main or mixer storages have reagents, alerting you of the spill.

Fixes #9310
Fixes #19427
Fixes #19482

Why is this good for the game?

Old UI looked bad, reagent part of carts haven't worked in awhile, and spills are funny :]

Testing

Video of cart UI:
https://www.youtube.com/watch?v=FjUYch4DA8A
Also: I changed the spill message to specify that reagents are spilling out after this video.

Wiki Documentation

Food capacity: 80
Glass capacity: 30
Drink capacity

  • Main: 200u
  • Mixer: 50u
  • Total: 250u

Reagents will spill if cart is destroyed.

Changelog

🆑
rscadd: Food carts now spill their reagents upon destruction
bugfix: Food carts can now handle reagents again
tweak: Reworked food cart's UI
/:cl:

@Yogbot-13 Yogbot-13 added Feature This adds new content to the game Fix This fixes an issue. Please link issues in fix PRs Tweak This PR contains changes to the game. labels Dec 20, 2024
@github-actions github-actions bot added the tgui This PR affects TGUI label Dec 20, 2024
Co-authored-by: Henry <omgredstone@gmail.com>
@Oblisk234
Copy link
Member

Does this fix #19482 at all?

@Scrambledeggs00
Copy link
Contributor Author

Does this fix #19482 at all?

I haven't tested it yet, though i would assume that it doesn't. I'll try to test it today.

@Scrambledeggs00
Copy link
Contributor Author

Does this fix #19482 at all?

I tested it and made the necessary changes to fix the bug. The fix should also work for any other food item that works similarly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This adds new content to the game Fix This fixes an issue. Please link issues in fix PRs tgui This PR affects TGUI Tweak This PR contains changes to the game.
Projects
None yet
4 participants