MemoryCellComponent.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Content.Server.DeviceLinking.Systems;
  2. using Content.Shared.DeviceLinking;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.DeviceLinking.Components;
  5. /// <summary>
  6. /// Memory cell that sets the output to the input when enabled.
  7. /// </summary>
  8. [RegisterComponent, Access(typeof(MemoryCellSystem))]
  9. public sealed partial class MemoryCellComponent : Component
  10. {
  11. /// <summary>
  12. /// Name of the input port.
  13. /// </summary>
  14. [DataField]
  15. public ProtoId<SinkPortPrototype> InputPort = "MemoryInput";
  16. /// <summary>
  17. /// Name of the enable port.
  18. /// </summary>
  19. [DataField]
  20. public ProtoId<SinkPortPrototype> EnablePort = "MemoryEnable";
  21. /// <summary>
  22. /// Name of the output port.
  23. /// </summary>
  24. [DataField]
  25. public ProtoId<SourcePortPrototype> OutputPort = "Output";
  26. // State
  27. [DataField]
  28. public SignalState InputState = SignalState.Low;
  29. [DataField]
  30. public SignalState EnableState = SignalState.Low;
  31. [DataField]
  32. public bool LastOutput;
  33. }