]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove blacklist methods in EntityWhitelistSystem (#40932)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Mon, 24 Nov 2025 00:38:08 +0000 (01:38 +0100)
committerGitHub <noreply@github.com>
Mon, 24 Nov 2025 00:38:08 +0000 (00:38 +0000)
* replace blacklist methods

* VS is trolling me

29 files changed:
Content.Client/UserInterface/Systems/Emotes/EmotesUIController.cs
Content.Server/GameTicking/Rules/VariationPass/CutWireVariationPassSystem.cs
Content.Server/Mind/Filters/TargetObjectiveMindFilter.cs
Content.Server/Objectives/Systems/NinjaConditionsSystem.cs
Content.Server/Objectives/Systems/ObjectiveBlacklistRequirementSystem.cs
Content.Server/Power/EntitySystems/CableSystem.Placer.cs
Content.Server/Revenant/EntitySystems/RevenantSystem.Abilities.cs
Content.Server/Store/Conditions/BuyerWhitelistCondition.cs
Content.Server/Store/Conditions/StoreWhitelistCondition.cs
Content.Server/SurveillanceCamera/Systems/SurveillanceCameraMicrophoneSystem.cs
Content.Server/Teleportation/TeleportLocationsSystem.cs
Content.Server/Traits/TraitSystem.cs
Content.Shared/Actions/SharedActionsSystem.cs
Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
Content.Shared/Chat/SharedChatSystem.Emote.cs
Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
Content.Shared/Disposal/Unit/SharedDisposalUnitSystem.cs
Content.Shared/Implants/SharedImplanterSystem.cs
Content.Shared/Inventory/InventorySystem.Equip.cs
Content.Shared/Materials/SharedMaterialReclaimerSystem.cs
Content.Shared/Mind/Filters/ObjectiveMindFilter.cs
Content.Shared/Polymorph/Systems/SharedChameleonProjectorSystem.cs
Content.Shared/Sound/SharedEmitSoundSystem.cs
Content.Shared/StepTrigger/Systems/StepTriggerSystem.cs
Content.Shared/Sticky/Systems/StickySystem.cs
Content.Shared/Storage/EntitySystems/SecretStashSystem.cs
Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
Content.Shared/Stunnable/SharedStunSystem.cs
Content.Shared/Whitelist/EntityWhitelistSystem.cs

index fdcc3c45a2fdd2c6b9353fd09195a0244648be16..193db2a4864ff15c20401d53d44bb0c015945c7d 100644 (file)
@@ -147,7 +147,7 @@ public sealed class EmotesUIController : UIController, IOnStateChanged<GameplayS
             if (emote.Category == EmoteCategory.Invalid
                 || emote.ChatTriggers.Count == 0
                 || !(player.HasValue && whitelistSystem.IsWhitelistPassOrNull(emote.Whitelist, player.Value))
-                || whitelistSystem.IsBlacklistPass(emote.Blacklist, player.Value))
+                || whitelistSystem.IsWhitelistPass(emote.Blacklist, player.Value))
                 continue;
 
             if (!emote.Available
index 372de4bbb45d60891324639fc062972129bad418..c9712b65e20fcd608bae1b913398b9653bd7b69d 100644 (file)
@@ -25,7 +25,7 @@ public sealed class CutWireVariationPassSystem : VariationPassSystem<CutWireVari
                 continue;
 
             // Check against blacklist
-            if (_whitelistSystem.IsBlacklistPass(ent.Comp.Blacklist, uid))
+            if (_whitelistSystem.IsWhitelistPass(ent.Comp.Blacklist, uid))
                 continue;
 
             if (Random.Prob(ent.Comp.WireCutChance))
index dae8079ac1399dd44128db40e64d4b273a9825aa..6fc031d7c1322f7689f9738b23a5e3ab30f8adab 100644 (file)
@@ -33,7 +33,7 @@ public sealed partial class TargetObjectiveMindFilter : MindFilter
             if (entMan.TryGetComponent<TargetObjectiveComponent>(objective, out var kill) && kill.Target == mind.Owner)
             {
                 // remove the mind if this objective is blacklisted
-                if (whitelistSys.IsBlacklistPassOrNull(Blacklist, objective))
+                if (whitelistSys.IsWhitelistPassOrNull(Blacklist, objective))
                     return true;
             }
         }
