-
Couldn't load subscription status.
- Fork 4.7k
Botany Rework Part 2: GrowthComponents #31461
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
Conversation
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Hello! This PR is seen as conceptually favorable by maintainers, however it seems the branch has some issues that has caused it to incorrectly modify files. I will be marking this PR as stale and close within a week; you can either fix the branch with the current PR submission (at which point I will unmark it as stale), or you're free to open a new PR with a fixed branch. Thank you! (oops clicked "Close with Comment" instead of "Comment", my bad!) |
a97ea75 to
7dad2c3
Compare
|
That should fix the branch. I'll have to pick this up and see where I was. I do think that my plants-as-entities Part 3 PR should get merged first at this point, and I'll un-draft this one after its merged and I get this reworked to matched that. |
|
when? |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Thank you for your contribution! Due to this PR being marked as a draft and having no activity, we've decided to close it. If you ever come back to it, feel free to open a new PR. |
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
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.