using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Cooldown
{
///
/// Stores a visual "cooldown" for items, that gets displayed in the hands GUI.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState]
public sealed partial class ItemCooldownComponent : Component
{
// TODO: access and system setting and dirtying not this funny stuff
private TimeSpan? _cooldownEnd;
private TimeSpan? _cooldownStart;
///
/// The time when this cooldown ends.
///
///
/// If null, no cooldown is displayed.
///
[ViewVariables, AutoNetworkedField]
public TimeSpan? CooldownEnd
{
get => _cooldownEnd;
set
{
_cooldownEnd = value;
Dirty();
}
}
///
/// The time when this cooldown started.
///
///
/// If null, no cooldown is displayed.
///
[ViewVariables, AutoNetworkedField]
public TimeSpan? CooldownStart
{
get => _cooldownStart;
set
{
_cooldownStart = value;
Dirty();
}
}
}
}