mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* giant protoid cleanup * yml changes * ! --------- Co-authored-by: deltanedas <@deltanedas:goida.zip>
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using Content.Shared.DoAfter;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.VendingMachines.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedVendingMachineSystem))]
|
|
public sealed partial class VendingMachineRestockComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The time (in seconds) that it takes to restock a machine.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan RestockDelay = TimeSpan.FromSeconds(5.0f);
|
|
|
|
/// <summary>
|
|
/// What sort of machine inventory does this restock?
|
|
/// This is checked against the VendingMachineComponent's pack value.
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<ProtoId<VendingMachineInventoryPrototype>> CanRestock = [];
|
|
|
|
/// <summary>
|
|
/// Sound that plays when starting to restock a machine.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier SoundRestockStart = new SoundPathSpecifier("/Audio/Machines/vending_restock_start.ogg")
|
|
{
|
|
Params = new AudioParams
|
|
{
|
|
Volume = -2f,
|
|
Variation = 0.2f
|
|
}
|
|
};
|
|
|
|
/// <summary>
|
|
/// Sound that plays when finished restocking a machine.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier SoundRestockDone = new SoundPathSpecifier("/Audio/Machines/vending_restock_done.ogg",
|
|
AudioParams.Default.WithVolume(-2f).WithVariation(0.2f));
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed partial class RestockDoAfterEvent : SimpleDoAfterEvent;
|