using Content.Shared.Random; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.RatKing; /// /// This is used for entities that can be /// rummaged through by the rat king to get loot. /// [RegisterComponent, NetworkedComponent, Access(typeof(SharedRatKingSystem))] [AutoGenerateComponentState] public sealed partial class RatKingRummageableComponent : Component { /// /// Whether or not this entity has been rummaged through already. /// [DataField("looted"), ViewVariables(VVAccess.ReadWrite)] [AutoNetworkedField] public bool Looted; /// /// DeltaV: Last time the object was looted, used to check if cooldown has expired /// [ViewVariables] public TimeSpan? LastLooted; /// /// DeltaV: Minimum time between rummage attempts /// [DataField("rummageCooldown"), ViewVariables(VVAccess.ReadWrite)] [AutoNetworkedField] public TimeSpan RummageCooldown = TimeSpan.FromMinutes(5); /// /// How long it takes to rummage through a rummageable container. /// [DataField("rummageDuration"), ViewVariables(VVAccess.ReadWrite)] [AutoNetworkedField] public float RummageDuration = 3f; /// /// A weighted random entity prototype containing the different loot that rummaging can provide. /// [DataField("rummageLoot", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)] [AutoNetworkedField] public string RummageLoot = "RatKingLoot"; /// /// Sound played on rummage completion. /// [DataField("sound")] public SoundSpecifier? Sound = new SoundCollectionSpecifier("storageRustle"); }