]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix plant holder double solution transfer (#32813)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Wed, 16 Oct 2024 03:57:30 +0000 (05:57 +0200)
committerGitHub <noreply@github.com>
Wed, 16 Oct 2024 03:57:30 +0000 (20:57 -0700)
Content.Server/Botany/Systems/PlantHolderSystem.cs
Resources/Locale/en-US/botany/components/plant-holder-component.ftl

index 0fdca029b79a752f1a3e9f66bf78458738377b96..fa03265692128e2ae8dbad06036e2bc502ab56a0 100644 (file)
@@ -228,37 +228,6 @@ public sealed class PlantHolderSystem : EntitySystem
             return;
         }
 
-        if (_solutionContainerSystem.TryGetDrainableSolution(args.Used, out var solution, out _)
-            && _solutionContainerSystem.ResolveSolution(uid, component.SoilSolutionName, ref component.SoilSolution)
-            && TryComp(args.Used, out SprayComponent? spray))
-        {
-            var amount = FixedPoint2.New(1);
-
-            var targetEntity = uid;
-            var solutionEntity = args.Used;
-
-            _audio.PlayPvs(spray.SpraySound, args.Used, AudioParams.Default.WithVariation(0.125f));
-
-            var split = _solutionContainerSystem.Drain(solutionEntity, solution.Value, amount);
-
-            if (split.Volume == 0)
-            {
-                _popup.PopupCursor(Loc.GetString("plant-holder-component-no-plant-message",
-                    ("owner", args.Used)), args.User);
-                return;
-            }
-
-            _popup.PopupCursor(Loc.GetString("plant-holder-component-spray-message",
-                ("owner", uid),
-                ("amount", split.Volume)), args.User, PopupType.Medium);
-
-            _solutionContainerSystem.TryAddSolution(component.SoilSolution.Value, split);
-
-            ForceUpdateByExternalCause(uid, component);
-
-            return;
-        }
-
         if (_tagSystem.HasTag(args.Used, "PlantSampleTaker"))
         {
             if (component.Seed == null)
index 0e8c4137f4ed659b4fce4eab653b1f5839d80662..ca20c277f5314b610501bfede96738de5bb3b6a2 100644 (file)
@@ -8,8 +8,6 @@ plant-holder-component-no-weeds-message = This plot is devoid of weeds! It doesn
 plant-holder-component-remove-plant-message = You remove the plant from the {$name}.
 plant-holder-component-remove-plant-others-message = {$name} removes the plant.
 plant-holder-component-no-plant-message = There is no plant to remove.
-plant-holder-component-empty-message = {$owner} is empty!
-plant-holder-component-spray-message = You spray {$owner}.
 plant-holder-component-transfer-message = You transfer {$amount}u to {$owner}.
 plant-holder-component-nothing-to-sample-message = There is nothing to take a sample of!
 plant-holder-component-already-sampled-message = This plant has already been sampled.