mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
19 lines
534 B
C#
19 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;
|
|
}
|
|
}
|