Commit Graph

10 Commits

Author SHA1 Message Date
MrMelbert 74983781a7 Buffs mutagen hydroponics application, adds some plant traits to interact with it (#94783)
## About The Pull Request

Unstable Mutagen

1. Now consistently adds 0.1 instability per unit per tick (the same as
L4Z)
2. No longer applies toxin damage directly
3. RNG roll now scales strength based on volume - 10u of mutagen = 1x
effect modifier.
4. RNG instability roll now grants 2(*modifier) instability (down from
5)
5. RNG instability roll now also adds 1.5(*modifier) toxins 
6. RNG instability roll now applies even if the tray is set to auto-grow
7. RNG health penalty now deals 5(*modifier) damage (down from 10)


Uranium

1. Now consistently adds 0.05 instability per unit per tick (half as
powerful as L4Z)
2. Now adds `0.5 * volume * toxpower` toxins, rather than `volume /
toxpower`
3. No longer damages plant health directly
4. Has the same changes as Unstable Mutagen wrt RNG rolls

New genes

- Adds `Toxin Resistance`, which grants the plant immunity to health
damage from high toxins in the tray.
   - Available in Death Berries, for which it is now their graft gene.
- Adds `Toxin Adaptation`, which not only grants the plant immunity to
health damage
- Not available naturally (yet?), must be mutated (or found in strange
seeds)

Other

Cleaned up a smidge of botany code while working in the area

## Why It's Good For The Game

Unstable Mutagen is... ok. 
It's perfectly usable, but it requires a lot of work for something that
you don't have easy access to.
Best case it's only slightly (1.25x) better than L4Z alone. Gurus will
make a mixture of L4Z, mutagen, and cryoxadone or multiver for maximum
mutation speed, which is cool, but a little cheesy.

As a consequence, Mutagen is USUALLY only used 1. as a noob trap and 2.
to get Kudzu or spiders

This makes me sad considering how it used to have legendary status for
botany. So I kinda wanted to bring it back.

The flat scaling makes it worst case AS GOOD AS L4Z. You are rewarded
for getting something besides vendor chems.
The RNG roll changes give it a bit of a boost, so it becomes "L4Z+ but
with a minor downside". It also removes the cheese aspect, which I admit
is kinda sad.

Green = Mutagen
Purple = l4z 
p = probability of RNG instability 
v = volume
y = instability
x = ticks

<img width="1505" height="721" alt="image"
src="https://github.com/user-attachments/assets/ea67d198-ea4f-44a7-9798-7d1bf0f3ef8b"
/>

20u mutagen = 17 ticks for 100 instability + 25 toxins
20u l4z = 25ticks for 100 instability + 0 toxins

Speed scales faster (1.25x faster at 10u, 1.5x faster at 20u, 1.75x
faster at 30u) - but so does toxin accumulation

TL;DR more mutagen = more mutation = more toxin

Now you're wondering "Okay where does the gene changes come into play" 
Well I'm a big fan of fertilizers that require you use *botany*
knowledge, not chem knowledge, *botany* knowledge to maximize their
potential. For example, using Weed Adaptation for consequence-free
Liquid Earthquake.

I wanted do to that here, so I added these two genes that allow you to
get no penalties for tray toxins, allowing "unchecked" use of mutagen
(and such) for a clever botanist.

## Changelog

🆑 Melbert
balance: Rebalanced Unstable Mutagen's / Uranium's botany use. It now
always increases instability (on par with L4Z), and occasionally
increases instability even more at the costs of some toxins. It also
scales with volume
add: Adds "Toxin Resistance" gene to botany which makes the plant immune
to toxin damage. Given (and graftable from) Death Berries.
add: Adds "Toxin Adaptation" gene to botany which makes the plant heal
from toxin damage. Only in strange seeds (for now).
code: Cleaned up a smidge of botany code 
/🆑
2026-01-22 17:09:15 +13:00
Tim 36788ee05f Weather DLC - Make it Rain Anything! (#89550)
## 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>


![dreamseeker_9S1WzdBW8Z](https://github.com/user-attachments/assets/83aaa1fe-9105-4e15-8455-0337c5c592ef)

</details>

<details>
<summary>Blood Rain</summary>


![dreamseeker_SZufAoXDFt](https://github.com/user-attachments/assets/209404dc-34dd-4381-9bab-9b84eaec2658)

</details>

<details>
<summary>Acid Rain</summary>


![dreamseeker_ngiOqdB5n2](https://github.com/user-attachments/assets/0ab953c6-a215-444a-bdbd-addfc2b1ddbb)

</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>

![Untitled video - Made with
Clipchamp](https://github.com/user-attachments/assets/7c5c5930-6e0a-4706-a41b-3cbcc277bfd5)

</details>

<details>
<summary>Sand Storms</summary>


![dreamseeker_ZEFUS73dSA](https://github.com/user-attachments/assets/4a754f2d-c4e5-4b2f-9add-4742628cfa74)

</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>
2025-04-07 18:46:28 +02:00
MrMelbert fdd416fa5e 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
/🆑
2023-05-24 18:28:33 +00:00
AnturK 41e02e5e39 Fixes issues found by new switch lints (#64766)
Very nice addition to sdmm.
2022-02-11 01:50:02 -08:00
Ghom 326e8bfafc Hydroponics Tray USB Port (plus a tiny refactor needed to fit it in) (#62652)
Adds a USB port to constructable hydroponic trays. I had to refactor some hydro tray code, which is kinda old, to fit the USB circuit and the new signals in.
2021-11-15 17:44:22 +00:00
Watermelon914 375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
TiviPlus 0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
ArcaneMusic 531760d19d Introduces Gene Shears to Botany, and several other QOL tweaks. (#50387)
* Beaker go splash, plants mutate good

* Hard committing to this for the time being.

* Clean up.

* Not sure what I forget here.

* As yes right, I did do this.

* Avoids chemical conflicy my making it uranium, frost oil, potassium.

* More informational, and uncaps removed genes per cut, at the cost of plant health each time.

* Moved to a more critical node to enable gameplay earlier.

* Committing suggestion.

Co-Authored-By: moo <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>

* Very valid point about iterating down loops, ngl

* Fixes fixes, and other fixes.

* Fixes up documentation, and removes unused code.

* Adjusts Nutridrain to be calculated on the process side.

* Prevents Non-Extractable and Non-Removable genes from being removed, as originally intended.

Co-authored-by: moo <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
2020-04-08 17:18:39 -04:00
ArcaneMusic 1d95506cc1 LIGHTNING FAST HOTFIX FOR THE HYDROPONICS REVAMP. (#50369)
* ARCANE HOSPITAL: TRIAGE EDITION: OPEN PLANT HEART SPECIAL

* Quickfix

* Work work please god work work

* HOTFIX COMING AT YOU LIVE

* AND YOU, YOU EVIL LITTLE PROC.

* Sneakin and learnin
2020-04-03 02:37:39 -07:00
ArcaneMusic 14b7e63415 A bold new era of hydroponics (Large department rework/update) (#50001)
Shoutout to skog for helping me fine tune a lot of the ideas for this as well as convincing me to do it anyway. Feel free to send me your adoration and glory (once this is actually balanced and tested out so I can work out the like 1000 little runtimes and bugs this will surely have.)
About The Pull Request

Lets Start with everything that DIDN'T change.
Plants still have all their unique qualities. That includes chems, traits, all that good stuff.
Plant stats have been unchanged, with an exception I'll bring up later.

Cool. Onto everything else.
Changes to hydroponics trays.

Trays now have a new feature that visually you may be very familiar with. By Ctrl Clicking a tray, it activates Autogrow. Autogrow uses a HEAVY amount of power per tray, but in return it automatically maintains the plant contained within, limited nutrient loss, adding a gradual amount of water per process, and keeps pests and weeds at bay. Ideally you would only be using this on high maintenance plants, or if you need to leave your department for a few minutes. Having all your trays on Autogrow is an excellent way to kill your APC cell in a matter of seconds, even on a robust power setup.

Trays no longer use **Nutrient Points.** Instead, each tray has an internal reagent holder that basically holds a beaker for your plant's nutrients. In exchange, the tray now determines the gradual stat changes of plants based on nutrients within that nutrient tank. That's right, no more dumping chemicals into the tray to reach 100 potency in a matter of minutes. You can, however, use reagent mixes in order to improve plant stats in a satisfying way. Still, with each tray having a default of 10 reagents maximum in the tank, it places a greater impetus on upgrading trays if want to really get the most of a specific chemical composition.

If you realize you need to change the nutrients in the tank, you can Alt Click to empty the whole tank at once.
Seed Changes

All plants now have a new stat, Instability. (It was originally titled stability so I'm changing it here but yes it is now called instability) Contrary to the name, the higher the stability of the plant, the more likely that your plant will see radical changes. Plants with a low stability will not see much difference, but as you go higher and higher you will start seeing the plant automatically mutate with harsher ramifications. At 60 Stability, the plant has a chance to automatically mutate it's species. At 80 Stability, assuming you can prevent the plant from mutating beforehand, the plant has a chance to receive random plant traits similar to strange seeds. That's right! You can now be free from the tyranny of the strange seed market!

Plants are now affected differently by pests and weeds. Instead of outright killing plants, they will instead heavily lower a plant's yield and potency instead. This also allows for plants that have been left for a few minutes to outright die far less than they were before, but at the same time encourage using autogrow when AFK within the department.

When growing a plant however, you have something new to consider. Plants will now pollinate adjacent seeds in trays, which will bleed off adjacent stats to other plants. Primarily, this affects your core stats. like potency, yield, also stability. If you have 2 plant with high and low potency, they'll bleed their stats off into each other as they grow. This allows for interesting mechanical gameplay between nutrient choices, stability, and adjacency. Some plants have naturally high stability that can bleed off of other plants (Corn, Wheat, and Weeds), while others have naturally low stability and can help bring plants back into a maintainable stability threshold if you just want to harvest the plant itself.

Pollination at high levels of stability can also cause the adjacent plants to receive chemical traits from each other. This allows for plants to share chemical traits without having an insane level of control afforded by the DNA manipulator. However, careful manipulation of plant reagents is difficult to do perfectly, and should be done carefully, as well as experimentally.

For a more controlled trait experience however, we have Plant Grafts. Plant grafts are obtained by using the new secateurs, or sheers, that comes with the botanist's default kit. When a plant is ready to harvest, you can cut off a plant graft, which carries several of the plant's stats and qualities with it. When transplanted, you can share the unique traits of several plants into a new host. These traits are mostly the physical traits you're most likely familiar with, like bio-luminescence, slippery skin, liquid contents, the works. You can also store plant grafts if there's a specific trait build you'd like to eventually get to. Since you need to fully grow a plant to graft it, the process of obtaining several unique traits for a plant will result in more types of plants needing to be grown as a result.

Alright, this leads up to what you're probably guessing. DNA manipulator for plants is dead. Even if it's really good, being able to Frankenstein a dozen different plants together without even growing half of them is kinda lame, you have to admit. The new trait and chemical controls are a bit more robust overall to compensate for this.

image
Why It's Good For The Game

Chemical dependence hydroponics is dead.
Genefreak maxed out stats plants are dead.
The Tyranny of Pests and Weeds killing plants for cooperating with the station is dead.
Ambrosia Gaia is now no longer the staple plant of hydroponics, as earthblood trays are dead.
Plant mutations are now easier to come by, and can be achieved within 2 plant generations assuming you're not crossbreeding and using readily available chems.
Chefs, and by extension bartenders, get a wider array of plant's each to work with.
Botanists are no longer required to acquire a chem dispenser at shift-start to acquire mutated plants.
Crosspollination, mutation, and grafting allows for a more interesting dynamic in improving plant stats, as opposed to just clicking buttons. It also rewards planning and developing system for growing plants.
Changelog

🆑
add: Plants can now Cross-Pollinate, via adjacency. This causes plant stats of average into each-other.
add: Plants now have a new stat, Instability. Instability allows for gradual mutations to a plant's stats at certain thresholds, and a chance of mutation, or gaining new random traits at even higher thresholds.
add: Plants can be grafted when ready to harvest, and grafts can be applied to plants in order to share unique traits, or share stat changes.
del: The Plant DNA Manipulator is dead. Long Live the DNA manipulator.
tweak: Hydroponics trays now have their own internal beaker for holding chemical reagents. As such, chemical affects on plants are gradual, and slowly alter seed stats over generations.
balance: Several chemicals are adjusted to match the new system. Experiment!
/🆑
2020-04-03 16:56:25 +13:00