Minor botany tweaks (#18832)
* Make the water consumption actually influenced by the seed's water consumption value * Tweak default water and nutrient consumption * Composting plants works now * Tweak seeds YML, add ez nutrient bottle to Nutrimax * Increase default nutrient consumption a bit
This commit is contained in:
@@ -42,7 +42,7 @@ namespace Content.Server.Botany.Systems
|
||||
[Dependency] private readonly AtmosphereSystem _atmosphere = default!;
|
||||
|
||||
public const float HydroponicsSpeedMultiplier = 1f;
|
||||
public const float HydroponicsConsumptionMultiplier = 4f;
|
||||
public const float HydroponicsConsumptionMultiplier = 2f;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -288,11 +288,17 @@ namespace Content.Server.Botany.Systems
|
||||
|
||||
if (_solutionSystem.TryGetSolution(args.Used, produce.SolutionName, out var solution2))
|
||||
{
|
||||
// This deliberately discards overfill.
|
||||
_solutionSystem.TryAddSolution(args.Used, solution2,
|
||||
_solutionSystem.SplitSolution(args.Used, solution2, solution2.Volume));
|
||||
if (_solutionSystem.TryGetSolution(uid, component.SoilSolutionName, out var solution1))
|
||||
{
|
||||
// We try to fit as much of the composted plant's contained solution into the hydroponics tray as we can,
|
||||
// since the plant will be consumed anyway.
|
||||
|
||||
ForceUpdateByExternalCause(uid, component);
|
||||
var fillAmount = FixedPoint2.Min(solution2.Volume, solution1.AvailableVolume);
|
||||
_solutionSystem.TryAddSolution(uid, solution1,
|
||||
_solutionSystem.SplitSolution(args.Used, solution2, fillAmount));
|
||||
|
||||
ForceUpdateByExternalCause(uid, component);
|
||||
}
|
||||
}
|
||||
|
||||
EntityManager.QueueDeleteEntity(args.Used);
|
||||
@@ -412,7 +418,7 @@ namespace Content.Server.Botany.Systems
|
||||
if (component.Seed.WaterConsumption > 0 && component.WaterLevel > 0 && _random.Prob(0.75f))
|
||||
{
|
||||
component.WaterLevel -= MathF.Max(0f,
|
||||
component.Seed.NutrientConsumption * HydroponicsConsumptionMultiplier * HydroponicsSpeedMultiplier);
|
||||
component.Seed.WaterConsumption * HydroponicsConsumptionMultiplier * HydroponicsSpeedMultiplier);
|
||||
if (component.DrawWarnings)
|
||||
component.UpdateSpriteAfterUpdate = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user