diff --git a/Content.Shared/Dice/DiceComponent.cs b/Content.Shared/Dice/DiceComponent.cs index 357a9714dd..53b640effb 100644 --- a/Content.Shared/Dice/DiceComponent.cs +++ b/Content.Shared/Dice/DiceComponent.cs @@ -35,10 +35,10 @@ public sealed class DiceComponent : Component [Serializable, NetSerializable] public sealed class DiceState : ComponentState { - public int CurrentSide { get; set; } = 20; - public DiceState(int side) + public readonly int CurrentValue; + public DiceState(int value) { - CurrentSide = side; + CurrentValue = value; } } } diff --git a/Content.Shared/Dice/SharedDiceSystem.cs b/Content.Shared/Dice/SharedDiceSystem.cs index 611fcfa8cf..7572ad7391 100644 --- a/Content.Shared/Dice/SharedDiceSystem.cs +++ b/Content.Shared/Dice/SharedDiceSystem.cs @@ -21,7 +21,7 @@ public abstract class SharedDiceSystem : EntitySystem private void OnHandleState(EntityUid uid, DiceComponent component, ref ComponentHandleState args) { if (args.Current is DiceComponent.DiceState state) - component.CurrentValue = state.CurrentSide; + component.CurrentValue = state.CurrentValue; UpdateVisuals(uid, component); } diff --git a/Resources/Prototypes/Entities/Objects/Fun/dice.yml b/Resources/Prototypes/Entities/Objects/Fun/dice.yml index 4d6d9e7667..af1bc8847b 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/dice.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/dice.yml @@ -26,7 +26,7 @@ sides: 10 multiplier: 10 offset: 1 # first side is a 0 - currentValue: 1 + currentValue: 0 - type: Sprite state: percentile_0