Fix plant holder double solution transfer (#32813)
This commit is contained in:
@@ -228,37 +228,6 @@ public sealed class PlantHolderSystem : EntitySystem
|
|||||||
return;
|
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 (_tagSystem.HasTag(args.Used, "PlantSampleTaker"))
|
||||||
{
|
{
|
||||||
if (component.Seed == null)
|
if (component.Seed == null)
|
||||||
|
|||||||
@@ -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-message = You remove the plant from the {$name}.
|
||||||
plant-holder-component-remove-plant-others-message = {$name} removes the plant.
|
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-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-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-nothing-to-sample-message = There is nothing to take a sample of!
|
||||||
plant-holder-component-already-sampled-message = This plant has already been sampled.
|
plant-holder-component-already-sampled-message = This plant has already been sampled.
|
||||||
|
|||||||
Reference in New Issue
Block a user