Skip to content

Conversation

iaada
Copy link
Member

@iaada iaada commented Jul 26, 2025

About the PR

#39363 is wanted but not blocking.

This PR is a refactor of the base entities in Entities/Objects/Consumable/Drinks/. It adds a lot of base types and reparents a lot of entities. Some abstract types were removed, and some behavior was changed or added.

All drinks from flasks to cartons to bartender tools are now destructible. They also all now utilize SolutionItemStatusComponent to see the solution in the hand UI. Shot glasses and paper cups are now 1x1. Coup glass is now 20u from 30 (fancier, fits the base better), and paper cups are now 5u from 20 (water cooler speedruns in shambles).

Also deletes a bunch of redundant rsi files.

Why / Balance

General cleanup. This folder was a bit of a mess. A lot of entities parented to BaseItem instead of DrinkBase which causes inconsistencies. trash_drinks.yml was particularly bad, and had the empty bottles not parenting off the originals in any way. The bartender's locker even spawned the trash versions of beer bottles due to ambiguous naming.

I want to later include beakers, vials, and other misc entities in this refactor, as well as standardize some rsi states, but stopped short for atomizing.

Technical details

Drinks now use multiple parents to componentize groups of components from drinks_base.yml and drinks_base_materials.yml. i.e. DrinkBase is the main group of solution and item related components, DrinkBaseOpenable adds Openable and PressurizedSolution and Sealable, DrinkBaseMaterialGlass adds physical composition and destructible behavior, etc.

There are currently no duplicate components between the groups of bases so inheritance order doesn't matter, but in the future if materials get more sounds they should be placed first to override the sounds from BaseItem. Convention is [Material, DrinkBase, Openable, Visuals]. Adding a material as the first parent will completely replace a previously inherited material.

Typical structure is to create an abstract entity at the top of the file which takes multiple parents and adds some components, then the rest of the file parents from it.

DrinkBase has had InjectableSolution added allowing it to be targeted by hyposprays and anomalies.

Textures/Objects/Consumable/TrashDrinks/ has been deleted. It contained a bunch of one image rsi, and was used by the trash versions of bottles. Now we just use the original rsi.

Media

Drinks still pouring
MyServer - Space Station 14 2025-07-25 21-40-03.webm

Spawn panel now shows full bottles as full. (Color still doesn't work)
image

More solutions now have SolutionItemStatusComponent
image image
image

Liquid anomalies now inject into nearby drinks if there's room.
image

Requirements

Breaking changes

Two new localization lines:
drink-component-on-examine-is-unsealed-no-cork
drink-component-on-examine-is-unsealed-crown-cap

Prototypes/Entities/Objects/Consumable/Drinks/ has a reworking of its base types. Anything inheriting from DrinkGlassBase will need to be reparented to [DrinkBaseMaterialGlass, DrinkBase], and some cups/bottles/drinks might be missing components.

Drinks now use multiple parents to componentize groups of components from drinks_base.yml and drinks_base_materials.yml. i.e. DrinkBase is the main group of solution and item related components, DrinkBaseMaterialGlass adds physical composition and destructible behavior. Convention is [Material, DrinkBase, Openable, Visuals]. Adding a material as the first parent will override a previously inherited material.

Textures/Objects/Consumable/TrashDrinks/ has been deleted. It contained a bunch of one image rsi for the empty versions of bottles. Now we just use the original rsi.

DrinkCartonBaseFull has been renamed DrinkCartonSmallBaseFill to match the name scheme used with bottles.
DrinkCartonBaseLargeFull has been renamed DrinkCartonBaseFull.

Changelog

🆑 aada

  • tweak: Cups, bottles, mugs, and other drinks have had minor changes. Most are now destructible.

@PJBot PJBot added S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. Changes: Sprites Changes: Might require knowledge of spriting or visual design. Changes: No C# Changes: Requires no C# knowledge to review or fix this item. labels Jul 26, 2025
@github-actions github-actions bot added the size/L Denotes a PR that changes 1000-4999 lines. label Jul 26, 2025
Copy link
Contributor

github-actions bot commented Jul 26, 2025

RSI Diff Bot; head commit 690b4d1 merging into 1f1c719
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Objects/Consumable/TrashDrinks/absinthebottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/alco-clear.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/alebottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/beer_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/coffeeliqueurbottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/cognacbottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/gildlagerbottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/ginbottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/glass_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/patronbottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/pwinebottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/rumbottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/tequillabottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/vermouthbottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/vodkabottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/whiskeybottle_empty.rsi

State Old New Status
icon Removed

Resources/Textures/Objects/Consumable/TrashDrinks/winebottle_empty.rsi

State Old New Status
icon Removed

Edit: diff updated after 690b4d1

@PJBot PJBot added the S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. label Aug 12, 2025
@perryprog
Copy link
Contributor

perryprog commented Aug 12, 2025

This is probably not crazy helpful because of the size, but this might be of some use—it's not too bad to speed-skim through (okay it's pretty bad). It's a diff of all the changes including stuff added/removed via parenting changes.

