GuardianCreatorComponent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. namespace Content.Server.Guardian
  4. {
  5. /// <summary>
  6. /// Creates a GuardianComponent attached to the user's GuardianHost.
  7. /// </summary>
  8. [RegisterComponent]
  9. public sealed partial class GuardianCreatorComponent : Component
  10. {
  11. /// <summary>
  12. /// Counts as spent upon exhausting the injection
  13. /// </summary>
  14. /// <remarks>
  15. /// We don't mark as deleted as examine depends on this.
  16. /// </remarks>
  17. public bool Used = false;
  18. /// <summary>
  19. /// The prototype of the guardian entity which will be created
  20. /// </summary>
  21. [DataField("guardianProto", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>), required: true)]
  22. public string GuardianProto { get; set; } = default!;
  23. /// <summary>
  24. /// How long it takes to inject someone.
  25. /// </summary>
  26. [DataField("delay")]
  27. public float InjectionDelay = 5f;
  28. }
  29. }