Implement map text (#28705)
This commit is contained in:
28
Content.Server/MapText/MapTextSystem.cs
Normal file
28
Content.Server/MapText/MapTextSystem.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Content.Shared.MapText;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Server.MapText;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public sealed class MapTextSystem : SharedMapTextSystem
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<MapTextComponent, ComponentGetState>(GetCompState);
|
||||
}
|
||||
|
||||
private void GetCompState(Entity<MapTextComponent> ent, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new MapTextComponentState
|
||||
{
|
||||
Text = ent.Comp.Text,
|
||||
LocText = ent.Comp.LocText,
|
||||
Color = ent.Comp.Color,
|
||||
FontId = ent.Comp.FontId,
|
||||
FontSize = ent.Comp.FontSize,
|
||||
Offset = ent.Comp.Offset
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user