* 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
20 lines
544 B
C#
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;
|
|
}
|
|
}
|