AutodocComponent.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 Content.Shared.DeviceLinking;
  8. using Robust.Shared.GameStates;
  9. using Robust.Shared.Prototypes;
  10. using Robust.Shared.Serialization;
  11. namespace Content.Shared._Shitmed.Autodoc.Components;
  12. /// <summary>
  13. /// God component for autodoc.
  14. /// </summary>
  15. [RegisterComponent, NetworkedComponent, Access(typeof(SharedAutodocSystem))]
  16. [AutoGenerateComponentState]
  17. public sealed partial class AutodocComponent : Component
  18. {
  19. [DataField]
  20. public ProtoId<SinkPortPrototype> OperatingTablePort = "OperatingTableReceiver";
  21. /// <summary>
  22. /// The linked operating table.
  23. /// Autodocs require a linked operating table to be used.
  24. /// </summary>
  25. [DataField, AutoNetworkedField]
  26. public EntityUid? OperatingTable;
  27. [DataField, AutoNetworkedField]
  28. public List<AutodocProgram> Programs = new();
  29. /// <summary>
  30. /// Requires that the patient be asleep for forced vulnerability.
  31. /// Can be disabled to operate on awake patients.
  32. /// </summary>
  33. [DataField, AutoNetworkedField]
  34. public bool RequireSleeping = true;
  35. /// <summary>
  36. /// The hand to hold surgery-specific items in (organs etc).
  37. /// After an operation this gets put back into storage.
  38. /// </summary>
  39. [DataField]
  40. public string ItemSlot = "surgery_specific";
  41. /// <summary>
  42. /// How long to wait between processing program steps while active.
  43. /// </summary>
  44. [DataField]
  45. public TimeSpan UpdateDelay = TimeSpan.FromSeconds(0.5);
  46. /// <summary>
  47. /// The maximum number of programs this autodoc can have.
  48. /// </summary>
  49. [DataField]
  50. public int MaxPrograms = 16;
  51. /// <summary>
  52. /// How long a program title is allowed to be.
  53. /// </summary>
  54. public int MaxProgramTitleLength = 20;
  55. /// <summary>
  56. /// The maximum number of steps a program can have.
  57. /// </summary>
  58. [DataField]
  59. public int MaxProgramSteps = 16;
  60. }
  61. [Serializable, NetSerializable]
  62. public enum AutodocWireStatus : byte
  63. {
  64. PowerIndicator,
  65. SafetyIndicator
  66. }