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

Botany Rework Part 2: GrowthComponents #31461

Draft
wants to merge 244 commits into
base: master
Choose a base branch
from

Conversation

drakewill-CRL
Copy link
Contributor

@drakewill-CRL drakewill-CRL commented Aug 26, 2024

About the PR

This PR will take most of the checks for plant growth and pull them into their own tiny components and systems, instead of being part of 1 huge function.

This is part of my Botany Rewrite proposal. Future PRs will handle making Plants a proper entity for components, and maybe other improvements.

Why / Balance

This is to make future plants more flexible, and open up more possibilities for the Botany system the current fixed setup allows. Everything right now is in PlantHolderSystem.Update() and all plants are identical, and it will be better to pull those apart into their own systems and components so each plant can check only what it cares about. This also allows individual plants to have unique code run on a growth tick, including wild or interesting effects not actually related to the plant growing.

As a refactor PR, balance isn't being changed, so as much of the existing logic as possible will be directly moved over. In the end, changes to how the system fires off may cause something to behave differently, but the core of waiting for plants to grow will remain. The time involved, or the sensitivity of plants to environmental factors, may possibly be noticeable if they need entirely redone for this.

Technical details

This includes making components and systems for the logic around water, nutrients, toxins, pests, gases consumed or exuded, tolerance for light/pressure/ heat, and auto-harvesting.

In the future, plants will be able to have different needs for growth, (EX: a cactus may not check for water, or space-plants may be dependent on special chemicals being present) and different effects can happen on a growth tick without hard-coding more checks into PlantHolderSystem. This also opens up possibilities to mutate these needs off of, or onto, other plants. In particular, a future-state plan for mutations requires plants to be able to consume plasma gas to start acquiring stronger mutations, and that will be its own growth component to trigger that change.

In the process of coding this, the following stats were removed: LightTolerance/Ideal Light (Unused and possibly unmeasureable).

Media

Nothing should be visibly different.

Requirements

  • I have read and I am following the Pull Request Guidelines. I understand that not doing so may get my pr closed at maintainer’s discretion
  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

This shouldnt affect anything outside of PlantHolder. TODO: confirm when work is complete.

Changelog

Nothing should be player facing. TODO: confirm when work is complete that there's nothing tangibly different for the player.

Copy link
Contributor

github-actions bot commented Sep 2, 2024

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

@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 2, 2024
@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 8, 2024
@github-actions github-actions bot added Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design Changes: Map Can be reviewed or fixed by people who are knowledgeable with mapping. Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. and removed Merge Conflict This PR currently has conflicts that need to be addressed. labels Sep 15, 2024
Copy link
Contributor

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

@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Map Can be reviewed or fixed by people who are knowledgeable with mapping. Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design Merge Conflict This PR currently has conflicts that need to be addressed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.