Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CharacterFactionAffiliationComponent.c File Reference

Go to the source code of this file.

Classes

class  SCR_CharacterFactionAffiliationComponentClass

Functions

bool HasPerceivedFaction ()
SCR_ECharacterDisguiseType GetCharacterDisguiseType ()
Faction GetPerceivedFaction ()
int GetCharacterOutfitValues (out notnull map< Faction, int > outfitFactionValues)
int GetCharacterOutfitData (out notnull set< SCR_OutfitFactionDataHolder > outfitFactionData)
 paramp[out] Get Set of all outfit data. This data
void AddFactionOutfitValue (notnull Faction faction, int value, bool updateFaction=true)
void AddFactionOutfitValue (SCR_OutfitFactionDataHolder outfitFactionHolder, bool updateFaction=true)
void RemoveFactionOutfitValue (notnull Faction faction, int value, bool updateFaction=true)
void RemoveFactionOutfitValue (SCR_OutfitFactionDataHolder outfitFactionHolder, bool updateFaction=true)
void OnNoFactionSlottedItemChanged (bool addedToSlot, IEntity item, bool updateFaction=true)
void OnPerceivedFactionOutfitTypeChanged (SCR_EPerceivedFactionOutfitType newType)
void RecalculateOutfitFaction ()
 Recalculates the perceived faction. Called when the Pervceived faction type is changed and after init. Replicates the faction change if server.
void ChangeFactionOutfitValue (Faction faction, int value, bool updateFaction=true)
bool IsCharacterWearingFullOutfit ()
int CalculatePerceivedFactionIndex ()
void SetPerceivedFaction_S (int OutfitFaction)
void SetPerceivedFactionForAI (bool resetToNull=false)
void OnPerceivedFactionChangesAffectsAIChanged (bool affectsAI)
void OnPerceivedFactionChanged ()
ScriptInvokerFaction GetOnOnPerceivedFactionChanged ()
void OnFactionChanged (Faction previous, Faction current)
OnFactionChangedInvoker GetOnFactionChanged ()
void InitPlayerOutfitFaction_S ()
 Called by SCR_PerceivedFactionManagerComponent when player is spawned. Is not called for Non-Players.
void InitPlayerOutfitFaction ()
void DisableUpdatingPerceivedFaction_S ()
 Disables perceived faction from updating after the character is destroyed or dead.
void DisableUpdatingPerceivedFaction ()
void ~SCR_CharacterFactionAffiliationComponent ()

Variables

SCR_CharacterFactionAffiliationComponentClass m_PerceivedFaction
int m_iOutfitFactionIndex = -1
ref map< Faction, intm_mOutfitFactionValues = new map<Faction, int>()
ref set< SCR_OutfitFactionDataHolderm_CurrentOutfitData = new set<SCR_OutfitFactionDataHolder>()
ref ScriptInvokerFaction m_OnPerceivedFactionChanged
ref OnFactionChangedInvoker m_OnFactionChangedInvoker
SCR_PerceivedFactionManagerComponent m_PerceivedManager
SCR_ECharacterDisguiseType m_eDisguiseType = SCR_ECharacterDisguiseType.DEFAULT_FACTION
bool m_bHasPerceivedFaction
PerceivableComponent m_PerceivableComponent

Function Documentation

◆ AddFactionOutfitValue() [1/2]

void AddFactionOutfitValue ( notnull Faction faction,
int value,
bool updateFaction = true )
protected

Change a specific faction outfit value

Parameters
[in]factionFaction to change value of
[in]valueValue added
[in]updateFactionIf perceived faction should be recalculated and replicated

Definition at line 81 of file SCR_CharacterFactionAffiliationComponent.c.

◆ AddFactionOutfitValue() [2/2]

void AddFactionOutfitValue ( SCR_OutfitFactionDataHolder outfitFactionHolder,
bool updateFaction = true )
protected

Called by SCR_ItemOutfitFactionComponent when item was added to a slot

Parameters
[in]outfitFactionHolderOutfit data holder
[in]updateFactionIf perceived faction should be recalculated and replicated

Definition at line 93 of file SCR_CharacterFactionAffiliationComponent.c.

◆ CalculatePerceivedFactionIndex()

