]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix ore bag not picking up artifact fragments (#21195)
authorStray-Pyramid <Pharaohofnile@gmail.com>
Tue, 24 Oct 2023 06:20:46 +0000 (19:20 +1300)
committerGitHub <noreply@github.com>
Tue, 24 Oct 2023 06:20:46 +0000 (17:20 +1100)
Content.Shared/Storage/Components/MagnetPickupComponent.cs
Content.Shared/Storage/EntitySystems/MagnetPickupSystem.cs

index 300055a62a64db6dd05dc5fee058bca25fe21e9c..c57b7c4e85a3575bc8c0b76010d48bd269bb295d 100644 (file)
@@ -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,
-        }
-    };
 }
index 3bbc75732ec9012ec40e952b43caefe78132efab..16657bdae4af7b094e5da033fbd42c7847b97a46 100644 (file)
@@ -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)