revenant emag whitelist (#21849)

* add MalfunctionWhitelist

* whitelist a few things

* locutus of borg

* support blacklist

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-11-27 21:39:29 +00:00
committed by GitHub
parent f09b5f3f62
commit ab645fb77b
3 changed files with 31 additions and 0 deletions

View File

@@ -321,6 +321,12 @@ public sealed partial class RevenantSystem
foreach (var ent in _lookup.GetEntitiesInRange(uid, component.MalfunctionRadius))
{
if (component.MalfunctionWhitelist?.IsValid(ent, EntityManager) == false)
continue;
if (component.MalfunctionBlacklist?.IsValid(ent, EntityManager) == true)
continue;
_emag.DoEmagEffect(uid, ent); //it does not emag itself. adorable.
}
}