int CalculatePerceivedFactionIndex ( )
protected

Takes all outfit data and returns the faction index of the perceived faction depending on the Perceived faction type set in the manager. Can return -1 if Faction is unknown

Definition at line 323 of file SCR_CharacterFactionAffiliationComponent.c.

◆ ChangeFactionOutfitValue()

void ChangeFactionOutfitValue ( Faction faction,
int value,
bool updateFaction = true )
protected

Definition at line 259 of file SCR_CharacterFactionAffiliationComponent.c.

◆ DisableUpdatingPerceivedFaction()

void DisableUpdatingPerceivedFaction ( )
protected

Definition at line 654 of file SCR_CharacterFactionAffiliationComponent.c.

◆ DisableUpdatingPerceivedFaction_S()

void DisableUpdatingPerceivedFaction_S ( )
protected

Disables perceived faction from updating after the character is destroyed or dead.

Definition at line 643 of file SCR_CharacterFactionAffiliationComponent.c.

◆ GetCharacterDisguiseType()

SCR_ECharacterDisguiseType GetCharacterDisguiseType ( )
protected
Returns
What is the relationship between character faction and the perceived faction

Definition at line 39 of file SCR_CharacterFactionAffiliationComponent.c.

◆ GetCharacterOutfitData()

int GetCharacterOutfitData ( out notnull set< SCR_OutfitFactionDataHolder > outfitFactionData)
protected

paramp[out] Get Set of all outfit data. This data

Definition at line 69 of file SCR_CharacterFactionAffiliationComponent.c.

◆ GetCharacterOutfitValues()

int GetCharacterOutfitValues ( out notnull map< Faction, int > outfitFactionValues)
protected
Parameters
[out]Mapof Faction with the value each faction currently has
Returns
Count of entries in Map

Definition at line 60 of file SCR_CharacterFactionAffiliationComponent.c.

◆ GetOnFactionChanged()

OnFactionChangedInvoker GetOnFactionChanged ( )
protected
Returns
On Faction changed script invoker. Called when the character changes factions

Definition at line 585 of file SCR_CharacterFactionAffiliationComponent.c.

◆ GetOnOnPerceivedFactionChanged()

ScriptInvokerFaction GetOnOnPerceivedFactionChanged ( )
protected
Returns
On Perceived Faction changed script invoker. Called when players perceived faction changes

Definition at line 568 of file SCR_CharacterFactionAffiliationComponent.c.

◆ GetPerceivedFaction()

Faction GetPerceivedFaction ( )
protected
Returns
Get current perceived faction. If HasPerceivedFaction is false it will return default faction instead

Definition at line 49 of file SCR_CharacterFactionAffiliationComponent.c.

◆ HasPerceivedFaction()

bool HasPerceivedFaction ( )
protected
Returns
If This character's perceived faction is updated and replicated

Definition at line 32 of file SCR_CharacterFactionAffiliationComponent.c.

◆ InitPlayerOutfitFaction()

void InitPlayerOutfitFaction ( )
protected

Definition at line 609 of file SCR_CharacterFactionAffiliationComponent.c.

◆ InitPlayerOutfitFaction_S()

void InitPlayerOutfitFaction_S ( )
protected

Called by SCR_PerceivedFactionManagerComponent when player is spawned. Is not called for Non-Players.

Definition at line 595 of file SCR_CharacterFactionAffiliationComponent.c.

◆ IsCharacterWearingFullOutfit()

bool IsCharacterWearingFullOutfit ( )
protected
Returns
True if Character is wearing both a jacket and a pants

Definition at line 295 of file SCR_CharacterFactionAffiliationComponent.c.

◆ OnNoFactionSlottedItemChanged()

void OnNoFactionSlottedItemChanged ( bool addedToSlot,
IEntity item,
bool updateFaction = true )
protected

Called by SCR_CharacterInventoryStorageComponent when a slotted item is added/removed. If Perceived faction type is FULL_OUTFIT will check if both jacket and pants are still there

Parameters
[in]addedToSlotIf the item was added or removed
[in]itemItem added or removed
[in]updateFactionIf perceived faction should be recalculated and replicated

Definition at line 189 of file SCR_CharacterFactionAffiliationComponent.c.

