Refactor serialization copying to use source generators (#19412)

This commit is contained in:
DrSmugleaf
2023-08-22 18:14:33 -07:00
committed by GitHub
parent 08b43990ab
commit a88e747a0b
1737 changed files with 2532 additions and 2521 deletions

View File

@@ -7,31 +7,31 @@ namespace Content.Server.Tabletop.Components
/// A component that makes an object playable as a tabletop game.
/// </summary>
[RegisterComponent, Access(typeof(TabletopSystem))]
public sealed class TabletopGameComponent : Component
public sealed partial class TabletopGameComponent : Component
{
/// <summary>
/// The localized name of the board. Shown in the UI.
/// </summary>
[DataField("boardName")]
public string BoardName { get; } = "tabletop-default-board-name";
public string BoardName { get; private set; } = "tabletop-default-board-name";
/// <summary>
/// The type of method used to set up a tabletop.
/// </summary>
[DataField("setup", required: true)]
public TabletopSetup Setup { get; } = new TabletopChessSetup();
public TabletopSetup Setup { get; private set; } = new TabletopChessSetup();
/// <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>
[DataField("size")]
public Vector2i Size { get; } = (300, 300);
public Vector2i Size { get; private set; } = (300, 300);
/// <summary>
/// The zoom of the viewport camera.
/// </summary>
[DataField("cameraZoom")]
public Vector2 CameraZoom { get; } = Vector2.One;
public Vector2 CameraZoom { get; private set; } = Vector2.One;
/// <summary>
/// The specific session of this tabletop.