DamageMarkerOnCollideComponent.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  1. using Content.Shared.Damage;
  2. using Content.Shared.Whitelist;
  3. using Robust.Shared.GameStates;
  4. namespace Content.Shared.Weapons.Marker;
  5. /// <summary>
  6. /// Applies <see cref="DamageMarkerComponent"/> when colliding with an entity.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedDamageMarkerSystem))]
  9. public sealed partial class DamageMarkerOnCollideComponent : Component
  10. {
  11. [DataField("whitelist"), AutoNetworkedField]
  12. public EntityWhitelist? Whitelist = new();
  13. [ViewVariables(VVAccess.ReadWrite), DataField("duration"), AutoNetworkedField]
  14. public TimeSpan Duration = TimeSpan.FromSeconds(5);
  15. /// <summary>
  16. /// Additional damage to be applied.
  17. /// </summary>
  18. [ViewVariables(VVAccess.ReadWrite), DataField("damage")]
  19. public DamageSpecifier Damage = new();
  20. /// <summary>
  21. /// How many more times we can apply it.
  22. /// </summary>
  23. [ViewVariables(VVAccess.ReadWrite), DataField("amount"), AutoNetworkedField]
  24. public int Amount = 1;
  25. }