CatStation/Content.Shared/Trigger/Systems/SolutionTriggerSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

19 lines
701 B
C#

using Content.Shared.Trigger.Components.Effects;
using Content.Shared.Chemistry.EntitySystems;
namespace Content.Shared.Trigger.Systems;
public sealed partial class SolutionTriggerSystem : XOnTriggerSystem<AddSolutionOnTriggerComponent>
{
[Dependency] private SharedSolutionContainerSystem _solutionContainer = default!;
protected override void OnTrigger(Entity<AddSolutionOnTriggerComponent> ent, EntityUid target, ref TriggerEvent args)
{
if (!_solutionContainer.TryGetSolution(target, ent.Comp.Solution, out var solutionRef, out _))
return;
_solutionContainer.AddSolution(solutionRef.Value, ent.Comp.AddedSolution);
args.Handled = true;
}
}