1
0

MapTextSystem.cs 754 B

12345678910111213141516171819202122232425262728
  1. using Content.Shared.MapText;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Server.MapText;
  4. /// <inheritdoc/>
  5. public sealed class MapTextSystem : SharedMapTextSystem
  6. {
  7. /// <inheritdoc/>
  8. public override void Initialize()
  9. {
  10. base.Initialize();
  11. SubscribeLocalEvent<MapTextComponent, ComponentGetState>(GetCompState);
  12. }
  13. private void GetCompState(Entity<MapTextComponent> ent, ref ComponentGetState args)
  14. {
  15. args.State = new MapTextComponentState
  16. {
  17. Text = ent.Comp.Text,
  18. LocText = ent.Comp.LocText,
  19. Color = ent.Comp.Color,
  20. FontId = ent.Comp.FontId,
  21. FontSize = ent.Comp.FontSize,
  22. Offset = ent.Comp.Offset
  23. };
  24. }
  25. }