From b95cec9b19b0420cef64edbd3d32443012da1b9d Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Mon, 8 Aug 2022 01:51:41 -0700 Subject: [PATCH] Increase robust harvest effectiveness (#10369) --- Content.Server/Botany/SeedPrototype.cs | 3 ++- .../ReagentEffects/PlantMetabolism/RobustHarvest.cs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Content.Server/Botany/SeedPrototype.cs b/Content.Server/Botany/SeedPrototype.cs index 510a81bb18..9ec5e081b7 100644 --- a/Content.Server/Botany/SeedPrototype.cs +++ b/Content.Server/Botany/SeedPrototype.cs @@ -1,6 +1,7 @@ using Content.Server.Botany.Components; using Content.Server.Botany.Systems; using Content.Shared.Atmos; +using Content.Shared.Chemistry.Reagent; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; @@ -63,7 +64,7 @@ public struct SeedChemQuantity // TODO reduce the number of friends to a reasonable level. Requires ECS-ing things like plant holder component. [Virtual, DataDefinition] -[Access(typeof(BotanySystem), typeof(PlantHolderSystem), typeof(SeedExtractorSystem), typeof(PlantHolderComponent))] +[Access(typeof(BotanySystem), typeof(PlantHolderSystem), typeof(SeedExtractorSystem), typeof(PlantHolderComponent), typeof(ReagentEffect))] public class SeedData { #region Tracking diff --git a/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/RobustHarvest.cs b/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/RobustHarvest.cs index 26accde182..8a9e31f69b 100644 --- a/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/RobustHarvest.cs +++ b/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/RobustHarvest.cs @@ -18,14 +18,14 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism var random = IoCManager.Resolve(); - if (plantHolderComp.Seed.Potency < 100 && random.Prob(0.1f)) + if (plantHolderComp.Seed.Potency < 100) { plantHolderComp.EnsureUniqueSeed(); - plantHolderComp.Seed.Potency++; + plantHolderComp.Seed.Potency = Math.Min(plantHolderComp.Seed.Potency + 3, 100); } - - if (plantHolderComp.Seed.Yield > 1 && random.Prob(0.1f)) + else if (plantHolderComp.Seed.Yield > 1 && random.Prob(0.1f)) { + // Too much of a good thing reduces yield plantHolderComp.EnsureUniqueSeed(); plantHolderComp.Seed.Yield--; }