using Content.Shared.Whitelist; using Robust.Shared.Analyzers; using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared._DV.SmartFridge; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] public sealed partial class SmartFridgeComponent : Component { [DataField] public string Container = "smart_fridge_inventory"; [DataField] public EntityWhitelist? Whitelist; [DataField] public EntityWhitelist? Blacklist; [DataField] public SoundSpecifier? InsertSound = new SoundPathSpecifier("/Audio/Weapons/Guns/MagIn/revolver_magin.ogg"); [DataField, AutoNetworkedField] public List Entries = new(); [DataField, AutoNetworkedField] public Dictionary> ContainedEntries = new(); /// /// Sound that plays when ejecting an item /// [DataField] public SoundSpecifier SoundVend = new SoundPathSpecifier("/Audio/Machines/machine_vend.ogg") { Params = new AudioParams { Volume = -4f, Variation = 0.15f } }; /// /// Sound that plays when an item can't be ejected /// [DataField] public SoundSpecifier SoundDeny = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg"); // Frontier: extra fields /// /// The maximum number of entities that can be stored in the fridge /// [DataField] public int MaxContainedCount = 300; /// /// If true, insertion requires access /// [DataField] public bool CheckAccessOnInsert = true; // End Frontier } [Serializable, NetSerializable, DataRecord] public record struct SmartFridgeEntry { public string Name; public SmartFridgeEntry(string name) { Name = name; } } [Serializable, NetSerializable] public enum SmartFridgeUiKey { Key, } [Serializable, NetSerializable] public sealed class SmartFridgeDispenseItemMessage(SmartFridgeEntry entry) : BoundUserInterfaceMessage { public SmartFridgeEntry Entry = entry; }