mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-05 05:47:27 +00:00
20 lines
534 B
C#
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;
|
|
}
|
|
}
|