Files
wwdpublic/Content.Shared/Storage/Components/MagnetPickupComponent.cs
Ivan 86534e1c18 [Feature] Added Toggle to magnetPickupSystem / [FIX] Ore Processor Fix (#15)
* [NEW] Added toggle to magnetPickupSystem / [FIX] ore processor fix

* Ru locale / En localisation fix

* code change after review

* WHITE comments added

* ON sprites added by @kilath

* update test.

* fix

* update tests

* Changed ContainingSlot/SlotDef checks. Added ForcePickup.

* Component fixed

* microfix

* style: a bit of styling

---------

Co-authored-by: Remuchi <RemuchiOfficial@gmail.com>
2024-09-03 17:18:06 +07:00

27 lines
811 B
C#

using Content.Shared.Inventory;
using Robust.Shared.GameStates;
namespace Content.Server.Storage.Components;
/// <summary>
/// Applies an ongoing pickup area around the attached entity.
/// </summary>
[NetworkedComponent]
[RegisterComponent, AutoGenerateComponentPause, AutoGenerateComponentState]
public sealed partial class MagnetPickupComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField("nextScan")]
[AutoPausedField]
public TimeSpan NextScan = TimeSpan.Zero;
/// <summary>
/// If true, ignores SlotFlags and can magnet pickup on hands/ground.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField]
[AutoNetworkedField]
public bool ForcePickup = true;
[ViewVariables(VVAccess.ReadWrite), DataField("range")]
public float Range = 1f;
}