6
2026-01-18 12:53:36 +03:00

23 lines
645 B
C#

using Content.Shared.Clothing;
using Content.Server.Nutrition.Components;
using Content.Shared.Clothing;
using Content.Shared.Examine;
using Content.Shared.Nutrition.Components;
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.Mask.Comp.IsToggled;
}
}