BodyPartEffectComponent.cs 1.1 KB

12345678910111213141516171819202122232425262728293031
  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. using Robust.Shared.GameStates;
  6. using Robust.Shared.Prototypes;
  7. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  8. namespace Content.Shared._Shitmed.BodyEffects;
  9. [RegisterComponent, NetworkedComponent]
  10. [AutoGenerateComponentPause]
  11. public sealed partial class BodyPartEffectComponent : Component
  12. {
  13. /// <summary>
  14. /// The components that are active on the part and will be refreshed every 5s
  15. /// </summary>
  16. [DataField]
  17. public ComponentRegistry Active = new();
  18. /// <summary>
  19. /// How long to wait between each refresh.
  20. /// Effects can only last at most this long once the organ is removed.
  21. /// </summary>
  22. [DataField]
  23. public TimeSpan Delay = TimeSpan.FromSeconds(5);
  24. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
  25. public TimeSpan NextUpdate = TimeSpan.Zero;
  26. }