TegSystem.cs 943 B

123456789101112131415161718192021222324252627282930
  1. using Content.Client.Examine;
  2. using Robust.Shared.Map;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Client.Power.Generation.Teg;
  5. /// <summary>
  6. /// Handles client-side logic for the thermo-electric generator (TEG).
  7. /// </summary>
  8. /// <remarks>
  9. /// <para>
  10. /// TEG circulators show which direction the in- and outlet port is by popping up two floating arrows when examined.
  11. /// </para>
  12. /// </remarks>
  13. /// <seealso cref="TegCirculatorComponent"/>
  14. public sealed class TegSystem : EntitySystem
  15. {
  16. [ValidatePrototypeId<EntityPrototype>]
  17. private const string ArrowPrototype = "TegCirculatorArrow";
  18. public override void Initialize()
  19. {
  20. SubscribeLocalEvent<TegCirculatorComponent, ClientExaminedEvent>(CirculatorExamined);
  21. }
  22. private void CirculatorExamined(EntityUid uid, TegCirculatorComponent component, ClientExaminedEvent args)
  23. {
  24. Spawn(ArrowPrototype, new EntityCoordinates(uid, 0, 0));
  25. }
  26. }