37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
using Content.Client._NF.Medical.EntitySystems;
|
|
using Content.Client.Guidebook.Richtext;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client._NF.Guidebook.Controls;
|
|
|
|
[UsedImplicitly, GenerateTypedNameReferences]
|
|
public sealed partial class GuideMedicalGroupEmbed : BoxContainer, IDocumentTag
|
|
{
|
|
[Dependency] private readonly IEntitySystemManager _sysMan = default!;
|
|
|
|
public GuideMedicalGroupEmbed()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
IoCManager.InjectDependencies(this);
|
|
MouseFilter = MouseFilterMode.Stop;
|
|
|
|
foreach (var data in _sysMan.GetEntitySystem<MedicalGuideDataSystem>().Registry.OrderBy(it => it.Identifier))
|
|
{
|
|
var embed = new GuideMedicalEmbed(data);
|
|
GroupContainer.AddChild(embed);
|
|
}
|
|
}
|
|
|
|
public bool TryParseTag(Dictionary<string, string> args, [NotNullWhen(true)] out Control? control)
|
|
{
|
|
control = this;
|
|
return true;
|
|
}
|
|
}
|