Files
tbd-station-14/Content.Shared/Placeable/PlaceableSurfaceComponent.cs
Vera Aguilera Puerto c5f7c61041 Fix some friend access violations by allowing others access. (#8594)
Rename Friend attribute to Access attribute.
Updates submodule to v0.21.0.0 as well.
2022-06-07 11:30:27 +02:00

38 lines
1.1 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Placeable
{
[RegisterComponent, NetworkedComponent]
[Access(typeof(PlaceableSurfaceSystem))]
public sealed class PlaceableSurfaceComponent : Component
{
[ViewVariables]
[DataField("isPlaceable")]
public bool IsPlaceable { get; set; } = true;
[ViewVariables]
[DataField("placeCentered")]
public bool PlaceCentered { get; set; }
[ViewVariables]
[DataField("positionOffset")]
public Vector2 PositionOffset { get; set; }
}
[Serializable, NetSerializable]
public sealed class PlaceableSurfaceComponentState : ComponentState
{
public readonly bool IsPlaceable;
public readonly bool PlaceCentered;
public readonly Vector2 PositionOffset;
public PlaceableSurfaceComponentState(bool placeable, bool centered, Vector2 offset)
{
IsPlaceable = placeable;
PlaceCentered = centered;
PositionOffset = offset;
}
}
}