27 lines
881 B
C#
27 lines
881 B
C#
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Content.Shared.SubFloor
|
|
{
|
|
/// <summary>
|
|
/// Simple component that automatically hides the sibling
|
|
/// <see cref="ISpriteComponent" /> when the tile it's on is not a sub floor
|
|
/// (plating).
|
|
/// </summary>
|
|
/// <seealso cref="P:Content.Shared.Maps.ContentTileDefinition.IsSubFloor" />
|
|
[RegisterComponent]
|
|
public sealed class SubFloorHideComponent : Component
|
|
{
|
|
/// <inheritdoc />
|
|
public override string Name => "SubFloorHide";
|
|
|
|
/// <summary>
|
|
/// This entity needs to be anchored to be hid in the subfloor.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("requireAnchored")]
|
|
public bool RequireAnchored { get; set; } = true;
|
|
}
|
|
}
|