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

Resprites Chemistry Glassware #17949

Merged

Conversation

Mister-Moriarty
Copy link
Contributor

@Mister-Moriarty Mister-Moriarty commented Feb 12, 2024

[Game Objects] [Chemistry] [Sprites]

About The PR:

Resprites phials, beakers, round flasks, conical flasks, large beakers, large flasks, the four types of bottles, bongs, and all of their respective fluid overlays. Beaker lids have been resized and repositioned appropriately.

image

image

Fluid overlay code has additionally been refactored; /obj/item/reagent_containers/glass now handles overlays, as opposed to each container possessing its own variation on the same copied update_icon() code. Fluid overlays are applied directly as an overlay to the base container sprite, removing the need for container cutout overlays. The minimum alpha value of fluid overlays has been limited to 100, for the purpose of reagent clarity. Non-linear fluid scaling has also been implemented; spherical containers will fill up faster when closer to being empty or full, whereas previously they would fill linearly, behaving more akin to a cylinder than a sphere. I briefly experimented with conical scaling for the conical flasks, however I felt that the scaling, while accurate, was too drastic; conical flasks currently use linear scaling. The formula is below, if anyone wishes to use it.
Conical scaling formula: normalised_fluid_height = 1 - ((1 - normalised_volume) ** (1 / 3))

Why Is This Needed?

Parity with modern spriting standards and code cleanliness.

Changelog:

(u)Mr. Moriarty
(+)Resprited phials, beakers, round flasks, conical flasks, large beakers, large flasks, the four types of bottles, bongs, and all of their respective fluid overlays.

@keywordlabeler keywordlabeler bot added A-Chemistry Deals with the chemistry system in some way A-Game-Objects The point of this PR is to deal with a specific game object labels Feb 12, 2024
@boring-cyborg boring-cyborg bot added the C-Sprites Automatically applied on any .dmi or icons folder change label Feb 12, 2024
@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 12, 2024
@DisturbHerb
Copy link
Contributor

oh my god finally my bottle resprite can die

@Gannets
Copy link
Contributor

Gannets commented Feb 13, 2024

I like these

@WALPVRGIS
Copy link
Member

Hell yea, these look much nicer. Great work :)

Copy link
Contributor

@Flaborized Flaborized left a comment

Choose a reason for hiding this comment

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

These look better to me, yeah! I approve of the change to minimum opacity too; I think the old/current look when you have a near-transparent liquid in a beaker and it makes part of the beaker invisible (despite the fact that there's still glass there) is very silly and this is a better approach overall. I didn't look at the code quality tho so someone else has to review that bit :^)))))

code/modules/chemistry/tools/beakers.dm Show resolved Hide resolved
code/modules/chemistry/Chemistry-Tools.dm Outdated Show resolved Hide resolved
code/modules/chemistry/Chemistry-Tools.dm Outdated Show resolved Hide resolved
Co-authored-by: ZeWaka <zewakagamer@gmail.com>
@ZeWaka ZeWaka merged commit 9ef4d4c into goonstation:master Feb 16, 2024
22 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 16, 2024
@Mister-Moriarty Mister-Moriarty deleted the chemistry-glassware-resprite branch March 3, 2024 00:22
@Studenterhue Studenterhue added the E-Add-To-Wiki A PR that will require changes to the wiki label Mar 15, 2024
@Retrino Retrino removed the E-Add-To-Wiki A PR that will require changes to the wiki label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Chemistry Deals with the chemistry system in some way A-Game-Objects The point of this PR is to deal with a specific game object C-Sprites Automatically applied on any .dmi or icons folder change size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants