From: Stray-Pyramid Date: Tue, 24 Oct 2023 06:20:46 +0000 (+1300) Subject: Fix ore bag not picking up artifact fragments (#21195) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4bb355ab76e96ea64560beba65060327f1c2654b;p=space-station-14.git Fix ore bag not picking up artifact fragments (#21195) --- diff --git a/Content.Shared/Storage/Components/MagnetPickupComponent.cs b/Content.Shared/Storage/Components/MagnetPickupComponent.cs index 300055a62a..c57b7c4e85 100644 --- a/Content.Shared/Storage/Components/MagnetPickupComponent.cs +++ b/Content.Shared/Storage/Components/MagnetPickupComponent.cs @@ -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] - private const string DefaultTag = "Ore"; - - [ViewVariables(VVAccess.ReadWrite), DataField("whitelist")] - public EntityWhitelist? Whitelist = new() - { - Tags = new List() - { - DefaultTag, - } - }; } diff --git a/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs b/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs index 3bbc75732e..16657bdae4 100644 --- a/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs +++ b/Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs @@ -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)