mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-22 00:01:23 +03:00
* Move MaskComponent to shared and add toggle events * Datafield and network IsToggled * Add missing dirty
18 lines
513 B
C#
18 lines
513 B
C#
using Content.Shared.Clothing;
|
|
|
|
namespace Content.Server.Nutrition.EntitySystems;
|
|
|
|
public sealed class IngestionBlockerSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<Components.IngestionBlockerComponent, ItemMaskToggledEvent>(OnBlockerMaskToggled);
|
|
}
|
|
|
|
private void OnBlockerMaskToggled(Entity<Components.IngestionBlockerComponent> ent, ref ItemMaskToggledEvent args)
|
|
{
|
|
ent.Comp.Enabled = !args.IsToggled;
|
|
}
|
|
}
|