index 4c19a64ab1070388aca67618646981428a79fffe..9004e245ee372ad5fa8170d396922be0c1a2ebd5 100644 (file)
@@ -59,7 +59,7 @@ public sealed class NinjaConditionsSystem : EntitySystem
 
         while (allEnts.MoveNext(out var warpUid, out var warp))
         {
-            if (_whitelist.IsBlacklistFail(bombingBlacklist, warpUid)
+            if (_whitelist.IsWhitelistFail(bombingBlacklist, warpUid)
                 && !string.IsNullOrWhiteSpace(warp.Location))
             {
                 warps.Add(warpUid);
index 0671c6b67e4949ab3bd6a9067f349537a5bcb34b..e92943a65e5c90fe11b354c4d7fd8d386e737f75 100644 (file)
@@ -25,7 +25,7 @@ public sealed class ObjectiveBlacklistRequirementSystem : EntitySystem
 
         foreach (var objective in args.Mind.Objectives)
         {
-            if (_whitelistSystem.IsBlacklistPass(comp.Blacklist, objective))
+            if (_whitelistSystem.IsWhitelistPass(comp.Blacklist, objective))
             {
                 args.Cancelled = true;
                 return;
index d6fe1a8f85ff6896375a2521c596db03e1a10be4..ffe2998c7445d2959afa4ff7ace9dc16b863a105 100644 (file)
@@ -42,7 +42,7 @@ public sealed partial class CableSystem
 
         foreach (var anchored in _map.GetAnchoredEntities((gridUid, grid), snapPos))
         {
-            if (_whitelistSystem.IsBlacklistPass(component.Blacklist, anchored))
+            if (_whitelistSystem.IsWhitelistPass(component.Blacklist, anchored))
                 return;
 
             if (TryComp<CableComponent>(anchored, out var wire) && wire.CableType == component.BlockingCableType)
index 8089cba61b15f47f678be1a69a4f965f9096f810..82e6f026e63caf1106f9177a121da3f4f9ca11e5 100644 (file)
@@ -344,7 +344,7 @@ public sealed partial class RevenantSystem
         foreach (var ent in _lookup.GetEntitiesInRange(uid, component.MalfunctionRadius))
         {
             if (_whitelistSystem.IsWhitelistFail(component.MalfunctionWhitelist, ent) ||
-                _whitelistSystem.IsBlacklistPass(component.MalfunctionBlacklist, ent))
+                _whitelistSystem.IsWhitelistPass(component.MalfunctionBlacklist, ent))
                 continue;
 
             _emagSystem.TryEmagEffect(uid, uid, ent);
index ff4a9a19cdd2a63b5d71a8125911e3a205300994..28b2787840967a62f8695f9f70fd34b5231a9e25 100644 (file)
@@ -26,7 +26,7 @@ public sealed partial class BuyerWhitelistCondition : ListingCondition
         var whitelistSystem = ent.System<EntityWhitelistSystem>();
 
         if (whitelistSystem.IsWhitelistFail(Whitelist, args.Buyer) ||
-            whitelistSystem.IsBlacklistPass(Blacklist, args.Buyer))
+            whitelistSystem.IsWhitelistPass(Blacklist, args.Buyer))
             return false;
 
         return true;
index ced4dfa9c0b460384a50d52ce5bdebcb1541ca1b..e27d79af756af22828f5c152cbd40016c6357bd2 100644 (file)
@@ -29,7 +29,7 @@ public sealed partial class StoreWhitelistCondition : ListingCondition
         var whitelistSystem = ent.System<EntityWhitelistSystem>();
 
         if (whitelistSystem.IsWhitelistFail(Whitelist, args.StoreEntity.Value) ||
-            whitelistSystem.IsBlacklistPass(Blacklist, args.StoreEntity.Value))
+            whitelistSystem.IsWhitelistPass(Blacklist, args.StoreEntity.Value))
             return false;
 
         return true;
index 1f298f32a44372cdcde4ff653e7afbaa09a3d73d..e8c53de9ebf36ddefdcf3fc7fc4781f9bc28d949 100644 (file)
@@ -62,7 +62,7 @@ public sealed class SurveillanceCameraMicrophoneSystem : EntitySystem
     public void CanListen(EntityUid uid, SurveillanceCameraMicrophoneComponent microphone, ListenAttemptEvent args)
     {
         // TODO maybe just make this a part of ActiveListenerComponent?
-        if (_whitelistSystem.IsBlacklistPass(microphone.Blacklist, args.Source))
+        if (_whitelistSystem.IsWhitelistPass(microphone.Blacklist, args.Source))
             args.Cancel();
     }
 
index edda0859ee1b04e28fa8d16f96b7eb03656a0818..4409b141116a7b8b645fb1caf84d441e2342add5 100644 (file)
@@ -61,7 +61,7 @@ public sealed partial class TeleportLocationsSystem : SharedTeleportLocationsSys
 
         while (allEnts.MoveNext(out var warpEnt, out var warpPointComp))
         {
-            if (_whitelist.IsBlacklistPass(warpPointComp.Blacklist, warpEnt) || string.IsNullOrWhiteSpace(warpPointComp.Location))
+            if (_whitelist.IsWhitelistPass(warpPointComp.Blacklist, warpEnt) || string.IsNullOrWhiteSpace(warpPointComp.Location))
                 continue;
 
             ent.Comp.AvailableWarps.Add(new TeleportPoint(warpPointComp.Location, GetNetEntity(warpEnt)));
index d6035f887b15c356aec0b0653d6fc8b7bb26520b..9a634f8942627952adcf1f4e02e5ab9fd7270d1a 100644 (file)
@@ -41,7 +41,7 @@ public sealed class TraitSystem : EntitySystem
             }
 
             if (_whitelistSystem.IsWhitelistFail(traitPrototype.Whitelist, args.Mob) ||
-                _whitelistSystem.IsBlacklistPass(traitPrototype.Blacklist, args.Mob))
+                _whitelistSystem.IsWhitelistPass(traitPrototype.Blacklist, args.Mob))
                 continue;
 
             // Add all components required by the prototype
index a2a17825530c9eb0e185f5f6c6225fcadcc7a9de..642d942fb6d6ecf6f7dee1d65b021876f3c52d44 100644 (file)
@@ -426,7 +426,7 @@ public abstract partial class SharedActionsSystem : EntitySystem
         if (_whitelist.IsWhitelistFail(comp.Whitelist, target))
             return false;
 
-        if (_whitelist.IsBlacklistPass(comp.Blacklist, target))
+        if (_whitelist.IsWhitelistPass(comp.Blacklist, target))
             return false;
 
         if (_actionQuery.Comp(uid).CheckCanInteract && !_actionBlocker.CanInteract(user, target))
index 75680089fbf2731edd58f269dee3556218ab4887..0c4d7a0988d5800ad14b9e1fc1507597b81e5a23 100644 (file)
@@ -235,7 +235,7 @@ public abstract partial class SharedBuckleSystem
 
         // Does it pass the Whitelist
         if (_whitelistSystem.IsWhitelistFail(strapComp.Whitelist, buckleUid) ||
-            _whitelistSystem.IsBlacklistPass(strapComp.Blacklist, buckleUid))
+            _whitelistSystem.IsWhitelistPass(strapComp.Blacklist, buckleUid))
         {
             if (popup)
                 _popup.PopupClient(Loc.GetString("buckle-component-cannot-fit-message"), user, PopupType.Medium);
index d92a02a9de2b05b1e528aa16becb7fe5e315cbfc..c7b47a43213f1361c60182ce393e2043b69c92d4 100644 (file)
@@ -193,7 +193,7 @@ public abstract partial class SharedChatSystem
 
         // Check the whitelist and blacklist
         if (_whitelist.IsWhitelistFail(emote.Whitelist, source) ||
-            _whitelist.IsBlacklistPass(emote.Blacklist, source))
+            _whitelist.IsWhitelistPass(emote.Blacklist, source))
         {
             return false;
         }
index 718d2a05248ac61336f70b71a4d7a72509dd6e85..73caec52e88d9c15d0781f51e4a7ef9c539bd4ab 100644 (file)
@@ -339,7 +339,7 @@ namespace Content.Shared.Containers.ItemSlots
         private bool CanInsertWhitelist(EntityUid usedUid, ItemSlot slot)
         {
             if (_whitelistSystem.IsWhitelistFail(slot.Whitelist, usedUid)
-                || _whitelistSystem.IsBlacklistPass(slot.Blacklist, usedUid))
+                || _whitelistSystem.IsWhitelistPass(slot.Blacklist, usedUid))
                 return false;
             return true;
         }
index 292cfd2b3cbd3121da42a9083111f373e989938c..d4031b7d00ffebe9bb61352e4cad36421915cbec 100644 (file)
@@ -453,7 +453,7 @@ public abstract class SharedDisposalUnitSystem : EntitySystem
         if (!storable && !HasComp<MobStateComponent>(entity))
             return false;
 
-        if (_whitelistSystem.IsBlacklistPass(component.Blacklist, entity) ||
+        if (_whitelistSystem.IsWhitelistPass(component.Blacklist, entity) ||
             _whitelistSystem.IsWhitelistFail(component.Whitelist, entity))
             return false;
 
index 6431b3d42e106672e6dd92783d25655eadee09f0..82cc4924fb1b7d60897f766673d07d949aefb40d 100644 (file)
@@ -177,7 +177,7 @@ public abstract class SharedImplanterSystem : EntitySystem
     protected bool CheckTarget(EntityUid target, EntityWhitelist? whitelist, EntityWhitelist? blacklist)
     {
         return _whitelistSystem.IsWhitelistPassOrNull(whitelist, target) &&
-            _whitelistSystem.IsBlacklistFailOrNull(blacklist, target);
+            _whitelistSystem.IsWhitelistFailOrNull(blacklist, target);
     }
 
     //Draw the implant out of the target
index cb5ef864b961bec456f2ba61154b2aee93c7b712..23f658b50d3e8a5b28ec525aad0dee219834f6fe 100644 (file)
@@ -275,7 +275,7 @@ public abstract partial class InventorySystem
         }
 
         if (_whitelistSystem.IsWhitelistFail(slotDefinition.Whitelist, itemUid) ||
-            _whitelistSystem.IsBlacklistPass(slotDefinition.Blacklist, itemUid))
+            _whitelistSystem.IsWhitelistPass(slotDefinition.Blacklist, itemUid))
         {
             reason = "inventory-component-can-equip-does-not-fit";
             return false;
index 8eb541ee5982714663481aac51cf6110475f29e3..7c2a3532fd49bc25320fd0697745cc19cc6f47dc 100644 (file)
@@ -99,7 +99,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
             return false;
 
         if (_whitelistSystem.IsWhitelistFail(component.Whitelist, item) ||
-            _whitelistSystem.IsBlacklistPass(component.Blacklist, item))
+            _whitelistSystem.IsWhitelistPass(component.Blacklist, item))
             return false;
 
         if (Container.TryGetContainingContainer((item, null, null), out _) && !Container.TryRemoveFromContainer(item))
