using System.Numerics; using Vector2 = System.Numerics.Vector2; namespace Content.Server.Tabletop.Components { /// /// A component that makes an object playable as a tabletop game. /// [RegisterComponent, Access(typeof(TabletopSystem))] public sealed class TabletopGameComponent : Component { /// /// The localized name of the board. Shown in the UI. /// [DataField("boardName")] public string BoardName { get; } = "tabletop-default-board-name"; /// /// The type of method used to set up a tabletop. /// [DataField("setup", required: true)] public TabletopSetup Setup { get; } = new TabletopChessSetup(); /// /// The size of the viewport being opened. Must match the board dimensions otherwise you'll get the space parallax (unless that's what you want). /// [DataField("size")] public Vector2i Size { get; } = (300, 300); /// /// The zoom of the viewport camera. /// [DataField("cameraZoom")] public Vector2 CameraZoom { get; } = Vector2.One; /// /// The specific session of this tabletop. /// [ViewVariables] public TabletopSession? Session { get; set; } = null; } }