mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03: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;
|
|
}
|
|
}
|