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

Go to the source code of this file.

Data Structures

class  SCR_CampaignBuildingLayoutComponentClass
 

Functions

SCR_CampaignBuildingLayoutComponentClass ScriptComponentClass RplProp (onRplName:"SpawnPreviewIfBuildingModeOpened")
 
bool SetOnEditorOpenEvent ()
 
ScriptInvokerInt GetOnAddBuildingValueInt ()
 
ScriptInvokerVoid GetOnAddBuildingValueVoid ()
 
ScriptInvokerVoid GetOnCompositionIdSet ()
 
void OnEditorModeChanged (SCR_EditorModeEntity currentModeEntity, SCR_EditorModeEntity prevModeEntity)
 
bool IsLayoutInBuildingRange (notnull SCR_EditorModeEntity editorModeEntity)
 
bool HasBuildingPreview ()
 
void EvaluateBuildingStatus (int currentBuildValue)
 
int GetBuildingValue (int prefabID)
 
protected ResourceName GetCompositionResourceName (int prefabID)
 
protected SCR_CampaignBuildingManagerComponent GetBuildingManagerComponent ()
 
void SetPrefabId (int prefabId)
 
int GetPrefabId ()
 
void SpawnComposition ()
 Spawn the composition belonging to this layout. More...
 
void SpawnPreview ()
 Create a preview if it does not exist. More...
 
void SpawnPreviewIfBuildingModeOpened ()
 Spawn the composition preview if the building mode is active (open) More...
 
void DeletePreview ()
 
void AddBuildingValue (int value)
 
void SetBuildingValue (float newValue)
 
int GetToBuildValue ()
 
float GetCurrentBuildValue ()
 
SCR_EditorModeEntity GetBuildingModeEntity ()
 
void LockCompositionInteraction ()
 
protected void SnapEntityToTerrain (IEntity entity)
 
override void OnChildAdded (IEntity parent, IEntity child)
 
void ~SCR_CampaignBuildingLayoutComponent ()
 

Function Documentation

◆ AddBuildingValue()

void AddBuildingValue ( int  value)
Parameters
[in]value

Definition at line 330 of file SCR_CampaignBuildingLayoutComponent.c.

◆ DeletePreview()

void DeletePreview ( )

Definition at line 307 of file SCR_CampaignBuildingLayoutComponent.c.

◆ EvaluateBuildingStatus()

void EvaluateBuildingStatus ( int  currentBuildValue)
Parameters
[in]currentBuildValue

Definition at line 127 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetBuildingManagerComponent()

protected SCR_CampaignBuildingManagerComponent GetBuildingManagerComponent ( )

Definition at line 180 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetBuildingModeEntity()

SCR_EditorModeEntity GetBuildingModeEntity ( )

Search for an editor mode entity (exists only when the player is in editor mode)

Returns

Definition at line 378 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetBuildingValue()

int GetBuildingValue ( int  prefabID)

Get the building value that defines how long it takes to build a composition (based on the tool, number of people building it etc.)

Parameters
[in]prefabID
Returns

Definition at line 149 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetCompositionResourceName()

protected ResourceName GetCompositionResourceName ( int  prefabID)
Parameters
[in]prefabID
Returns
resource name based on prefab ID.

Definition at line 170 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetCurrentBuildValue()

float GetCurrentBuildValue ( )
Returns
current value

Definition at line 370 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetOnAddBuildingValueInt()

ScriptInvokerInt GetOnAddBuildingValueInt ( )
Returns

Definition at line 60 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetOnAddBuildingValueVoid()

ScriptInvokerVoid GetOnAddBuildingValueVoid ( )
Returns

Definition at line 70 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetOnCompositionIdSet()

ScriptInvokerVoid GetOnCompositionIdSet ( )
Returns

Definition at line 80 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetPrefabId()

int GetPrefabId ( )
Returns

Definition at line 207 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetToBuildValue()

int GetToBuildValue ( )
Returns
value that needs to be reached to spawn the composition.

Definition at line 363 of file SCR_CampaignBuildingLayoutComponent.c.

◆ HasBuildingPreview()

bool HasBuildingPreview ( )
Returns
true if the building preview for this layout exists, false otherwise.

Definition at line 119 of file SCR_CampaignBuildingLayoutComponent.c.

◆ IsLayoutInBuildingRange()

bool IsLayoutInBuildingRange ( notnull SCR_EditorModeEntity  editorModeEntity)

Is this layout in building radius of the provider

Parameters
[in]editorModeEntity
Returns

Definition at line 104 of file SCR_CampaignBuildingLayoutComponent.c.

◆ LockCompositionInteraction()

void LockCompositionInteraction ( )

Once someone for the 1st time add a value to build a composition, set the lock at this composition to disallow any manipulation (deleting, moving) with this composition until it's fully build.

Definition at line 394 of file SCR_CampaignBuildingLayoutComponent.c.

◆ OnChildAdded()

override void OnChildAdded ( IEntity  parent,
IEntity  child 
)

Definition at line 428 of file SCR_CampaignBuildingLayoutComponent.c.

◆ OnEditorModeChanged()

void OnEditorModeChanged ( SCR_EditorModeEntity  currentModeEntity,
SCR_EditorModeEntity  prevModeEntity 
)

Event called when the editor mode changed to delete the composition preview.

Parameters
[in]currentModeEntity
[in]prevModeEntity

Definition at line 92 of file SCR_CampaignBuildingLayoutComponent.c.

◆ RplProp()

SCR_CampaignBuildingLayoutComponentClass ScriptComponentClass RplProp ( onRplName:"SpawnPreviewIfBuildingModeOpened"  )

Definition at line 8 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SetBuildingValue()

void SetBuildingValue ( float  newValue)
Parameters
[in]newValue

Definition at line 347 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SetOnEditorOpenEvent()

bool SetOnEditorOpenEvent ( )

Set the event on editor mode opening.

Returns

Definition at line 45 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SetPrefabId()

void SetPrefabId ( int  prefabId)

Save prefab ID of the composition, which is used by a Free Roam mode to know what composition this preview represents.

Parameters
[in]prefabId

Definition at line 192 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SnapEntityToTerrain()

protected void SnapEntityToTerrain ( IEntity  entity)

Definition at line 409 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SpawnComposition()

void SpawnComposition ( )

Spawn the composition belonging to this layout.

Definition at line 214 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SpawnPreview()

void SpawnPreview ( )

Create a preview if it does not exist.

Definition at line 244 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SpawnPreviewIfBuildingModeOpened()

void SpawnPreviewIfBuildingModeOpened ( )

Spawn the composition preview if the building mode is active (open)

Definition at line 295 of file SCR_CampaignBuildingLayoutComponent.c.

◆ ~SCR_CampaignBuildingLayoutComponent()

void ~SCR_CampaignBuildingLayoutComponent ( )

Definition at line 442 of file SCR_CampaignBuildingLayoutComponent.c.