Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignBuildingManagerComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_CampaignBuildingManagerComponentClass
 

Functions

SCR_CampaignBuildingManagerComponentClass SCR_BaseGameModeComponentClass Attribute ("", UIWidgets.ResourcePickerThumbnail, "Prefab of trigger spawned on server to activate a building mode when player enters its range.", "et")] protected ResourceName m_sFreeRoamBuildingServerTrigger
 
protected int m_iBuildingCycle SCR_CampaignBuildingCompositionOutlineManager GetOutlineManager ()
 
protected bool GetResourceComponent (IEntity owner, out SCR_ResourceComponent component)
 
ResourceName GetCompositionPreviewMaterial ()
 
ResourceName GetServerTriggerResourceName ()
 
ResourceName GetClientTriggerResourceName ()
 
void SetTemporaryProvider (IEntity ent)
 
IEntity GetTemporaryProvider ()
 
bool CanDisassembleSameFactionOnly ()
 
protected bool GetSupplyComponent (IEntity ownerEntity, out SCR_CampaignSuppliesComponent suppliesComponent)
 Get supply component of the provider entity. More...
 
void ProcesXPreward ()
 Check if the number of cycles reaches a defined limit. If so, restart counter and send an RPC on server to add XP reward. More...
 
int GetCompositionRefundPercentage ()
 
protected void OnEntityCoreBudgetUpdated (EEditableEntityBudget entityBudget, int originalBudgetValue, int budgetChange, int updatedBudgetValue, SCR_EditableEntityComponent entity)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added. More...
 
protected bool IsProxy ()
 
void GetPrefabListFromConfig ()
 Load all the available compositions at the beginning of the game to be accessible without the building mode entity. More...
 
ResourceName GetCompositionResourceName (int prefabID)
 
int GetCompositionId (ResourceName resName)
 
void GetEditorMode (int playerID, notnull IEntity provider, bool userActionActivationOnly=false, bool userActionUsed=false)
 
protected void SetEditorMode (notnull SCR_EditorManagerEntity editorManager, notnull SCR_EditorModeEntity modeEntity, int playerID, notnull IEntity provider, bool userActionActivationOnly=false, bool userActionUsed=false)
 
void PlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 
void EntitySpawnedByProvider (int prefabID, SCR_EditableEntityComponent editableEntity, int playerId)
 Event triggered when the entity is spawned by this provider. More...
 
protected void SetOnPlayerDeathEvent (int playerID)
 
protected void RemoveOnPlayerDeathEvent (int playerID)
 
protected void SetOnProviderDestroyedEvent (IEntity provider)
 
protected void RemoveOnProviderDestroyedEvent (IEntity provider)
 
protected void OnPlayerDeath (SCR_CharacterControllerComponent characterController, IEntity instigatorEntity, notnull Instigator killer)
 
protected void OnProviderDestroyed (SCR_HitZone hitZone)
 
bool RemovePlayerIdFromProvider (int playerID, SCR_CampaignBuildingProviderComponent providerComponent)
 
void RemoveProvider (int playerID, SCR_CampaignBuildingProviderComponent providerComponent, bool isActiveUser)
 
protected void ToggleEditorMode (notnull SCR_EditorManagerEntity editorManager)
 
protected void RemoveEditorMode (int playerID)
 
protected SCR_EditorManagerEntity GetEditorManagerEntity (int playerID)
 

Variables

protected ResourceName m_sFreeRoamBuildingClientTrigger
 
protected ResourceName m_sPreviewMaterial
 
protected EEditableEntityBudget m_BudgetType
 
protected int m_iCompositionRefundPercentage
 
protected int m_iXpRewardTreshold
 
protected bool m_bSameFactionDisassembleOnly
 Note: Provider is saved to composition only when it's built from base. More...
 
protected ref SCR_CampaignBuildingCompositionOutlineManager m_OutlineManager
 
protected ResourceName m_sPrefabsToBuildResource
 
protected ref array< ResourceName > m_aPlaceablePrefabs = {}
 
protected SCR_EditableEntityCore m_EntityCore
 
protected IEntity m_TemporaryProvider
 
protected RplComponent m_RplComponent
 

Function Documentation

◆ Attribute()

