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

@@ -5,26 +5,26 @@ using Robust.Shared.Serialization;
namespace Content.Shared.Dice;
[RegisterComponent, NetworkedComponent, Access(typeof(SharedDiceSystem))]
public sealed class DiceComponent : Component
public sealed partial class DiceComponent : Component
{
[DataField("sound")]
public SoundSpecifier Sound { get; } = new SoundCollectionSpecifier("Dice");
public SoundSpecifier Sound { get; private set; } = new SoundCollectionSpecifier("Dice");
/// <summary>
/// Multiplier for the value of a die. Applied after the <see cref="Offset"/>.
/// </summary>
[DataField("multiplier")]
public int Multiplier { get; } = 1;
public int Multiplier { get; private set; } = 1;
/// <summary>
/// Quantity that is subtracted from the value of a die. Can be used to make dice that start at "0". Applied
/// before the <see cref="Multiplier"/>
/// </summary>
[DataField("offset")]
public int Offset { get; } = 0;
public int Offset { get; private set; } = 0;
[DataField("sides")]
public int Sides { get; } = 20;
public int Sides { get; private set; } = 20;
/// <summary>
/// The currently displayed value.