mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
Implement map text (#28705)
(cherry picked from commit de07c291de827bd8a2e843974d4362a13be3bb89)
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