mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-04 14:01:22 +00:00
* Removes a lot of boilerplate from hydroponics apply, adds a mushroom mechanic for milk as implied by comments (#75491) ## About The Pull Request - Removes a ton of boilerplate from `on_hydroponics_apply` - Replaces `chems.get_reagent_amount(type)` with `volume`. The former is a roundabout way of accomplishing the latter, the only thing the proc did was add un-necessary iterating and also round to the chemical quantisiation level, which wasn't really necessary as most locations rounded anyways. - While doing this, I saw th is comment: `Milk is good for humans, but bad for plants. The sugars cannot be used by plants, and the milk fat harms growth. Not shrooms though. I can't deal with this now...` This was super easy to just throw in so I did it. - Additionally, I noticed Uranium and Radium had this var, `tox_damage`, which was ... the same for both, but one used REM and one didn't, but it shouldn't have been using REM since it was multiplied by REM in the proc... so I removed the REM from the latter, making it doubly strong (0.5 -> 1). I did this just because I could use it nicely for the hydro proc but... I unno. ## Why It's Good For The Game Makes it a bit clearer on working with hydro chems ## Changelog 🆑 Melbert balance: Milk no longer harms the potency of mushrooms. Apparently it's good for them? balance: Radium now does slightly more tox damage than Uranium code: Removed a ton of boilerplate from chem hydro interactions /🆑 * Removes a lot of boilerplate from hydroponics apply, adds a mushroom mechanic for milk as implied by comments --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
/**
|
|
*This is NOW the gradual affects that each chemical applies on every process() proc. Nutrients now use a more robust reagent holder in order to apply less insane
|
|
* stat changes as opposed to 271 lines of individual statline effects. Shoutout to the original comments on chems, I just cleaned a few up.
|
|
*/
|
|
/obj/machinery/hydroponics/proc/apply_chemicals(mob/user)
|
|
///Contains the reagents within the tray.
|
|
if(myseed)
|
|
myseed.on_chem_reaction(reagents) //In case seeds have some special interactions with special chems, currently only used by vines
|
|
for(var/datum/reagent/chem as anything in reagents.reagent_list)
|
|
if(chem.volume < 1)
|
|
continue
|
|
chem.on_hydroponics_apply(src, user)
|
|
|
|
/obj/machinery/hydroponics/proc/mutation_roll(mob/user)
|
|
switch(rand(100))
|
|
if(91 to 100)
|
|
adjust_plant_health(-10)
|
|
visible_message(span_warning("\The [myseed.plantname] starts to wilt and burn!"))
|
|
return
|
|
if(41 to 90)
|
|
if(myseed && !self_sustaining) //Stability
|
|
myseed.adjust_instability(5)
|
|
return
|
|
if(21 to 40)
|
|
visible_message(span_notice("\The [myseed.plantname] appears unusually reactive..."))
|
|
return
|
|
if(11 to 20)
|
|
mutateweed()
|
|
return
|
|
if(0 to 10)
|
|
mutatepest(user)
|
|
return
|