Files
tbd-station-14/Content.Server/Containers/EmptyOnMachineDeconstructComponent.cs
2022-02-16 18:23:23 +11:00

21 lines
612 B
C#

using System;
using System.Collections.Generic;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Containers
{
/// <summary>
/// Empties a list of containers when the machine is deconstructed via MachineDeconstructedEvent.
/// </summary>
[RegisterComponent]
public sealed class EmptyOnMachineDeconstructComponent : Component
{
[ViewVariables]
[DataField("containers")]
public HashSet<string> Containers { get; set; } = new();
}
}