using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server._DV.GameTicking.Rules.Components;
///
/// Delays adding components to the antags of a gamerule until some time has passed.
///
///
/// This is used for the zombies gamemode so that new players don't hit the funny button immediately and ruin anyone else's plans.
///
[RegisterComponent, Access(typeof(DelayedRuleSystem))]
[AutoGenerateComponentPause]
public sealed partial class DelayedRuleComponent : Component
{
///
/// The players must wait this length of time before gets added.
/// If they are somehow found out and get gibbed/cremated/etc before this delay is up they will not turn.
///
[DataField(required: true)]
public TimeSpan Delay;
///
/// Whether to skip the delay if there is only 1 antag selected.
///
[DataField]
public bool IgnoreSolo;
///
/// When the will end.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan DelayEnds;
///
/// The components to add to each player's mob once the delay ends.
///
[DataField(required: true)]
public ComponentRegistry DelayedComponents = new();
///
/// Popup to show when the delay ends.
///
[DataField(required: true)]
public LocId EndedPopup;
}