using Robust.Shared.GameStates; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Delivery; /// /// Component given to deliveries. /// This delivery will "prime" based on circumstances defined in the datafield. /// When primed, it will attempt to explode every few seconds, with the chance increasing each time it fails to do so. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause] [Access(typeof(DeliveryModifierSystem))] public sealed partial class DeliveryBombComponent : Component { /// /// How often will this bomb retry to explode. /// [DataField] public TimeSpan ExplosionRetryDelay = TimeSpan.FromSeconds(3); /// /// The time at which the next retry will happen /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField] public TimeSpan NextExplosionRetry; /// /// The chance this bomb explodes each time it attempts to do so. /// [DataField, AutoNetworkedField] public float ExplosionChance = 0.05f; /// /// How much should the chance of explosion increase each failed retry? /// [DataField] public float ExplosionChanceRetryIncrease = 0.01f; /// /// Should this bomb get primed when the delivery is unlocked? /// [DataField] public bool PrimeOnUnlock = true; /// /// Should this bomb get primed when the delivery is broken? /// Requires to be fragile as well. /// [DataField] public bool PrimeOnBreakage = true; /// /// Should this bomb get primed when the delivery expires? /// Requires to be priority as well. /// [DataField] public bool PrimeOnExpire = true; /// /// Multiplier to choose when a crazy person actually opens it. /// Multiplicative, not additive. /// [DataField] public float SpesoMultiplier = 1.5f; }