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

Go to the source code of this file.

Classes

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)
ResourceName GetCompositionResourceName (int prefabID)
SCR_CampaignBuildingManagerComponent GetBuildingManagerComponent ()
void SetPrefabId (int prefabId)
int GetPrefabId ()
void SpawnComposition ()
 Spawn the composition belonging to this layout.
void SpawnPreview ()
 Create a preview if it does not exist.
void SpawnPreviewIfBuildingModeOpened ()
 Spawn the composition preview if the building mode is active (open).
void DeletePreview ()
void AddBuildingValue (int value)
void SetBuildingValue (float newValue)
int GetToBuildValue ()
float GetCurrentBuildValue ()
SCR_EditorModeEntity GetBuildingModeEntity ()
void LockCompositionInteraction ()
void SnapEntityToTerrain (IEntity entity)
override void OnChildAdded (IEntity parent, IEntity child)
void CreateUnsafeAreaEvent ()
 Create a danger event for AI to clear the area where the composition is about to spawn.
void ~SCR_CampaignBuildingLayoutComponent ()

Function Documentation

◆ AddBuildingValue()

void AddBuildingValue ( int value)
protected
Parameters
[in]value

Definition at line 343 of file SCR_CampaignBuildingLayoutComponent.c.

◆ CreateUnsafeAreaEvent()

void CreateUnsafeAreaEvent ( )
protected

Create a danger event for AI to clear the area where the composition is about to spawn.

Definition at line 455 of file SCR_CampaignBuildingLayoutComponent.c.

◆ DeletePreview()

void DeletePreview ( )
protected

Definition at line 309 of file SCR_CampaignBuildingLayoutComponent.c.

◆ EvaluateBuildingStatus()

void EvaluateBuildingStatus ( int currentBuildValue)
Parameters
[in]currentBuildValue

Definition at line 127 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetBuildingManagerComponent()

SCR_CampaignBuildingManagerComponent GetBuildingManagerComponent ( )
protected

Definition at line 182 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetBuildingModeEntity()

SCR_EditorModeEntity GetBuildingModeEntity ( )
protected

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

Returns

Definition at line 391 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 151 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetCompositionResourceName()

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

Definition at line 172 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetCurrentBuildValue()

float GetCurrentBuildValue ( )
protected
Returns
current value

Definition at line 383 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 ( )
protected
Returns

Definition at line 209 of file SCR_CampaignBuildingLayoutComponent.c.

◆ GetToBuildValue()

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

Definition at line 376 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 ( )
protected

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 407 of file SCR_CampaignBuildingLayoutComponent.c.

◆ OnChildAdded()

override void OnChildAdded ( IEntity parent,
IEntity child )
protected

Definition at line 441 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 1 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SetBuildingValue()

void SetBuildingValue ( float newValue)
protected
Parameters
[in]newValue

Definition at line 360 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)
protected

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 194 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SnapEntityToTerrain()

void SnapEntityToTerrain ( IEntity entity)
protected

Definition at line 422 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SpawnComposition()

void SpawnComposition ( )
protected

Spawn the composition belonging to this layout.

Definition at line 216 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SpawnPreview()

void SpawnPreview ( )
protected

Create a preview if it does not exist.

Definition at line 246 of file SCR_CampaignBuildingLayoutComponent.c.

◆ SpawnPreviewIfBuildingModeOpened()

void SpawnPreviewIfBuildingModeOpened ( )
protected

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

Definition at line 297 of file SCR_CampaignBuildingLayoutComponent.c.

◆ ~SCR_CampaignBuildingLayoutComponent()

void ~SCR_CampaignBuildingLayoutComponent ( )
protected

Definition at line 470 of file SCR_CampaignBuildingLayoutComponent.c.