mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 09:31:54 +00:00
## About The Pull Request ##### Disclaimer - Some of the code/icons/sounds were ported from TMGC. Introducing more weather types! And yes, you can now have rain be reagent based! <details> <summary>Regular Rain</summary>  </details> <details> <summary>Blood Rain</summary>  </details> <details> <summary>Acid Rain</summary>  </details> You can even make it rain ants, plasma, or drugs. All of their effects get applied to turfs, objects, and mobs depending on the weather options you select. Did I mention... there is thunder? <details> <summary>Thunder Strikes</summary>  </details> <details> <summary>Sand Storms</summary>  </details> Despite all this new stuff, none of it has been directly added to the game but the code can be used in the future for: - Wizard event - Similar to lava on floor, but this time make the reagent random or picked from a list and give wizard immunity - Chaplain ability - Maybe make this a benefit or ability once enough favor has been obtained - Admin events - I have added a BUNCH of admin tooling to run customized weather events that let you control a lot of options - New station maps/biomes for downstreams (Jungle Station, etc.) - Change Ion storms to use the new weather system that triggers EMP/thunder effects across the station - IceBox could get plasma rain - Lavaland could get thunder effects applied to ash storms Relevant PRs that removed/added some of the weather stuff I used: - #60303 - #25222 --- #### Attribution - Rain sprites were added via [novaepee](https://github.com/novaepee) in https://github.com/tgstation/TerraGov-Marine-Corps/pull/9675 - Sand sprites were added via [TiviPlus](https://github.com/TiviPlus) (who commissioned them from bimmer) in https://github.com/tgstation/TerraGov-Marine-Corps/pull/4645 - Rain sounds [already existed on tg](https://github.com/tgstation/tgstation/pull/25222#discussion_r106794579) and were provided by provided by Cuboos, using Royalty Free sounds, presumed under default tg sound license - Creative Commons 3.0 BY-SA - Siren sound is from siren.wav by IFartInUrGeneralDirection -- [Freesound](https://freesound.org/s/46092/) -- License: Attribution 4.0 The original `siren.ogg` sound used on a lot of SS13 servers doesn't seem to have any attribution that I could locate. The sound was added about 15 years ago. So I just looked for a somewhat similar sounding siren noise on Freesound. ## Why It's Good For The Game More weather customization! ## Changelog 🆑 add: Added new weather types for rain and sandstorms. Rain now uses a reagent that gets exposed to the turfs, mobs, and objects. There is also a thunder strike setting you can apply to any weather. add: Hydro trays and soil will now add reagents to their trays when exposed to a chemical reaction. (weather, shower, chem spills, foam grenades, etc.) add: Weather temperature now affects weather reagents and mobs body temperature. bal: Snowstorm temperature calculations were tweaked to allow universal weather temperature effects. sound: Added weather sounds from TGMC for rain and sirens (attributed to Cuboos and IFartInUrGeneralDirection ) image: Added weather images from TGMC for rain and sand storms (attributed to Novaepee and Bimmer) refactor: Refactored a lot of the weather code to be more robust admin: Admins can now control more weather related options when running weather events. The weather admin verbs have been moved to their own "Weather" category under the Admin tab. /🆑 --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
48 lines
1.7 KiB
Plaintext
48 lines
1.7 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/expose_reagents(list/reagents, datum/reagents/source, methods = TOUCH, volume_modifier = 1, show_message = TRUE)
|
|
. = ..()
|
|
if(. & COMPONENT_NO_EXPOSE_REAGENTS)
|
|
return
|
|
|
|
if(src.reagents.holder_full())
|
|
return
|
|
|
|
for(var/datum/reagent/reagent as anything in reagents)
|
|
if(istype(reagent, /datum/reagent/water))
|
|
adjust_waterlevel(round(reagents[reagent]))
|
|
else
|
|
src.reagents.add_reagent(reagent.type, reagents[reagent])
|
|
update_appearance()
|
|
|
|
/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
|