index 2d3cf6a2632f025fc7a7bd5da399c72374d83616..5b64fc36c618987a06118cdc462a2623fb3fccaa 100644 (file)
@@ -16,7 +16,7 @@ public sealed partial class ObjectiveMindFilter : MindFilter
         foreach (var obj in mind.Comp.Objectives)
         {
             // mind has a blacklisted objective, remove it from the pool
-            if (whitelistSys.IsBlacklistPass(Blacklist, obj))
+            if (whitelistSys.IsWhitelistPass(Blacklist, obj))
                 return true;
         }
 
index 3fd9ed07bd7e7beafbf24f5d32421470b955f4aa..6c686ff55527c439e90105077977e5eff11f2bdf 100644 (file)
@@ -191,7 +191,7 @@ public abstract class SharedChameleonProjectorSystem : EntitySystem
     public bool IsInvalid(ChameleonProjectorComponent comp, EntityUid target)
     {
         return _whitelist.IsWhitelistFail(comp.Whitelist, target)
-            || _whitelist.IsBlacklistPass(comp.Blacklist, target);
+            || _whitelist.IsWhitelistPass(comp.Blacklist, target);
     }
 
     /// <summary>
index 0e758ba0f11f352281e5dd005463f2248be6d698..ed1837e3f40ee865bf1c44d00e0e2565cd8581ca 100644 (file)
@@ -59,7 +59,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem
 
     private void HandleEmitSoundOnUIOpen(EntityUid uid, EmitSoundOnUIOpenComponent component, AfterActivatableUIOpenEvent args)
     {
-        if (_whitelistSystem.IsBlacklistFail(component.Blacklist, args.User))
+        if (_whitelistSystem.IsWhitelistFail(component.Blacklist, args.User))
         {
             TryEmitSound(uid, component, args.User);
         }
index d1443e5da2cb322cd787e077a01d9a540b0718b1..f1d6a9c7dddfecaa2beac07886f7bdc2eb893c19 100644 (file)
@@ -69,7 +69,7 @@ public sealed class StepTriggerSystem : EntitySystem
                 if (ent == uid)
                     continue;
 
-                if (_whitelistSystem.IsBlacklistPass(component.Blacklist, ent.Value))
+                if (_whitelistSystem.IsWhitelistPass(component.Blacklist, ent.Value))
                 {
                     return false;
                 }
index ea768fea93585d5bb07ba65380de699bf1c2bc88..bc04c81f55f2d29805eeb2d79d8616ba4ce7c191 100644 (file)
@@ -68,7 +68,7 @@ public sealed class StickySystem : EntitySystem
 
         // check whitelist and blacklist
         if (_whitelist.IsWhitelistFail(comp.Whitelist, target) ||
-            _whitelist.IsBlacklistPass(comp.Blacklist, target))
+            _whitelist.IsWhitelistPass(comp.Blacklist, target))
             return false;
 
         var attemptEv = new AttemptEntityStickEvent(target, user);
