Fix ore bag not picking up artifact fragments (#21195)
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Whitelist;
|
||||
|
||||
namespace Content.Server.Storage.Components;
|
||||
|
||||
@@ -21,16 +19,4 @@ public sealed partial class MagnetPickupComponent : Component
|
||||
|
||||
[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,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public sealed class MagnetPickupSystem : EntitySystem
|
||||
|
||||
foreach (var near in _lookup.GetEntitiesInRange(uid, comp.Range, LookupFlags.Dynamic | LookupFlags.Sundries))
|
||||
{
|
||||
if (comp.Whitelist?.IsValid(near, EntityManager) == false)
|
||||
if (storage.Whitelist?.IsValid(near, EntityManager) == false)
|
||||
continue;
|
||||
|
||||
if (!_physicsQuery.TryGetComponent(near, out var physics) || physics.BodyStatus != BodyStatus.OnGround)
|
||||
|
||||
Reference in New Issue
Block a user