ReformComponent.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. using Robust.Shared.GameStates;
  4. namespace Content.Shared.Species.Components;
  5. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  6. public sealed partial class ReformComponent : Component
  7. {
  8. /// <summary>
  9. /// The action to use.
  10. /// </summary>
  11. [DataField(required: true)]
  12. public EntProtoId ActionPrototype = default!;
  13. [DataField, AutoNetworkedField]
  14. public EntityUid? ActionEntity;
  15. /// <summary>
  16. /// How long it will take to reform
  17. /// </summary>
  18. [DataField(required: true)]
  19. public float ReformTime = 0;
  20. /// <summary>
  21. /// Whether or not the entity should start with a cooldown
  22. /// </summary>
  23. [DataField]
  24. public bool StartDelayed = true;
  25. /// <summary>
  26. /// Whether or not the entity should be stunned when reforming at all
  27. /// </summary>
  28. [DataField]
  29. public bool ShouldStun = true;
  30. /// <summary>
  31. /// The text that appears when attempting to reform
  32. /// </summary>
  33. [DataField(required: true)]
  34. public string PopupText;
  35. /// <summary>
  36. /// The mob that our entity will reform into
  37. /// </summary>
  38. [DataField(required: true)]
  39. public EntProtoId ReformPrototype { get; private set; }
  40. }