-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Introduction of plantgrowth_tick and rework of the fast/slow_metabolism gene strains #18587
Introduction of plantgrowth_tick and rework of the fast/slow_metabolism gene strains #18587
Conversation
it is good to have nutriants not make growth happen if water is not there - good chnage! Does grow lamp/glow lotus efffect over-ride and make a plants grow with no water still? |
Yeah, it still does. UV lamps work outside of the plantpot's code. If i think about it, i could create a plantgrowth tick after the last one has resolved instead of the time i want to begin everything and store it in the plantpot. That way, things like UV lamps could access the plantgrowth_tick and affect it, so they will be resolved with the other changes as well. |
Co-authored-by: Tarmunora <48066662+Tarmunora@users.noreply.github.com>
…s been resolved/on plant creation
Changed the code so the This means the changes that happen to the plant the next time a UV-lamps and light lotus have been changed to now access the next |
…nto plant_growth_tick_introduction
This PR has been inactive for two weeks, and has been automatically marked as stale. This means it is at risk of being auto closed in another week. Please address any outstanding review items and ensure your PR is finished. If you are auto-staled anyway, ask developers if your PR will be merged. Once you have done any of the previous actions then you should request a developer remove the stale label on your PR, to reset the stale timer. If you feel no developer will respond in that time, you may wish to close this PR youself, while you seek developer comment, as you will then be able to reopen the PR yourself. |
[Hydroponics][Code Quality][rework]
About the PR
This PR introduces
var/datum/plantgrowth_tick
. This is a holder for a multitude of information that is passed along procs of chemicals and gene strains that interact with the process of hydroponic trays.Whenever a planttray needs to calculate tray-chemistry/water consumption/plant growth, it creates a plantgrowth_tick-datum. This will be stored in
plantpot.current_tick
. This datum get's passed into the plant-process procs of every chemical in the plants tray and every gene strain. These procs were changed to modify this datum only. If all changes are applied to the datum,plantgrowth_tick
will be passed onto the new/plantpot/proc/HYPresolve_plantgrowth_tick
-proc and applies all these changes onto the plantpot. Once these changes are applied, the oldplantgrowth_tick
is deleted and a fresh one will be created, waiting to be resolved/manipulated.Since
var/datum/plantgrowth_tick
andHYPresolve_plantgrowth_tick
are made to handle fractional changes, all procs that have a %-chance to modify a plant instead apply their average result directly.Also, this PR makes plantpots now accept compost and holy water as water-substitutes. Man-eating plants now accept blood instead of water.
Last, but not least, this change enabled a rework of the slow/fast-metabolism trait. They will now affect almost every stat-change within
HYPresolve_plantgrowth_tick
. Fast metabolism increase water consumption/tray chemistry/plant growth by 50%, but increases the baseline-chem-consumption by 1/tick. Slow metabolism decrease water consumption/tray chemistry/plant growth by 25%, but decrease the baseline-chem-consumption by 0.5/tick.Above this, this changes have some side-effects. If the plant requires water to grow, ammonia and other growth-modifying chems wont have any effect if the hydroponics tray has not sufficient water.
Why's this needed?
The
/process()
-proc of hydroponic trays had a good amount of hardcoded interactions, which were in dire need of a cleanup. Also, many chems and gene strains modified the plant directly, called procs of the plantpot or used unnecessary chance-rolls. Bundling all of these into a single datum enables to save on a lot of unecessary calls and cleaned up their respective code.These changes enabled some more interesting interactions. As an example, fast/slow metabolism were changed to have a new niche within gene strains. Since fast metabolism was simply a worse rapid growth gene strain, changing them up diversifies the selection of gene strains a botanist can go for. With these changes, slow metabolism drastically reduces water consumption now (halving baseline-consumption while only bringing a 25% malus), while being a net negative gene strain, makes it interesting for lazy botanists who just want to use the mister and don't care for hand-filling trays.
Last but not least, the addition of water substitutes gives compost a new role within botany. People within the discord were noting a lack of use for the chemical and also a lack of water if they go for ammonia. With fast metabolism highly increasing water consumption, having compost as another alternative seems like a good idea.
Changelog