* Predicted dice rolls * Removed server-side dice system, make Shared no longer abstract, move visual code to client-side system * cleanup --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Dice;
|
|
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedDiceSystem))]
|
|
[AutoGenerateComponentState(true)]
|
|
public sealed partial class DiceComponent : Component
|
|
{
|
|
[DataField]
|
|
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]
|
|
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]
|
|
public int Offset { get; private set; } = 0;
|
|
|
|
[DataField]
|
|
public int Sides { get; private set; } = 20;
|
|
|
|
/// <summary>
|
|
/// The currently displayed value.
|
|
/// </summary>
|
|
[DataField]
|
|
[AutoNetworkedField]
|
|
public int CurrentValue { get; set; } = 20;
|
|
|
|
}
|