2021-08-02 13:53:33 +02:00
|
|
|
using Robust.Shared.GameStates;
|
2019-04-04 15:09:06 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.SubFloor
|
2019-04-04 15:09:06 +02:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2019-09-19 11:43:46 -07:00
|
|
|
/// Simple component that automatically hides the sibling
|
2022-02-14 16:20:35 +13:00
|
|
|
/// <see cref="SpriteComponent" /> when the tile it's on is not a sub floor
|
2019-09-19 11:43:46 -07:00
|
|
|
/// (plating).
|
2019-04-04 15:09:06 +02:00
|
|
|
/// </summary>
|
2019-09-19 11:43:46 -07:00
|
|
|
/// <seealso cref="P:Content.Shared.Maps.ContentTileDefinition.IsSubFloor" />
|
2021-08-02 13:53:33 +02:00
|
|
|
[NetworkedComponent]
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(SharedSubFloorHideSystem))]
|
2019-04-04 15:09:06 +02:00
|
|
|
public sealed class SubFloorHideComponent : Component
|
|
|
|
|
{
|
2022-02-12 12:00:33 +13:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the entity's current position has a "Floor-type" tile above its current position.
|
|
|
|
|
/// </summary>
|
2022-02-14 16:20:35 +13:00
|
|
|
[ViewVariables]
|
2022-02-12 12:00:33 +13:00
|
|
|
public bool IsUnderCover { get; set; } = false;
|
|
|
|
|
|
2022-02-16 15:34:31 +13:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether interactions with this entity should be blocked while it is under floor tiles.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
2022-02-18 15:01:15 +13:00
|
|
|
/// Useful for entities like vents, which are only partially hidden. Anchor attempts will still be blocked.
|
2022-02-16 15:34:31 +13:00
|
|
|
/// </remarks>
|
|
|
|
|
[DataField("blockInteractions")]
|
|
|
|
|
public bool BlockInteractions { get; set; } = true;
|
|
|
|
|
|
2022-03-12 16:20:31 -06:00
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this entity's ambience should be disabled when underneath the floor.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Useful for cables and piping, gives maint it's distinct noise.
|
|
|
|
|
/// </remarks>
|
|
|
|
|
[DataField("blockAmbience")]
|
|
|
|
|
public bool BlockAmbience { get; set; } = true;
|
|
|
|
|
|
2021-08-02 13:53:33 +02:00
|
|
|
/// <summary>
|
2022-02-14 16:20:35 +13:00
|
|
|
/// When revealed using some scanning tool, what transparency should be used to draw this item?
|
2021-07-30 12:25:58 +02:00
|
|
|
/// </summary>
|
2022-02-14 16:20:35 +13:00
|
|
|
[DataField("scannerTransparency")]
|
|
|
|
|
public float ScannerTransparency = 0.8f;
|
2021-12-13 23:46:47 -08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The entities this subfloor is revealed by.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(SharedSubFloorHideSystem), Other = AccessPermissions.ReadWriteExecute)] // FIXME Friends
|
2021-12-13 23:46:47 -08:00
|
|
|
public HashSet<EntityUid> RevealedBy { get; set; } = new();
|
2021-08-02 13:53:33 +02:00
|
|
|
}
|
2019-04-04 15:09:06 +02:00
|
|
|
}
|