| 12345678910111213141516171819 |
- 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.Mask.Comp.IsToggled;
- }
- }
|