From: Princess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com> Date: Tue, 13 Jan 2026 07:29:34 +0000 (-0800) Subject: Balance swing at Vestine (#42302) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4cd5d115bfe373e021458105859f46ce3db94b8c;p=space-station-14.git Balance swing at Vestine (#42302) * AAAAAAAAAAAAAAAAAAAAAAA * whhops * full range whoop * less diff any% --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> --- diff --git a/Content.Server/EntityEffects/Effects/Botany/PlantMutateChemicalsEntityEffectSystem.cs b/Content.Server/EntityEffects/Effects/Botany/PlantMutateChemicalsEntityEffectSystem.cs index 1f8f3fc946..b21bc0b7b3 100644 --- a/Content.Server/EntityEffects/Effects/Botany/PlantMutateChemicalsEntityEffectSystem.cs +++ b/Content.Server/EntityEffects/Effects/Botany/PlantMutateChemicalsEntityEffectSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Botany.Components; using Content.Shared.EntityEffects; using Content.Shared.EntityEffects.Effects.Botany; using Content.Shared.FixedPoint; +using Content.Shared.Random.Helpers; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -19,12 +20,11 @@ public sealed partial class PlantMutateChemicalsEntityEffectSystem : EntityEffec return; var chemicals = entity.Comp.Seed.Chemicals; - var randomChems = _proto.Index(args.Effect.RandomPickBotanyReagent).Fills; + var randomChems = _proto.Index(args.Effect.RandomPickBotanyReagent); // Add a random amount of a random chemical to this set of chemicals - var pick = _random.Pick(randomChems); - var chemicalId = _random.Pick(pick.Reagents); - var amount = _random.NextFloat(0.1f, (float)pick.Quantity); + var (chemicalId, quantity) = randomChems.Pick(_random); + var amount = FixedPoint2.Max(_random.NextFloat(0f, 1f) * quantity, FixedPoint2.Epsilon); var seedChemQuantity = new SeedChemQuantity(); if (chemicals.ContainsKey(chemicalId)) { @@ -34,7 +34,7 @@ public sealed partial class PlantMutateChemicalsEntityEffectSystem : EntityEffec else { //Set the minimum to a fifth of the quantity to give some level of bad luck protection - seedChemQuantity.Min = FixedPoint2.Clamp(pick.Quantity / 5f, FixedPoint2.Epsilon, 1f); + seedChemQuantity.Min = FixedPoint2.Clamp(quantity / 5f, FixedPoint2.Epsilon, 1f); seedChemQuantity.Max = seedChemQuantity.Min + amount; seedChemQuantity.Inherent = false; } diff --git a/Resources/Prototypes/Hydroponics/randomChemicals.yml b/Resources/Prototypes/Hydroponics/randomChemicals.yml index 52f66ed78f..3b8d225c36 100644 --- a/Resources/Prototypes/Hydroponics/randomChemicals.yml +++ b/Resources/Prototypes/Hydroponics/randomChemicals.yml @@ -125,19 +125,19 @@ - type: weightedRandomFillSolution id: EvilRandomFillSolution fills: - - quantity: 0.1 # Common but low quantity - weight: 20 + - quantity: 0.05 # Common but very low quantity + weight: 40 reagents: - - Vestine - - quantity: 0.5 # High quantity but uncommon - weight: 10 - reagents: - - Stimulants + - Nocturine - MuteToxin - - quantity: 0.5 # High quantity but very rare + - Lead + - quantity: 0.1 + weight: 5 # 99.9% chance of appearing at least once with 60u of vestine with an average of 6.5 occurances. + reagents: + - Vestine + - quantity: 1.0 # High quantity but on average only 1 per chemical kit weight: 1 reagents: - Tazinide - - Lead - - Nocturine + - Stimulants - Lexorin diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index 1d587ee89e..e69a277e4e 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -732,6 +732,9 @@ physicalDesc: reagent-physical-desc-starry flavor: medicine color: "#2b2f77" + plantMetabolism: + - !type:PlantAdjustToxins + amount: -5 metabolisms: Medicine: effects: diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index ce2982d184..6fb5d3aa7a 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -645,6 +645,8 @@ plantMetabolism: - !type:PlantMutateChemicals randomPickBotanyReagent: EvilRandomFillSolution + - !type:PlantAdjustToxins + amount: 10 metabolisms: Poison: effects: