ActiveAutodocComponent.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
  2. // SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
  3. // SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
  4. //
  5. // SPDX-License-Identifier: AGPL-3.0-or-later
  6. using Content.Shared._Shitmed.Autodoc.Systems;
  7. using Robust.Shared.GameStates;
  8. using Robust.Shared.Prototypes;
  9. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  10. namespace Content.Shared._Shitmed.Autodoc.Components;
  11. /// <summary>
  12. /// Component added while operating on a patient.
  13. /// Only usable serverside, only thing that can be predicted is a surgery being active.
  14. /// </summary>
  15. [RegisterComponent, NetworkedComponent, Access(typeof(SharedAutodocSystem))]
  16. [AutoGenerateComponentPause]
  17. public sealed partial class ActiveAutodocComponent : Component
  18. {
  19. /// <summary>
  20. /// The program index that is being used.
  21. /// <c>AutodocComponent.Programs</c> is frozen while an autodoc is active.
  22. /// </summary>
  23. [DataField]
  24. public int CurrentProgram;
  25. /// <summary>
  26. /// Index of the current program's step it is trying to do.
  27. /// </summary>
  28. [DataField]
  29. public int ProgramStep;
  30. /// <summary>
  31. /// Whether a step is waiting on a doafter to complete.
  32. /// </summary>
  33. [DataField]
  34. public bool Waiting;
  35. /// <summary>
  36. /// The current body, part and surgery being done, if any.
  37. /// </summary>
  38. [DataField]
  39. public (EntityUid, EntityUid, EntProtoId)? CurrentSurgery;
  40. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
  41. [AutoPausedField]
  42. public TimeSpan NextUpdate = TimeSpan.Zero;
  43. }