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

Go to the source code of this file.

Classes

class  SCR_CampaignFactionCommanderHandlerComponentClass
 Handles voting and AI decisions for the faction Commander role in Conflict. Should be attached to gamemode entity. More...

Functions

SCR_CampaignFactionCommanderHandlerComponentClass SCR_FactionCommanderHandlerComponentClass Attribute ("100", desc:"How far from the Establish task will players still be able to build a new base.", params:"0 inf 1")
int GetBaseEstablishingRadius ()
int GetBaseMinDistance (notnull SCR_CampaignMilitaryBaseComponent base)
int GetBaseMinDistance (SCR_ECampaignBaseType baseType)
void OnBaseFactionChanged (SCR_MilitaryBaseComponent base, Faction faction)
void OnFactionTasksEnabledChanged (Faction faction)
void OnRadioCoverageChanged (notnull SCR_CoverageRadioComponent radio)
void OnCommanderChanged (SCR_Faction faction, int commanderPlayerId)
void CheckSeizeTasks (notnull SCR_CampaignFaction faction, int playerid)
void CreateSeizeTask (notnull SCR_CampaignFaction faction, SCR_CampaignMilitaryBaseComponent targetBase, int playerid)
SCR_Task GetTaskOnBase (notnull SCR_CampaignMilitaryBaseComponent campaignMilitaryBase, notnull Faction faction, typename taskClass)
void OnPlayerXPChanged (int playerId, int currentXP, int XPToAdd, SCR_EXPRewards rewardId)
void AwardCommanderTaskCompletionXP (int commanderId, SCR_EXPRewards rewardId, int XPToAdd)
override void OnPlayerRegistered (int playerId)
override void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
void OnServerCommanderChanged (int newCommanderId, int oldCommanderId)
override void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
void RegisterPlayerXPInvokers (int playerId, bool unregister=false)
override void EOnInit (IEntity owner)
void ~SCR_CampaignFactionCommanderHandlerComponent ()

Variables

Prefabs Tasks SeizeCampaignMilitaryBaseTaskEntity et

Function Documentation

◆ Attribute()

SCR_CampaignFactionCommanderHandlerComponentClass SCR_FactionCommanderHandlerComponentClass Attribute ( "100" ,
desc:"How far from the Establish task will players still be able to build a new base." ,
params:"0 inf 1"  )

◆ AwardCommanderTaskCompletionXP()

void AwardCommanderTaskCompletionXP ( int commanderId,
SCR_EXPRewards rewardId,
int XPToAdd )
protected

Awards a fraction of gained player XP to Commander The amount of XP added is determined by the original amount of XP multiplied by Commander Reward XP Amount Fraction

Parameters
[in]commanderplayer Id
[in]rewardId
[in]XPToAdd- the original amount of XP gained

Definition at line 280 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ CheckSeizeTasks()

void CheckSeizeTasks ( notnull SCR_CampaignFaction faction,
int playerid )
protected

◆ CreateSeizeTask()

void CreateSeizeTask ( notnull SCR_CampaignFaction faction,
SCR_CampaignMilitaryBaseComponent targetBase,
int playerid )
protected

Create seize task

Parameters
[in]faction
[in]targetBase

Definition at line 157 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ GetBaseEstablishingRadius()

int GetBaseEstablishingRadius ( )

◆ GetBaseMinDistance() [1/2]

int GetBaseMinDistance ( notnull SCR_CampaignMilitaryBaseComponent base)
Parameters
[in]base
Returns
min base distance

Definition at line 31 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ GetBaseMinDistance() [2/2]

int GetBaseMinDistance ( SCR_ECampaignBaseType baseType)
Parameters
[in]baseType
Returns
min base distance

Definition at line 39 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ GetTaskOnBase()

SCR_Task GetTaskOnBase ( notnull SCR_CampaignMilitaryBaseComponent campaignMilitaryBase,
notnull Faction faction,
typename taskClass  )
protected

◆ OnBaseFactionChanged()

void OnBaseFactionChanged ( SCR_MilitaryBaseComponent base,
Faction faction )
protected

◆ OnCommanderChanged()

void OnCommanderChanged ( SCR_Faction faction,
int commanderPlayerId )
protected

◆ OnFactionTasksEnabledChanged()

void OnFactionTasksEnabledChanged ( Faction faction)
protected

◆ OnPlayerDisconnected()

override void OnPlayerDisconnected ( int playerId,
KickCauseCode cause,
int timeout )
protected

Called after a player is disconnected.

Parameters
[in]playerIdPlayerId of disconnected player.
[in]causeReason player disconnected
[in]timeoutTimeout for when players are allowed to connect again. -1 means Ban without an assigned timeout

What happens when a player disconnects.

Parameters
[in]playerIDis a unique player identifier that defines which player has disconnected.
[in]cause
[in]timeout

Definition at line 306 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ OnPlayerKilled()

override void OnPlayerKilled ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Called after a player gets killed.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Definition at line 323 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ OnPlayerRegistered()

override void OnPlayerRegistered ( int playerId)
protected

Called on every machine after a player is registered (identity, name etc.). Always called after OnPlayerConnected.

Parameters
[in]playerIdPlayerId of registered player.

Definition at line 298 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ OnPlayerXPChanged()

void OnPlayerXPChanged ( int playerId,
int currentXP,
int XPToAdd,
SCR_EXPRewards rewardId )
protected

Player XP changed, award commander a fraction of gained XP if eligible for the reward

Parameters
[in]playerId
[in]currentXP
[in]XPToAdd
[in]rewardId

Definition at line 248 of file SCR_CampaignFactionCommanderHandlerComponent.c.

◆ OnRadioCoverageChanged()

void OnRadioCoverageChanged ( notnull SCR_CoverageRadioComponent radio)
protected

◆ OnServerCommanderChanged()

void OnServerCommanderChanged ( int newCommanderId,
int oldCommanderId )
protected

◆ RegisterPlayerXPInvokers()

void RegisterPlayerXPInvokers ( int playerId,
bool unregister = false )
protected

◆ ~SCR_CampaignFactionCommanderHandlerComponent()

void ~SCR_CampaignFactionCommanderHandlerComponent ( )
protected

Variable Documentation

◆ et

Prefabs Tasks SeizeCampaignMilitaryBaseTaskEntity et