StatusEffectOrganComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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.StatusEffect;
  7. using Robust.Shared.Prototypes;
  8. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  9. namespace Content.Server._Shitmed.Body.Organ;
  10. [RegisterComponent, Access(typeof(StatusEffectOrganSystem))]
  11. [AutoGenerateComponentPause]
  12. public sealed partial class StatusEffectOrganComponent : Component
  13. {
  14. /// <summary>
  15. /// List of status effects and components to refresh while the organ is installed.
  16. /// </summary>
  17. [DataField(required: true)]
  18. public Dictionary<ProtoId<StatusEffectPrototype>, string> Refresh = 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. }