index 273359e4d3609d406ae315edc0d52ae78e42da8c..5118c6ae0b2c8b3f5487bae5df60a75188257c35 100644 (file)
@@ -107,7 +107,7 @@ public sealed class SecretStashSystem : EntitySystem
 
         // check if item is too big to fit into secret stash or is in the blacklist
         if (_item.GetSizePrototype(itemComp.Size) > _item.GetSizePrototype(entity.Comp.MaxItemSize) ||
-            _whitelistSystem.IsBlacklistPass(entity.Comp.Blacklist, itemToHideUid))
+            _whitelistSystem.IsWhitelistPass(entity.Comp.Blacklist, itemToHideUid))
         {
             var msg = Loc.GetString("comp-secret-stash-action-hide-item-too-big",
                 ("item", itemToHideUid), ("stashname", GetStashName(entity)));
index cda5eb5263ca2789be08767946dc055f6178179d..6ede24e8b7ea1a7bcca79018d6abdab1a99a1e04 100644 (file)
@@ -1058,7 +1058,7 @@ public abstract class SharedStorageSystem : EntitySystem
         }
 
         if (_whitelistSystem.IsWhitelistFail(storageComp.Whitelist, insertEnt) ||
-            _whitelistSystem.IsBlacklistPass(storageComp.Blacklist, insertEnt))
+            _whitelistSystem.IsWhitelistPass(storageComp.Blacklist, insertEnt))
         {
             reason = "comp-storage-invalid-container";
             return false;
index 8bb5949c23098adf2c7a9ba4fc85c5e1e65b9097..60d42ede62b87114471f80efbe57d8afcfc26549 100644 (file)
@@ -119,7 +119,7 @@ public abstract partial class SharedStunSystem : EntitySystem
         if (args.OurFixtureId != ent.Comp.FixtureId)
             return;
 
-        if (_entityWhitelist.IsBlacklistPass(ent.Comp.Blacklist, args.OtherEntity))
+        if (_entityWhitelist.IsWhitelistPass(ent.Comp.Blacklist, args.OtherEntity))
             return;
 
         TryUpdateStunDuration(args.OtherEntity, ent.Comp.Duration);
index b29adb8e35ad5fded8ed554a16fe018891e24ba5..bb4abe319788a7238162ffda728b7e9f084ff7f8 100644 (file)
@@ -125,42 +125,6 @@ public sealed class EntityWhitelistSystem : EntitySystem
         return !IsValid(whitelist, uid);
     }
 
