2023-07-08 14:08:32 +10:00
|
|
|
using System.Numerics;
|
|
|
|
|
|
2021-09-13 11:58:44 +02:00
|
|
|
namespace Content.Server.Tabletop.Components
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A component that makes an object playable as a tabletop game.
|
|
|
|
|
/// </summary>
|
2022-06-07 15:26:28 +02:00
|
|
|
[RegisterComponent, Access(typeof(TabletopSystem))]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class TabletopGameComponent : Component
|
2021-09-13 11:58:44 +02:00
|
|
|
{
|
2021-09-18 10:40:38 +02:00
|
|
|
[DataField("boardName")]
|
|
|
|
|
public string BoardName { get; } = "tabletop-default-board-name";
|
|
|
|
|
|
|
|
|
|
[DataField("setup", required: true)]
|
|
|
|
|
public TabletopSetup Setup { get; } = new TabletopChessSetup();
|
|
|
|
|
|
|
|
|
|
[DataField("size")]
|
|
|
|
|
public Vector2i Size { get; } = (300, 300);
|
|
|
|
|
|
|
|
|
|
[DataField("cameraZoom")]
|
|
|
|
|
public Vector2 CameraZoom { get; } = Vector2.One;
|
|
|
|
|
|
2021-09-19 11:07:35 +02:00
|
|
|
[ViewVariables]
|
|
|
|
|
public TabletopSession? Session { get; set; } = null;
|
2021-09-13 11:58:44 +02:00
|
|
|
}
|
|
|
|
|
}
|