2024-03-18 07:23:25 +00:00
using Content.Shared.NPC.Systems ;
using Robust.Shared.GameStates ;
2023-04-14 01:17:25 +00:00
2024-03-18 07:23:25 +00:00
namespace Content.Shared.NPC.Components ;
2023-04-14 01:17:25 +00:00
/// <summary>
/// Prevents an NPC from attacking ignored entities from enemy factions.
/// Can be added to if pettable, see PettableFriendComponent.
/// </summary>
2024-07-02 23:23:12 +03:00
[RegisterComponent, NetworkedComponent, Access(typeof(NpcFactionSystem), typeof(SharedNPCImprintingOnSpawnBehaviourSystem))] // TO DO (Metalgearsloth): If we start adding a billion access overrides they should be going through a system as then there's no reason to have access, but I'll fix this when I rework npcs.
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>
2024-03-18 07:23:25 +00:00
[DataField]
2023-04-14 01:17:25 +00:00
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>
2024-03-18 07:23:25 +00:00
[DataField]
2023-10-06 20:56:18 -04:00
public HashSet < EntityUid > Hostiles = new ( ) ;
2023-04-14 01:17:25 +00:00
}