1
0

EmagProviderComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Content.Shared.Emag.Systems;
  2. using Content.Shared.Ninja.Systems;
  3. using Content.Shared.Tag;
  4. using Content.Shared.Whitelist;
  5. using Robust.Shared.Audio;
  6. using Robust.Shared.GameStates;
  7. using Robust.Shared.Prototypes;
  8. namespace Content.Shared.Ninja.Components;
  9. /// <summary>
  10. /// Component for emagging things on click.
  11. /// No charges but checks against a whitelist.
  12. /// </summary>
  13. [RegisterComponent, NetworkedComponent, Access(typeof(EmagProviderSystem))]
  14. public sealed partial class EmagProviderComponent : Component
  15. {
  16. /// <summary>
  17. /// The tag that marks an entity as immune to emagging.
  18. /// </summary>
  19. [DataField]
  20. public ProtoId<TagPrototype> AccessBreakerImmuneTag = "AccessBreakerImmune";
  21. /// <summary>
  22. /// Whitelist that entities must be on to work.
  23. /// </summary>
  24. [DataField]
  25. public EntityWhitelist? Whitelist;
  26. /// <summary>
  27. /// What type of emag this will provide.
  28. /// </summary>
  29. [DataField]
  30. public EmagType EmagType = EmagType.Access;
  31. /// <summary>
  32. /// What sound should the emag play when used
  33. /// </summary>
  34. [DataField]
  35. public SoundSpecifier EmagSound = new SoundCollectionSpecifier("sparks");
  36. }