StealthOnMoveComponent.cs 851 B

123456789101112131415161718192021222324
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared.Stealth.Components
  3. {
  4. /// <summary>
  5. /// When added to an entity with stealth component, this component will change the visibility
  6. /// based on the entity's (lack of) movement.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent]
  9. public sealed partial class StealthOnMoveComponent : Component
  10. {
  11. /// <summary>
  12. /// Rate that effects how fast an entity's visibility passively changes.
  13. /// </summary>
  14. [DataField("passiveVisibilityRate")]
  15. public float PassiveVisibilityRate = -0.15f;
  16. /// <summary>
  17. /// Rate for movement induced visibility changes. Scales with distance moved.
  18. /// </summary>
  19. [DataField("movementVisibilityRate")]
  20. public float MovementVisibilityRate = 0.2f;
  21. }
  22. }