OrganEffectComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
  2. // SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
  3. //
  4. // SPDX-License-Identifier: AGPL-3.0-or-later
  5. // We keep this clone of the other component since I don't know yet if I'll need organ specific functions in the future.
  6. using Robust.Shared.GameStates;
  7. using Robust.Shared.Prototypes;
  8. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  9. namespace Content.Shared._Shitmed.BodyEffects;
  10. [RegisterComponent, NetworkedComponent]
  11. [AutoGenerateComponentPause]
  12. public sealed partial class OrganEffectComponent : Component
  13. {
  14. /// <summary>
  15. /// The components that are active on the part and will be refreshed every 5s
  16. /// </summary>
  17. [DataField]
  18. public ComponentRegistry Active = new();
  19. /// <summary>
  20. /// How long to wait between each refresh.
  21. /// Effects can only last at most this long once the organ is removed.
  22. /// </summary>
  23. [DataField]
  24. public TimeSpan Delay = TimeSpan.FromSeconds(5);
  25. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
  26. public TimeSpan NextUpdate = TimeSpan.Zero;
  27. }