MeteorComponent.cs 902 B

12345678910111213141516171819202122232425
  1. using Content.Shared.Damage;
  2. namespace Content.Server.Mining;
  3. /// <summary>
  4. /// This is used for meteors which hit objects, dealing damage to destroy/kill the object and dealing equal damage back to itself.
  5. /// </summary>
  6. [RegisterComponent, Access(typeof(MeteorSystem))]
  7. public sealed partial class MeteorComponent : Component
  8. {
  9. /// <summary>
  10. /// Damage specifier that is multiplied against the calculated damage amount to determine what damage is applied to the colliding entity.
  11. /// </summary>
  12. /// <remarks>
  13. /// The values of this should add up to 1 or else the damage will be scaled.
  14. /// </remarks>
  15. [DataField]
  16. public DamageSpecifier DamageTypes = new();
  17. /// <summary>
  18. /// A list of entities that this meteor has collided with. used to ensure no double collisions occur.
  19. /// </summary>
  20. [DataField]
  21. public HashSet<EntityUid> HitList = new();
  22. }