Increase robust harvest effectiveness (#10369)

This commit is contained in:
Kevin Zheng
2022-08-08 01:51:41 -07:00
committed by GitHub
parent 2c13a2c93c
commit b95cec9b19
2 changed files with 6 additions and 5 deletions

View File

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

View File

@@ -18,14 +18,14 @@ namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
var random = IoCManager.Resolve<IRobustRandom>();
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--;
}