2022-10-24 23:09:16 -04:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
2022-10-22 18:06:55 -04:00
|
|
|
namespace Content.Shared.Stealth.Components
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// When added to an entity with stealth component, this component will change the visibility
|
|
|
|
|
/// based on the entity's (lack of) movement.
|
|
|
|
|
/// </summary>
|
2022-10-24 23:09:16 -04:00
|
|
|
[RegisterComponent, NetworkedComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class StealthOnMoveComponent : Component
|
2022-10-22 18:06:55 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Rate that effects how fast an entity's visibility passively changes.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("passiveVisibilityRate")]
|
2023-08-22 18:14:33 -07:00
|
|
|
public float PassiveVisibilityRate = -0.15f;
|
2022-10-22 18:06:55 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Rate for movement induced visibility changes. Scales with distance moved.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("movementVisibilityRate")]
|
2023-08-22 18:14:33 -07:00
|
|
|
public float MovementVisibilityRate = 0.2f;
|
2022-10-22 18:06:55 -04:00
|
|
|
}
|
|
|
|
|
}
|