Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_CampaignBuildingLayoutComponent Interface Reference
Inheritance diagram for SCR_CampaignBuildingLayoutComponent:
[legend]

Public Member Functions

override void OnPostInit (IEntity owner)
 
bool SetOnEditorOpenEvent ()
 Set the event on editor mode opening.
 
ScriptInvokerInt GetOnAddBuildingValueInt ()
 
ScriptInvokerVoid GetOnAddBuildingValueVoid ()
 
ScriptInvokerVoid GetOnCompositionIdSet ()
 
void OnEditorModeChanged (SCR_EditorModeEntity currentModeEntity, SCR_EditorModeEntity prevModeEntity)
 Event called when the editor mode changed to delete the composition preview.
 
bool IsLayoutInBuildingRange (notnull SCR_EditorModeEntity editorModeEntity)
 Is this layout in building radius of the provider.
 
bool HasBuildingPreview ()
 
void EvaluateBuildingStatus (int currentBuildValue)
 
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.)
 
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.
 
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 ()
 Search for an editor mode entity (exists only when the player is in editor mode)
 
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.
 
override void OnChildAdded (IEntity parent, IEntity child)
 
void ~SCR_CampaignBuildingLayoutComponent ()
 

Protected Member Functions

ResourceName GetCompositionResourceName (int prefabID)
 
SCR_CampaignBuildingManagerComponent GetBuildingManagerComponent ()
 
void SnapEntityToTerrain (IEntity entity)
 

Protected Attributes

int m_iPrefabId = INVALID_PREFAB_ID
 
int m_iToBuildValue
 
float m_fCurrentBuildValue
 
SCR_BasePreviewEntity m_PreviewEntity
 
ref ScriptInvokerInt m_OnAddBuildingValueInt
 
ref ScriptInvokerVoid m_OnAddBuildingValueVoid
 
ref ScriptInvokerVoid m_OnCompositionIdSet
 

Static Protected Attributes

const static int EMPTY_BUILDING_VALUE = 0
 
static const int INVALID_PREFAB_ID = -1
 

Constructor & Destructor Documentation

◆ ~SCR_CampaignBuildingLayoutComponent()

void SCR_CampaignBuildingLayoutComponent.~SCR_CampaignBuildingLayoutComponent ( )

Member Function Documentation

◆ AddBuildingValue()

void SCR_CampaignBuildingLayoutComponent.AddBuildingValue ( int  value)
Parameters
[in]value

◆ DeletePreview()

void SCR_CampaignBuildingLayoutComponent.DeletePreview ( )

◆ EvaluateBuildingStatus()

void SCR_CampaignBuildingLayoutComponent.EvaluateBuildingStatus ( int  currentBuildValue)
Parameters
[in]currentBuildValue

◆ GetBuildingManagerComponent()

SCR_CampaignBuildingManagerComponent SCR_CampaignBuildingLayoutComponent.GetBuildingManagerComponent ( )
protected

◆ GetBuildingModeEntity()

SCR_EditorModeEntity SCR_CampaignBuildingLayoutComponent.GetBuildingModeEntity ( )

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

Returns

◆ GetBuildingValue()

int SCR_CampaignBuildingLayoutComponent.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

◆ GetCompositionResourceName()

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

◆ GetCurrentBuildValue()

float SCR_CampaignBuildingLayoutComponent.GetCurrentBuildValue ( )
Returns
current value

◆ GetOnAddBuildingValueInt()

ScriptInvokerInt SCR_CampaignBuildingLayoutComponent.GetOnAddBuildingValueInt ( )
Returns

◆ GetOnAddBuildingValueVoid()

ScriptInvokerVoid SCR_CampaignBuildingLayoutComponent.GetOnAddBuildingValueVoid ( )
Returns

◆ GetOnCompositionIdSet()

ScriptInvokerVoid SCR_CampaignBuildingLayoutComponent.GetOnCompositionIdSet ( )
Returns

◆ GetPrefabId()

int SCR_CampaignBuildingLayoutComponent.GetPrefabId ( )
Returns

◆ GetToBuildValue()

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

◆ HasBuildingPreview()

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

◆ IsLayoutInBuildingRange()

bool SCR_CampaignBuildingLayoutComponent.IsLayoutInBuildingRange ( notnull SCR_EditorModeEntity  editorModeEntity)

Is this layout in building radius of the provider.

Parameters
[in]editorModeEntity
Returns

◆ LockCompositionInteraction()

void SCR_CampaignBuildingLayoutComponent.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.

◆ OnChildAdded()

override void SCR_CampaignBuildingLayoutComponent.OnChildAdded ( IEntity  parent,
IEntity  child 
)

◆ OnEditorModeChanged()

void SCR_CampaignBuildingLayoutComponent.OnEditorModeChanged ( SCR_EditorModeEntity  currentModeEntity,
SCR_EditorModeEntity  prevModeEntity 
)

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

Parameters
[in]currentModeEntity
[in]prevModeEntity

◆ OnPostInit()

override void SCR_CampaignBuildingLayoutComponent.OnPostInit ( IEntity  owner)

◆ SetBuildingValue()

void SCR_CampaignBuildingLayoutComponent.SetBuildingValue ( float  newValue)
Parameters
[in]newValue

◆ SetOnEditorOpenEvent()

bool SCR_CampaignBuildingLayoutComponent.SetOnEditorOpenEvent ( )

Set the event on editor mode opening.

Returns

◆ SetPrefabId()

void SCR_CampaignBuildingLayoutComponent.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

◆ SnapEntityToTerrain()

void SCR_CampaignBuildingLayoutComponent.SnapEntityToTerrain ( IEntity  entity)
protected

◆ SpawnComposition()

void SCR_CampaignBuildingLayoutComponent.SpawnComposition ( )

Spawn the composition belonging to this layout.

◆ SpawnPreview()

void SCR_CampaignBuildingLayoutComponent.SpawnPreview ( )

Create a preview if it does not exist.

◆ SpawnPreviewIfBuildingModeOpened()

void SCR_CampaignBuildingLayoutComponent.SpawnPreviewIfBuildingModeOpened ( )

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

Member Data Documentation

◆ EMPTY_BUILDING_VALUE

const static int SCR_CampaignBuildingLayoutComponent.EMPTY_BUILDING_VALUE = 0
staticprotected

◆ INVALID_PREFAB_ID

const int SCR_CampaignBuildingLayoutComponent.INVALID_PREFAB_ID = -1
staticprotected

◆ m_fCurrentBuildValue

float SCR_CampaignBuildingLayoutComponent.m_fCurrentBuildValue
protected

◆ m_iPrefabId

int SCR_CampaignBuildingLayoutComponent.m_iPrefabId = INVALID_PREFAB_ID
protected

◆ m_iToBuildValue

int SCR_CampaignBuildingLayoutComponent.m_iToBuildValue
protected

◆ m_OnAddBuildingValueInt

ref ScriptInvokerInt SCR_CampaignBuildingLayoutComponent.m_OnAddBuildingValueInt
protected

◆ m_OnAddBuildingValueVoid

ref ScriptInvokerVoid SCR_CampaignBuildingLayoutComponent.m_OnAddBuildingValueVoid
protected

◆ m_OnCompositionIdSet

ref ScriptInvokerVoid SCR_CampaignBuildingLayoutComponent.m_OnCompositionIdSet
protected

◆ m_PreviewEntity

SCR_BasePreviewEntity SCR_CampaignBuildingLayoutComponent.m_PreviewEntity
protected

The documentation for this interface was generated from the following file: