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))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class TabletopGameComponent : Component
|
2021-09-13 11:58:44 +02:00
|
|
|
{
|
2023-07-17 17:03:18 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// The localized name of the board. Shown in the UI.
|
|
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
[DataField]
|
|
|
|
|
public LocId BoardName { get; private set; } = "tabletop-default-board-name";
|
2021-09-18 10:40:38 +02:00
|
|
|
|
2023-07-17 17:03:18 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// The type of method used to set up a tabletop.
|
|
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
[DataField(required: true)]
|
2023-08-22 18:14:33 -07:00
|
|
|
public TabletopSetup Setup { get; private set; } = new TabletopChessSetup();
|
2021-09-18 10:40:38 +02:00
|
|
|
|
2023-07-17 17:03:18 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// 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).
|
|
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
[DataField]
|
2023-08-22 18:14:33 -07:00
|
|
|
public Vector2i Size { get; private set; } = (300, 300);
|
2021-09-18 10:40:38 +02:00
|
|
|
|
2023-07-17 17:03:18 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// The zoom of the viewport camera.
|
|
|
|
|
/// </summary>
|
2023-10-10 20:06:24 -07:00
|
|
|
[DataField]
|
2023-08-22 18:14:33 -07:00
|
|
|
public Vector2 CameraZoom { get; private set; } = Vector2.One;
|
2021-09-18 10:40:38 +02:00
|
|
|
|
2023-07-17 17:03:18 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// The specific session of this tabletop.
|
|
|
|
|
/// </summary>
|
2021-09-19 11:07:35 +02:00
|
|
|
[ViewVariables]
|
|
|
|
|
public TabletopSession? Session { get; set; } = null;
|
2024-06-28 16:19:47 +07:00
|
|
|
|
|
|
|
|
// Skyedra Fix start
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many holograms have been spawned onto this board.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public int HologramsSpawned { get; set; } = 0;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many holograms are allowed to be spawned total by players.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public int MaximumHologramsAllowed { get; set; } = 10;
|
|
|
|
|
// Skyedra Fix end
|
2021-09-13 11:58:44 +02:00
|
|
|
}
|
|
|
|
|
}
|