Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Construction.Components;
|
||||
using Content.Server.Construction.Components;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared.Construction;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -22,6 +23,7 @@ public sealed class MachineFrameSystem : EntitySystem
|
||||
SubscribeLocalEvent<MachineFrameComponent, ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<MachineFrameComponent, ComponentStartup>(OnStartup);
|
||||
SubscribeLocalEvent<MachineFrameComponent, InteractUsingEvent>(OnInteractUsing);
|
||||
SubscribeLocalEvent<MachineFrameComponent, ExaminedEvent>(OnMachineFrameExamined);
|
||||
}
|
||||
|
||||
private void OnInit(EntityUid uid, MachineFrameComponent component, ComponentInit args)
|
||||
@@ -295,4 +297,11 @@ public sealed class MachineFrameSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OnMachineFrameExamined(EntityUid uid, MachineFrameComponent component, ExaminedEvent args)
|
||||
{
|
||||
if (!args.IsInDetailsRange)
|
||||
return;
|
||||
if (component.HasBoard)
|
||||
args.PushMarkup(Loc.GetString("machine-frame-component-on-examine-label", ("board", EntityManager.GetComponent<MetaDataComponent>(component.BoardContainer.ContainedEntities[0]).EntityName)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
machine-frame-component-on-examine-label = [color=white]Current machine board:[/color] [color=cyan]{$board}[/color]
|
||||
Reference in New Issue
Block a user