2023-04-14 01:17:25 +00:00
|
|
|
using Content.Server.NPC.Systems;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.NPC.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Prevents an NPC from attacking ignored entities from enemy factions.
|
|
|
|
|
/// Can be added to if pettable, see PettableFriendComponent.
|
|
|
|
|
/// </summary>
|
2023-10-06 20:56:18 -04:00
|
|
|
[RegisterComponent, Access(typeof(NpcFactionSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class FactionExceptionComponent : Component
|
2023-04-14 01:17:25 +00:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2023-10-06 20:56:18 -04:00
|
|
|
/// Collection of entities that this NPC will refuse to attack
|
2023-04-14 01:17:25 +00:00
|
|
|
/// </summary>
|
|
|
|
|
[DataField("ignored")]
|
|
|
|
|
public HashSet<EntityUid> Ignored = new();
|
2023-10-06 20:56:18 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Collection of entities that this NPC will attack, regardless of faction.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("hostiles")]
|
|
|
|
|
public HashSet<EntityUid> Hostiles = new();
|
2023-04-14 01:17:25 +00:00
|
|
|
}
|