◆ OnPerceivedFactionChanged()

void OnPerceivedFactionChanged ( )
protected

Definition at line 495 of file SCR_CharacterFactionAffiliationComponent.c.

◆ OnPerceivedFactionChangesAffectsAIChanged()

void OnPerceivedFactionChangesAffectsAIChanged ( bool affectsAI)
protected

Definition at line 489 of file SCR_CharacterFactionAffiliationComponent.c.

◆ OnPerceivedFactionOutfitTypeChanged()

void OnPerceivedFactionOutfitTypeChanged ( SCR_EPerceivedFactionOutfitType newType)
protected

Definition at line 199 of file SCR_CharacterFactionAffiliationComponent.c.

◆ RecalculateOutfitFaction()

void RecalculateOutfitFaction ( )
protected

Recalculates the perceived faction. Called when the Pervceived faction type is changed and after init. Replicates the faction change if server.

Definition at line 206 of file SCR_CharacterFactionAffiliationComponent.c.

◆ RemoveFactionOutfitValue() [1/2]

void RemoveFactionOutfitValue ( notnull Faction faction,
int value,
bool updateFaction = true )
protected

Change a specific faction outfit value

Parameters
[in]factionFaction to change value of
[in]valueValue removed
[in]updateFactionIf perceived faction should be recalculated and replicated

Definition at line 133 of file SCR_CharacterFactionAffiliationComponent.c.

◆ RemoveFactionOutfitValue() [2/2]

void RemoveFactionOutfitValue ( SCR_OutfitFactionDataHolder outfitFactionHolder,
bool updateFaction = true )
protected

Called by SCR_ItemOutfitFactionComponent when item was removed from slot

Parameters
[in]outfitFactionHolderOutfit data holder
[in]updateFactionIf perceived faction should be recalculated and replicated

Definition at line 145 of file SCR_CharacterFactionAffiliationComponent.c.

◆ SetPerceivedFaction_S()

void SetPerceivedFaction_S ( int OutfitFaction)
protected

Definition at line 433 of file SCR_CharacterFactionAffiliationComponent.c.

◆ SetPerceivedFactionForAI()

void SetPerceivedFactionForAI ( bool resetToNull = false)
protected

Definition at line 455 of file SCR_CharacterFactionAffiliationComponent.c.

◆ ~SCR_CharacterFactionAffiliationComponent()

void ~SCR_CharacterFactionAffiliationComponent ( )
protected

Definition at line 666 of file SCR_CharacterFactionAffiliationComponent.c.

Variable Documentation

◆ m_bHasPerceivedFaction

bool m_bHasPerceivedFaction
protected

Definition at line 26 of file SCR_CharacterFactionAffiliationComponent.c.

◆ m_CurrentOutfitData

ref set<SCR_OutfitFactionDataHolder> m_CurrentOutfitData = new set<SCR_OutfitFactionDataHolder>()
protected

Definition at line 15 of file SCR_CharacterFactionAffiliationComponent.c.

◆ m_eDisguiseType

◆ m_iOutfitFactionIndex

int m_iOutfitFactionIndex = -1
protected

Definition at line 11 of file SCR_CharacterFactionAffiliationComponent.c.

◆ m_mOutfitFactionValues

ref map<Faction, int> m_mOutfitFactionValues = new map<Faction, int>()
protected

Definition at line 13 of file SCR_CharacterFactionAffiliationComponent.c.

◆ m_OnFactionChangedInvoker

ref OnFactionChangedInvoker m_OnFactionChangedInvoker
protected

Definition at line 18 of file SCR_CharacterFactionAffiliationComponent.c.

◆ m_OnPerceivedFactionChanged

ref ScriptInvokerFaction m_OnPerceivedFactionChanged
protected

Definition at line 17 of file SCR_CharacterFactionAffiliationComponent.c.

◆ m_PerceivableComponent

PerceivableComponent m_PerceivableComponent
protected

Definition at line 28 of file SCR_CharacterFactionAffiliationComponent.c.

◆ m_PerceivedFaction

◆ m_PerceivedManager

SCR_PerceivedFactionManagerComponent m_PerceivedManager
protected

Definition at line 20 of file SCR_CharacterFactionAffiliationComponent.c.