using System; using System.Collections.Generic; using Robust.Client.UserInterface; using Robust.Shared.GameObjects; namespace Content.Client.Items { public sealed class ItemStatusCollectMessage : EntityEventArgs { public List Controls = new(); } public static class ItemStatusRegisterExt { /// /// Register an item status control for a component. /// /// The handle from within entity system initialize. /// A delegate to create the actual control. /// The type of component for which this control should be made. public static void ItemStatus( this EntitySystem.Subscriptions subs, Func createControl) where TComp : IComponent { subs.SubscribeLocalEvent((uid, _, args) => { args.Controls.Add(createControl(uid)); }); } } }