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

Use TerrainMaterials::from_str to parse material variant name #118

Merged

Conversation

kennethloeffler
Copy link
Contributor

A FromStr implementation was added to TerrainMaterials in rbx_dom_weak 2.6.0. This PR removes the material_from_name function and changes Terrain:GetMaterialColor and Terrain:SetMaterialColor to use this new FromStr implementation to parse material variants from enum names. This reduces the amount of code in the terrain module and gives the responsibility of knowing all valid terrain materials to rbx-dom.

Copy link
Collaborator

@filiptibell filiptibell left a comment

Choose a reason for hiding this comment

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

Thank you!

@filiptibell filiptibell merged commit ede3365 into lune-org:main Oct 6, 2023
5 checks passed
@kennethloeffler kennethloeffler deleted the terrain-material-enum-name-fromstr branch October 6, 2023 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants