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
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))
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;
}
}
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);
foreach (var objective in args.Mind.Objectives)
{
- if (_whitelistSystem.IsBlacklistPass(comp.Blacklist, objective))
+ if (_whitelistSystem.IsWhitelistPass(comp.Blacklist, objective))
{
args.Cancelled = true;
return;
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)
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);
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;
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;
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();
}
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)));
}
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
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))
// 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);
// Check the whitelist and blacklist
if (_whitelist.IsWhitelistFail(emote.Whitelist, source) ||
- _whitelist.IsBlacklistPass(emote.Blacklist, source))
+ _whitelist.IsWhitelistPass(emote.Blacklist, source))
{
return false;
}
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;
}
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;
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
}
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;
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))
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;
}
public bool IsInvalid(ChameleonProjectorComponent comp, EntityUid target)
{
return _whitelist.IsWhitelistFail(comp.Whitelist, target)
- || _whitelist.IsBlacklistPass(comp.Blacklist, target);
+ || _whitelist.IsWhitelistPass(comp.Blacklist, target);
}
/// <summary>
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);
}
if (ent == uid)
continue;
- if (_whitelistSystem.IsBlacklistPass(component.Blacklist, ent.Value))
+ if (_whitelistSystem.IsWhitelistPass(component.Blacklist, ent.Value))
{
return false;
}
// 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);
// 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)));
}
if (_whitelistSystem.IsWhitelistFail(storageComp.Whitelist, insertEnt) ||
- _whitelistSystem.IsBlacklistPass(storageComp.Blacklist, insertEnt))
+ _whitelistSystem.IsWhitelistPass(storageComp.Blacklist, insertEnt))
{
reason = "comp-storage-invalid-container";
return false;
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);
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)