Files
tbd-station-14/Content.Shared/AirlockPainter/SharedAirlockPainterSystem.cs
2022-04-16 15:31:12 +10:00

31 lines
949 B
C#

using System.Linq;
using Content.Shared.AirlockPainter.Prototypes;
using Robust.Shared.Prototypes;
namespace Content.Shared.AirlockPainter
{
public abstract class SharedAirlockPainterSystem : EntitySystem
{
[Dependency] protected readonly IPrototypeManager _prototypeManager = default!;
public List<string> Styles { get; private set; } = new();
public List<AirlockGroupPrototype> Groups { get; private set; } = new();
public override void Initialize()
{
base.Initialize();
HashSet<string> styles = new();
foreach (AirlockGroupPrototype grp in _prototypeManager.EnumeratePrototypes<AirlockGroupPrototype>())
{
Groups.Add(grp);
foreach (string style in grp.StylePaths.Keys)
{
styles.Add(style);
}
}
Styles = styles.ToList();
}
}
}