(I'm still working on getting this to be something that's usable as an actual tool, and isn't quite as verbose.)

https://gist.github.com/perryprog/80c5fea7daea91d2ed958eed3db36695

@Princess-Cheeseballs
Copy link
Member

This is probably not crazy helpful because of the size, but this might be of some use—it's not too bad to speed-skim through (okay it's pretty bad). It's a diff of all the changes including stuff added/removed via parenting changes.

(I'm still working on getting this to be something that's usable as an actual tool, and isn't quite as verbose.)

https://gist.github.com/perryprog/80c5fea7daea91d2ed958eed3db36695

This would be so useful for big reparenting PRs like this. And we need some big reparenting PRs, prototype organization for a lot of entities sucks right now.

@perryprog
Copy link
Contributor

Yeah, see space-wizards/RobustToolbox#6131 for if you have any suggestions. I'm no yaml warrior but the least I can do is try to make it less painful for those who are.

@iaada
Copy link
Member Author

iaada commented Aug 12, 2025

This is probably not crazy helpful because of the size, but this might be of some use—it's not too bad to speed-skim through (okay it's pretty bad). It's a diff of all the changes including stuff added/removed via parenting changes.

(I'm still working on getting this to be something that's usable as an actual tool, and isn't quite as verbose.)

https://gist.github.com/perryprog/80c5fea7daea91d2ed958eed3db36695

That's a really neat tool! It's nice to see exactly how these prototypes changed, and will be even more useful for PRs that don't have the 100s of nothing protos like the metamorphic cups. The negative diff is especially helpful to see if anything actually got lost in the reparent.

@perryprog
Copy link
Contributor

That's a good point—removals are usually more important to spot than additions. I'll keep that in mind!

@iaada
Copy link
Member Author

iaada commented Aug 12, 2025

After painfully scrolling through all 20,000 lines, I'm confident in myself that nothing got lost.

@iaada
Copy link
Member Author

iaada commented Aug 16, 2025

@Princess-Cheeseballs Pinging you about the stable release.

@Princess-Cheeseballs
Copy link
Member

@Princess-Cheeseballs Pinging you about the stable release.

Thanks I totally forgot

@Princess-Cheeseballs Princess-Cheeseballs removed the S: DO NOT MERGE Status: Open item that should NOT be merged. DNM. Allows test to run unlike draft. label Aug 16, 2025
@Princess-Cheeseballs
Copy link
Member

Removing DO NOT MERGE as stable has come around. This will need another maint approval I think though.

@iaada iaada changed the title Reorganize and upgrade drinks yml Reorganize and refactor drinks yml Aug 17, 2025
@Princess-Cheeseballs Princess-Cheeseballs mentioned this pull request Aug 28, 2025
2 tasks
@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Sep 3, 2025
Copy link
Contributor

github-actions bot commented Sep 3, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

# Conflicts:
#	Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.yml
@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Sep 5, 2025
@iaada iaada added P1: High Priority: Higher priority than other items, but isn't an emergency. and removed P3: Standard Priority: Default priority for repository items. labels Sep 6, 2025
@iaada
Copy link
Member Author

iaada commented Sep 6, 2025

P1 due to #40046

Copy link
Member

@SlamBamActionman SlamBamActionman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not finding any issues, and testing ingame seems to work with no issues.

Thank you for your contribution!

@SlamBamActionman SlamBamActionman merged commit ff3f0c6 into space-wizards:master Sep 11, 2025
12 checks passed
@iaada iaada deleted the more-trash branch September 17, 2025 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Service Area: Service department, including cooking, botany, etc Changes: No C# Changes: Requires no C# knowledge to review or fix this item. Changes: Sprites Changes: Might require knowledge of spriting or visual design. D3: Low Difficulty: Some codebase knowledge required. P1: High Priority: Higher priority than other items, but isn't an emergency. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/L Denotes a PR that changes 1000-4999 lines. T: Refactor Type: Refactor of notable amount of codebase T: UI / UX Improvement Type: UI and player facing interactive graphical interfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants