* Initial prediction * new group handling * groups for all examines that use multiple rn * compile * why was it doing this?? * handle newlines with sorting properly
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Content.Shared.Examine;
|
|
using Content.Shared.Tools.Systems;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Wires;
|
|
|
|
public abstract class SharedWiresSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<WiresPanelComponent, ExaminedEvent>(OnExamine);
|
|
}
|
|
|
|
private void OnExamine(EntityUid uid, WiresPanelComponent component, ExaminedEvent args)
|
|
{
|
|
using (args.PushGroup(nameof(WiresPanelComponent)))
|
|
{
|
|
if (!component.Open)
|
|
{
|
|
args.PushMarkup(Loc.GetString("wires-panel-component-on-examine-closed"));
|
|
}
|
|
else
|
|
{
|
|
args.PushMarkup(Loc.GetString("wires-panel-component-on-examine-open"));
|
|
|
|
if (TryComp<WiresPanelSecurityComponent>(uid, out var wiresPanelSecurity) &&
|
|
wiresPanelSecurity.Examine != null)
|
|
{
|
|
args.PushMarkup(Loc.GetString(wiresPanelSecurity.Examine));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|