Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_RequiredDeployablePart Interface Reference
Inheritance diagram for SCR_RequiredDeployablePart:
SCR_AlternativeRequirementsDeployablePart SCR_ComboRequiredDeployableParts

Public Member Functions

ResourceName GetPrefab ()
 
void SetNumberOfRequiredPrefabs (int newValue)
 
int GetNumberOfRequiredPrefabs ()
 
LocalizedString GetPartName ()
 
LocalizedString GetMissingPartName ()
 
bool IsRequirementMet (out int difference)
 
int GetNumberOfFoundEntities ()
 
bool ShouldDeleteFoundEntities ()
 
array< IEntity > GetFoundEntities ()
 
bool EvaluateFoundEntity (vector origin, float distanceSqToFoundEntity, notnull BaseContainer foundPrefab, notnull IEntity foundEntity)
 Evaluates found entity against requirements and if it meets them, then it is stored as found entity If max number of required elements is already reached, then it will check if this new entity is closer than others, and in such case replace one of them.
 
bool DeleteFoundEntity (int id, notnull IEntity user)
 Attempts to delete one of the found entities and remove it from the array.
 
void AddFoundEntity (notnull IEntity entity)
 Attempts to add entity to the list of found elements as long as its not already on that list.
 
void ReplaceFoundEntity (notnull IEntity entity, int id)
 Attempts to replace entity which is in specified place of the array with provided entity.
 
SCR_RequiredDeployablePart DeepClone ()
 Returns deep copy of this instance Normal Clone does a shallow copy, thus if you need to clone content of a child class then override this and do it manually.
 

Protected Attributes

ResourceName m_sPrefab
 
int m_iNumberOfRequiredPrefabs
 
LocalizedString m_sPartName
 
bool m_bDeletePartsOnDeployment
 
bool m_bDetachMagazinesWhenUsed
 
ref array< IEntity > m_aFoundEntities
 

Member Function Documentation

◆ AddFoundEntity()

void SCR_RequiredDeployablePart.AddFoundEntity ( notnull IEntity entity)

Attempts to add entity to the list of found elements as long as its not already on that list.

Parameters
[in]entity

◆ DeepClone()

SCR_RequiredDeployablePart SCR_RequiredDeployablePart.DeepClone ( )

Returns deep copy of this instance Normal Clone does a shallow copy, thus if you need to clone content of a child class then override this and do it manually.

Implemented in SCR_AlternativeRequirementsDeployablePart.

◆ DeleteFoundEntity()

bool SCR_RequiredDeployablePart.DeleteFoundEntity ( int id,
notnull IEntity user )

Attempts to delete one of the found entities and remove it from the array.

Note
NOTICE: When entry in the array is deleted, then in its place will be moved last element of the array
Parameters
[in]idof the entity that should be deleted
Returns
false if deletion failed as there is no entity to delete

Implemented in SCR_AlternativeRequirementsDeployablePart, and SCR_ComboRequiredDeployableParts.

◆ EvaluateFoundEntity()

bool SCR_RequiredDeployablePart.EvaluateFoundEntity ( vector origin,
float distanceSqToFoundEntity,
notnull BaseContainer foundPrefab,
notnull IEntity foundEntity )

Evaluates found entity against requirements and if it meets them, then it is stored as found entity If max number of required elements is already reached, then it will check if this new entity is closer than others, and in such case replace one of them.

Parameters
[in]originposition from which search is being done
[in]distanceSqToFoundEntitydistance from the origin to the position of the found entity
[in]foundPrefab
[in]foundEntity
Returns
false if found entity doesnt meet the requirements, otherwise true

Implemented in SCR_AlternativeRequirementsDeployablePart, and SCR_ComboRequiredDeployableParts.

◆ GetFoundEntities()

array< IEntity > SCR_RequiredDeployablePart.GetFoundEntities ( )

◆ GetMissingPartName()

LocalizedString SCR_RequiredDeployablePart.GetMissingPartName ( )

◆ GetNumberOfFoundEntities()

int SCR_RequiredDeployablePart.GetNumberOfFoundEntities ( )

◆ GetNumberOfRequiredPrefabs()

int SCR_RequiredDeployablePart.GetNumberOfRequiredPrefabs ( )
Returns

◆ GetPartName()

LocalizedString SCR_RequiredDeployablePart.GetPartName ( )
Returns

◆ GetPrefab()

ResourceName SCR_RequiredDeployablePart.GetPrefab ( )
Returns

◆ IsRequirementMet()

bool SCR_RequiredDeployablePart.IsRequirementMet ( out int difference)
Parameters
[out]differencebetween number of found entities and required amount
Returns
true if requirement is fulfilled

Implemented in SCR_AlternativeRequirementsDeployablePart, and SCR_ComboRequiredDeployableParts.

◆ ReplaceFoundEntity()

void SCR_RequiredDeployablePart.ReplaceFoundEntity ( notnull IEntity entity,
int id )

Attempts to replace entity which is in specified place of the array with provided entity.

Parameters
[in]entitynew element that will replace the old one
[in]idplace in which new element will replace the old one

◆ SetNumberOfRequiredPrefabs()

void SCR_RequiredDeployablePart.SetNumberOfRequiredPrefabs ( int newValue)

◆ ShouldDeleteFoundEntities()

bool SCR_RequiredDeployablePart.ShouldDeleteFoundEntities ( )
Returns

Member Data Documentation

◆ m_aFoundEntities

ref array<IEntity> SCR_RequiredDeployablePart.m_aFoundEntities
protected

◆ m_bDeletePartsOnDeployment

bool SCR_RequiredDeployablePart.m_bDeletePartsOnDeployment
protected

◆ m_bDetachMagazinesWhenUsed

bool SCR_RequiredDeployablePart.m_bDetachMagazinesWhenUsed
protected

◆ m_iNumberOfRequiredPrefabs

int SCR_RequiredDeployablePart.m_iNumberOfRequiredPrefabs
protected

◆ m_sPartName

LocalizedString SCR_RequiredDeployablePart.m_sPartName
protected

◆ m_sPrefab

ResourceName SCR_RequiredDeployablePart.m_sPrefab
protected

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