Files
tbd-station-14/Content.Server/Nutrition/EntitySystems/IngestionBlockerSystem.cs

20 lines
534 B
C#

using Content.Server.Nutrition.Components;
using Content.Shared.Clothing;
namespace Content.Server.Nutrition.EntitySystems;
public sealed class IngestionBlockerSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<IngestionBlockerComponent, ItemMaskToggledEvent>(OnBlockerMaskToggled);
}
private void OnBlockerMaskToggled(Entity<IngestionBlockerComponent> ent, ref ItemMaskToggledEvent args)
{
ent.Comp.Enabled = !args.IsToggled;
}
}