Files
tbd-station-14/Content.Shared/Nutrition/EntitySystems/IngestionBlockerSystem.cs
DrSmugleaf 7f9b2a0434 Fix eating and drinking verbs showing up after a short delay and making your verb UI bounce (#38164)
* Fix eating and drinking verbs showing up after a short delay and making your verb UI bounce

* Usings fix

* Usings fix

* Usings fix

* Usings fix

* CVar fix

* Predicted ppups

* Openable predicted popup

* Fix audio prediction
2025-06-09 10:36:04 -04:00

20 lines
544 B
C#

using Content.Shared.Clothing;
using Content.Shared.Nutrition.Components;
namespace Content.Shared.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;
}
}