ProjectileAnomalyComponent.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  3. namespace Content.Server.Anomaly.Components;
  4. [RegisterComponent]
  5. public sealed partial class ProjectileAnomalyComponent : Component
  6. {
  7. /// <summary>
  8. /// The prototype of the projectile that will be shot when the anomaly pulses
  9. /// </summary>
  10. [DataField("projectilePrototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
  11. public string ProjectilePrototype = default!;
  12. /// <summary>
  13. /// The speed <see cref="ProjectilePrototype"/> can travel
  14. /// </summary>
  15. [DataField("projectileSpeed"), ViewVariables(VVAccess.ReadWrite)]
  16. public float ProjectileSpeed = 30f;
  17. /// <summary>
  18. /// The minimum number of projectiles shot per pulse
  19. /// </summary>
  20. [DataField("minProjectiles"), ViewVariables(VVAccess.ReadWrite)]
  21. public int MinProjectiles = 2;
  22. /// <summary>
  23. /// The MAXIMUM number of projectiles shot per pulse
  24. /// </summary>
  25. [DataField("maxProjectiles"), ViewVariables(VVAccess.ReadWrite)]
  26. public int MaxProjectiles = 9;
  27. /// <summary>
  28. /// The MAXIMUM range for targeting entities
  29. /// </summary>
  30. [DataField("projectileRange"), ViewVariables(VVAccess.ReadWrite)]
  31. public float ProjectileRange = 50f;
  32. }