2024-08-09 18:08:56 -07:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
2022-02-17 15:40:03 +13:00
|
|
|
namespace Content.Shared.Wall;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This component enables an entity to ignore some obstructions for interaction checks.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// This will only exempt anchored entities that intersect the wall-mount. Additionally, this exemption will apply
|
|
|
|
|
/// in a limited arc, providing basic functionality for directional wall mounts.
|
|
|
|
|
/// </remarks>
|
2024-08-09 18:08:56 -07:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class WallMountComponent : Component
|
2022-02-17 15:40:03 +13:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-04-02 16:11:16 +13:00
|
|
|
/// Range of angles for which the exemption applies. Bigger is more permissive.
|
2022-02-17 15:40:03 +13:00
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2024-08-09 18:08:56 -07:00
|
|
|
[DataField("arc"), AutoNetworkedField]
|
2022-04-02 16:11:16 +13:00
|
|
|
public Angle Arc = new(MathF.PI);
|
2022-02-17 15:40:03 +13:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The direction in which the exemption arc is facing, relative to the entity's rotation. Defaults to south.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2024-08-09 18:08:56 -07:00
|
|
|
[DataField("direction"), AutoNetworkedField]
|
2022-02-17 15:40:03 +13:00
|
|
|
public Angle Direction = Angle.Zero;
|
|
|
|
|
}
|