-    /// <summary>
-    /// Helper function to determine if Blacklist is not null and entity is on list
-    /// Duplicate of equivalent Whitelist function
-    /// </summary>
-    public bool IsBlacklistPass(EntityWhitelist? blacklist, EntityUid uid)
-    {
-        return IsWhitelistPass(blacklist, uid);
-    }
-
-    /// <summary>
-    /// Helper function to determine if Blacklist is not null and entity is not on the list
-    /// Duplicate of equivalent Whitelist function
-    /// </summary>
-    public bool IsBlacklistFail(EntityWhitelist? blacklist, EntityUid uid)
-    {
-        return IsWhitelistFail(blacklist, uid);
-    }
-
-    /// <summary>
-    /// Helper function to determine if Blacklist is either null or the entity is on the list
-    /// Duplicate of equivalent Whitelist function
-    /// </summary>
-    public bool IsBlacklistPassOrNull(EntityWhitelist? blacklist, EntityUid uid)
-    {
-        return IsWhitelistPassOrNull(blacklist, uid);
-    }
-
-    /// <summary>
-    /// Helper function to determine if Blacklist is either null or the entity is not on the list
-    /// Duplicate of equivalent Whitelist function
-    /// </summary>
-    public bool IsBlacklistFailOrNull(EntityWhitelist? blacklist, EntityUid uid)
-    {
-        return IsWhitelistFailOrNull(blacklist, uid);
-    }
-
     private List<ComponentRegistration>? StringsToRegs(string[]? input)
     {
         if (input == null || input.Length == 0)