SCR_CampaignBuildingManagerComponentClass SCR_BaseGameModeComponentClass Attribute ( ""  ,
UIWidgets.  ResourcePickerThumbnail,
"Prefab of trigger spawned on server to activate a building mode when player enters its range."  ,
"et"   
)

Interface for game mode extending components. Must be attached to a GameMode entity.

◆ CanDisassembleSameFactionOnly()

bool CanDisassembleSameFactionOnly ( )
Returns

Definition at line 117 of file SCR_CampaignBuildingManagerComponent.c.

◆ EntitySpawnedByProvider()

void EntitySpawnedByProvider ( int  prefabID,
SCR_EditableEntityComponent  editableEntity,
int  playerId 
)

Event triggered when the entity is spawned by this provider.

Definition at line 392 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetClientTriggerResourceName()

ResourceName GetClientTriggerResourceName ( )
Returns

Definition at line 95 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetCompositionId()

int GetCompositionId ( ResourceName  resName)

Returns composition id based on provided resource name.

Parameters
[in]resName
Returns

Definition at line 314 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetCompositionPreviewMaterial()

ResourceName GetCompositionPreviewMaterial ( )
Returns

Definition at line 81 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetCompositionRefundPercentage()

int GetCompositionRefundPercentage ( )

Get supplies from the composition cost that gets refunded on removal of composition

Returns
Percentage of supplies refunded

Definition at line 172 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetCompositionResourceName()

ResourceName GetCompositionResourceName ( int  prefabID)

Search for a resource name of composition by given ID.

Parameters
[in]prefabID
Returns

Definition at line 301 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetEditorManagerEntity()

protected SCR_EditorManagerEntity GetEditorManagerEntity ( int  playerID)

Definition at line 602 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetEditorMode()

void GetEditorMode ( int  playerID,
notnull IEntity  provider,
bool  userActionActivationOnly = false,
bool  userActionUsed = false 
)
Parameters
[in]playerID
[in]provider
[in]userActionActivationOnly
[in]userActionUsed

Definition at line 324 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetOutlineManager()

protected int m_iBuildingCycle SCR_CampaignBuildingCompositionOutlineManager GetOutlineManager ( )
Returns

Definition at line 47 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetPrefabListFromConfig()

void GetPrefabListFromConfig ( )

Load all the available compositions at the beginning of the game to be accessible without the building mode entity.

Definition at line 284 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetResourceComponent()

protected bool GetResourceComponent ( IEntity  owner,
out SCR_ResourceComponent  component 
)

Definition at line 53 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetServerTriggerResourceName()

ResourceName GetServerTriggerResourceName ( )
Returns

Definition at line 88 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetSupplyComponent()

protected bool GetSupplyComponent ( IEntity  ownerEntity,
out SCR_CampaignSuppliesComponent  suppliesComponent 
)

Get supply component of the provider entity.

Definition at line 125 of file SCR_CampaignBuildingManagerComponent.c.

◆ GetTemporaryProvider()

IEntity GetTemporaryProvider ( )
Returns

Definition at line 109 of file SCR_CampaignBuildingManagerComponent.c.

◆ IsProxy()

protected bool IsProxy ( )

Definition at line 277 of file SCR_CampaignBuildingManagerComponent.c.

◆ OnEntityCoreBudgetUpdated()

protected void OnEntityCoreBudgetUpdated ( EEditableEntityBudget  entityBudget,
int  originalBudgetValue,
int  budgetChange,
int  updatedBudgetValue,
SCR_EditableEntityComponent  entity 
)

Definition at line 178 of file SCR_CampaignBuildingManagerComponent.c.

◆ OnPlayerDeath()

protected void OnPlayerDeath ( SCR_CharacterControllerComponent  characterController,
IEntity  instigatorEntity,
notnull Instigator  killer 
)

Definition at line 474 of file SCR_CampaignBuildingManagerComponent.c.

◆ OnProviderDestroyed()

protected void OnProviderDestroyed ( SCR_HitZone  hitZone)

Method called when the provider was destroyed.

Parameters
[in]hitZone

Definition at line 494 of file SCR_CampaignBuildingManagerComponent.c.

◆ PlayerDisconnected()

void PlayerDisconnected ( int  playerId,
KickCauseCode  cause,
int  timeout 
)

Event raised when the player disconnects

Parameters
[in]playerId
[in]cause
[in]timeout

