Files
OldThink/Content.Server/Chemistry/ReagentEffects/WashCreamPieReaction.cs
mirrorcult 1ab7170adb Refactor reaction effects to use reagent effects (#5426)
* reaction effect refactor

* works now
2021-11-21 00:35:02 -07:00

25 lines
883 B
C#

using System.Collections.Generic;
using Content.Server.Nutrition.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Content.Shared.Nutrition.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
namespace Content.Server.Chemistry.ReagentEffects
{
[UsedImplicitly]
public class WashCreamPieReaction : ReagentEffect
{
public override void Effect(ReagentEffectArgs args)
{
if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out CreamPiedComponent? creamPied)) return;
EntitySystem.Get<CreamPieSystem>().SetCreamPied(args.SolutionEntity, creamPied, false);
}
}
}