using Content.Server.NPC.Components;
namespace Content.Server.NPC.Systems;
///
/// Prevents an NPC from attacking some entities from an enemy faction.
///
public sealed class FactionExceptionSystem : EntitySystem
{
///
/// Returns whether the entity from an enemy faction won't be attacked
///
public bool IsIgnored(FactionExceptionComponent comp, EntityUid target)
{
return comp.Ignored.Contains(target);
}
///
/// Prevents an entity from an enemy faction from being attacked
///
public void IgnoreEntity(FactionExceptionComponent comp, EntityUid target)
{
comp.Ignored.Add(target);
}
///
/// Prevents a list of entities from an enemy faction from being attacked
///
public void IgnoreEntities(FactionExceptionComponent comp, IEnumerable ignored)
{
comp.Ignored.UnionWith(ignored);
}
}