using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Dice;
[RegisterComponent, NetworkedComponent, Access(typeof(SharedDiceSystem))]
public sealed partial class DiceComponent : Component
{
[DataField("sound")]
public SoundSpecifier Sound { get; private set; } = new SoundCollectionSpecifier("Dice");
///
/// Multiplier for the value of a die. Applied after the .
///
[DataField("multiplier")]
public int Multiplier { get; private set; } = 1;
///
/// Quantity that is subtracted from the value of a die. Can be used to make dice that start at "0". Applied
/// before the
///
[DataField("offset")]
public int Offset { get; private set; } = 0;
[DataField("sides")]
public int Sides { get; private set; } = 20;
///
/// The currently displayed value.
///
[DataField("currentValue")]
public int CurrentValue { get; set; } = 20;
[Serializable, NetSerializable]
public sealed class DiceState : ComponentState
{
public readonly int CurrentValue;
public DiceState(int value)
{
CurrentValue = value;
}
}
}