Class NpcFactionSystem
Outlines faction relationships with each other.
Inheritance
System.Object
NpcFactionSystem
Assembly: Content.Server.dll
Syntax
public sealed class NpcFactionSystem : EntitySystem
Methods
|
Improve this Doc
View Source
AddFaction(EntityUid, String, Boolean)
Adds this entity to the particular faction.
Declaration
public void AddFaction(EntityUid uid, string faction, bool dirty = true)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.String |
faction |
|
System.Boolean |
dirty |
|
|
Improve this Doc
View Source
AggroEntities(EntityUid, IEnumerable<EntityUid>, FactionExceptionComponent)
Makes a list of entities no longer be considered hostile, if it was.
Doesn't apply to regular faction hostilities.
Declaration
public void AggroEntities(EntityUid uid, IEnumerable<EntityUid> entities, FactionExceptionComponent comp = null)
Parameters
|
Improve this Doc
View Source
AggroEntity(EntityUid, EntityUid, FactionExceptionComponent)
Makes an entity always be considered hostile.
Declaration
public void AggroEntity(EntityUid uid, EntityUid target, FactionExceptionComponent comp = null)
Parameters
|
Improve this Doc
View Source
ClearFactions(EntityUid, Boolean)
Remove this entity from all factions.
Declaration
public void ClearFactions(EntityUid uid, bool dirty = true)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.Boolean |
dirty |
|
|
Improve this Doc
View Source
DeAggroEntity(EntityUid, EntityUid, FactionExceptionComponent)
Makes an entity no longer be considered hostile, if it was.
Doesn't apply to regular faction hostilities.
Declaration
public void DeAggroEntity(EntityUid uid, EntityUid target, FactionExceptionComponent comp = null)
Parameters
|
Improve this Doc
View Source
GetHostiles(EntityUid, FactionExceptionComponent)
Returns the specific hostile entities for a given entity.
Declaration
public IEnumerable<EntityUid> GetHostiles(EntityUid uid, FactionExceptionComponent comp = null)
Parameters
Returns
Type |
Description |
IEnumerable<EntityUid> |
|
|
Improve this Doc
View Source
GetNearbyFriendlies(EntityUid, Single, NpcFactionMemberComponent)
Declaration
public IEnumerable<EntityUid> GetNearbyFriendlies(EntityUid entity, float range, NpcFactionMemberComponent component = null)
Parameters
Returns
Type |
Description |
IEnumerable<EntityUid> |
|
|
Improve this Doc
View Source
GetNearbyHostiles(EntityUid, Single, NpcFactionMemberComponent)
Declaration
public IEnumerable<EntityUid> GetNearbyHostiles(EntityUid entity, float range, NpcFactionMemberComponent component = null)
Parameters
Returns
Type |
Description |
IEnumerable<EntityUid> |
|
|
Improve this Doc
View Source
IgnoreEntities(EntityUid, IEnumerable<EntityUid>, FactionExceptionComponent)
Prevents a list of entities from an enemy faction from being attacked
Declaration
public void IgnoreEntities(EntityUid uid, IEnumerable<EntityUid> ignored, FactionExceptionComponent comp = null)
Parameters
|
Improve this Doc
View Source
IgnoreEntity(EntityUid, EntityUid, FactionExceptionComponent)
Prevents an entity from an enemy faction from being attacked
Declaration
public void IgnoreEntity(EntityUid uid, EntityUid target, FactionExceptionComponent comp = null)
Parameters
|
Improve this Doc
View Source
Initialize()
Declaration
public override void Initialize()
|
Improve this Doc
View Source
InitializeException()
Declaration
public void InitializeException()
|
Improve this Doc
View Source
IsEntityFriendly(EntityUid, EntityUid, NpcFactionMemberComponent, NpcFactionMemberComponent)
Declaration
public bool IsEntityFriendly(EntityUid uidA, EntityUid uidB, NpcFactionMemberComponent factionA = null, NpcFactionMemberComponent factionB = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsFactionFriendly(String, EntityUid, NpcFactionMemberComponent)
Declaration
public bool IsFactionFriendly(string target, EntityUid with, NpcFactionMemberComponent factionWith = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsFactionFriendly(String, String)
Declaration
public bool IsFactionFriendly(string target, string with)
Parameters
Type |
Name |
Description |
System.String |
target |
|
System.String |
with |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsFactionHostile(String, EntityUid, NpcFactionMemberComponent)
Declaration
public bool IsFactionHostile(string target, EntityUid with, NpcFactionMemberComponent factionWith = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsFactionHostile(String, String)
Declaration
public bool IsFactionHostile(string target, string with)
Parameters
Type |
Name |
Description |
System.String |
target |
|
System.String |
with |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsFactionNeutral(String, String)
Declaration
public bool IsFactionNeutral(string target, string with)
Parameters
Type |
Name |
Description |
System.String |
target |
|
System.String |
with |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsIgnored(EntityUid, EntityUid, FactionExceptionComponent)
Returns whether the entity from an enemy faction won't be attacked
Declaration
public bool IsIgnored(EntityUid uid, EntityUid target, FactionExceptionComponent comp = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
MakeFriendly(String, String)
Makes the source faction friendly to the target faction, 1-way.
Declaration
public void MakeFriendly(string source, string target)
Parameters
Type |
Name |
Description |
System.String |
source |
|
System.String |
target |
|
|
Improve this Doc
View Source
MakeHostile(String, String)
Makes the source faction hostile to the target faction, 1-way.
Declaration
public void MakeHostile(string source, string target)
Parameters
Type |
Name |
Description |
System.String |
source |
|
System.String |
target |
|
|
Improve this Doc
View Source
RemoveFaction(EntityUid, String, Boolean)
Removes this entity from the particular faction.
Declaration
public void RemoveFaction(EntityUid uid, string faction, bool dirty = true)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.String |
faction |
|
System.Boolean |
dirty |
|
|
Improve this Doc
View Source
Shutdown()
Declaration
public override void Shutdown()