Airlock visuals (#7261)
This commit is contained in:
30
Content.Shared/AirlockPainter/SharedAirlockPainterSystem.cs
Normal file
30
Content.Shared/AirlockPainter/SharedAirlockPainterSystem.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user