37 lines
1016 B
C#
37 lines
1016 B
C#
using Content.Shared.Inventory;
|
|
using Content.Shared.Tag;
|
|
using Content.Shared.Whitelist;
|
|
|
|
namespace Content.Server.Storage.Components;
|
|
|
|
/// <summary>
|
|
/// Applies an ongoing pickup area around the attached entity.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed partial class MagnetPickupComponent : Component
|
|
{
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("nextScan")]
|
|
public TimeSpan NextScan = TimeSpan.Zero;
|
|
|
|
/// <summary>
|
|
/// What container slot the magnet needs to be in to work.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("slotFlags")]
|
|
public SlotFlags SlotFlags = SlotFlags.BELT;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("range")]
|
|
public float Range = 1f;
|
|
|
|
[ValidatePrototypeId<TagPrototype>]
|
|
private const string DefaultTag = "Ore";
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("whitelist")]
|
|
public EntityWhitelist? Whitelist = new()
|
|
{
|
|
Tags = new List<string>()
|
|
{
|
|
DefaultTag,
|
|
}
|
|
};
|
|
}
|