Definition at line 381 of file SCR_CampaignBuildingManagerComponent.c.

◆ ProcesXPreward()

void ProcesXPreward ( )

Check if the number of cycles reaches a defined limit. If so, restart counter and send an RPC on server to add XP reward.

Definition at line 150 of file SCR_CampaignBuildingManagerComponent.c.

◆ RemoveEditorMode()

protected void RemoveEditorMode ( int  playerID)

Definition at line 588 of file SCR_CampaignBuildingManagerComponent.c.

◆ RemoveOnPlayerDeathEvent()

protected void RemoveOnPlayerDeathEvent ( int  playerID)

Definition at line 436 of file SCR_CampaignBuildingManagerComponent.c.

◆ RemoveOnProviderDestroyedEvent()

protected void RemoveOnProviderDestroyedEvent ( IEntity  provider)

Definition at line 462 of file SCR_CampaignBuildingManagerComponent.c.

◆ RemovePlayerIdFromProvider()

bool RemovePlayerIdFromProvider ( int  playerID,
SCR_CampaignBuildingProviderComponent  providerComponent 
)

Remove the provided player id from list of active and available users, return true if the user was in the list of active users

Parameters
[in]playerID
[in]providerComponent
Returns

Definition at line 529 of file SCR_CampaignBuildingManagerComponent.c.

◆ RemoveProvider()

void RemoveProvider ( int  playerID,
SCR_CampaignBuildingProviderComponent  providerComponent,
bool  isActiveUser 
)
Parameters
[in]playerID
[in]providerComponent
[in]isActiveUser

Definition at line 544 of file SCR_CampaignBuildingManagerComponent.c.

◆ SetEditorMode()

protected void SetEditorMode ( notnull SCR_EditorManagerEntity  editorManager,
notnull SCR_EditorModeEntity  modeEntity,
int  playerID,
notnull IEntity  provider,
bool  userActionActivationOnly = false,
bool  userActionUsed = false 
)

Definition at line 341 of file SCR_CampaignBuildingManagerComponent.c.

◆ SetOnPlayerDeathEvent()

protected void SetOnPlayerDeathEvent ( int  playerID)

Definition at line 422 of file SCR_CampaignBuildingManagerComponent.c.

◆ SetOnProviderDestroyedEvent()

protected void SetOnProviderDestroyedEvent ( IEntity  provider)

Definition at line 450 of file SCR_CampaignBuildingManagerComponent.c.

◆ SetTemporaryProvider()

void SetTemporaryProvider ( IEntity  ent)
Parameters
[in]ent

Definition at line 102 of file SCR_CampaignBuildingManagerComponent.c.

◆ ToggleEditorMode()

protected void ToggleEditorMode ( notnull SCR_EditorManagerEntity  editorManager)

Definition at line 580 of file SCR_CampaignBuildingManagerComponent.c.

Variable Documentation

◆ m_aPlaceablePrefabs

protected ref array<ResourceName> m_aPlaceablePrefabs = {}

Definition at line 38 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_bSameFactionDisassembleOnly

protected bool m_bSameFactionDisassembleOnly

Note: Provider is saved to composition only when it's built from base.

Definition at line 30 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_BudgetType

protected EEditableEntityBudget m_BudgetType

Definition at line 20 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_EntityCore

protected SCR_EditableEntityCore m_EntityCore

Definition at line 40 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_iCompositionRefundPercentage

protected int m_iCompositionRefundPercentage

Definition at line 23 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_iXpRewardTreshold

protected int m_iXpRewardTreshold

Definition at line 26 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_OutlineManager

protected ref SCR_CampaignBuildingCompositionOutlineManager m_OutlineManager

Definition at line 33 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_RplComponent

protected RplComponent m_RplComponent

Definition at line 42 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_sFreeRoamBuildingClientTrigger

protected ResourceName m_sFreeRoamBuildingClientTrigger

Definition at line 14 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_sPrefabsToBuildResource

protected ResourceName m_sPrefabsToBuildResource

Definition at line 36 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_sPreviewMaterial

protected ResourceName m_sPreviewMaterial

Definition at line 17 of file SCR_CampaignBuildingManagerComponent.c.

◆ m_TemporaryProvider

protected IEntity m_TemporaryProvider

Definition at line 41 of file SCR_CampaignBuildingManagerComponent.c.