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

Go to the source code of this file.

Data Structures

class  SCR_CampaignBuildingPlacingEditorComponentClass
 

Enumerations

enum  ECantBuildNotificationType { OUT_OF_AREA = 0, BLOCKED = 1 }
 

Functions

SCR_CampaignBuildingPlacingEditorComponentClass SCR_PlacingEditorComponentClass Attribute ("{C7EE4C198B641E21}Sounds/Editor/BaseBuilding/Editor_BaseBuilding.acp", UIWidgets.ResourceNamePicker, "Sound project file to be used for building", "acp")] protected ResourceName m_sSoundFile
 
bool ContainPrefab (ResourceName res)
 
protected bool GetProviderBase (out SCR_MilitaryBaseComponent base)
 Return the base which belongs to a provider (if any) More...
 
protected void OnPreviewCreated (SCR_EditablePreviewEntity previewEnt)
 Method called when the preview of prefab to build is created. More...
 
protected void SetInitialCanBeCreatedState (notnull SCR_EditablePreviewEntity previewEnt)
 Set the initial state of the preview can / can't be created (based on the place where player place the preview into the world.) More...
 
override void OnBeforeEntityCreatedServer (ResourceName prefab)
 
override void OnEntityCreatedServer (array< SCR_EditableEntityComponent > entities)
 
protected void GetCooldownTimeClient (int prefabID, SCR_EditableEntityComponent entity)
 The placement is driven by a cooldown set on server. However for a client needs (to show him a remaining time) the cooldown has to be set as well. The difference in time between server and client is acceptable. More...
 
protected void GetAIBudgetClient (int prefabID, SCR_EditableEntityComponent entity)
 
int GetEntityBudgetValue (notnull SCR_EditableEntityComponent entity, EEditableEntityBudget budget)
 Get value of given budget for given entity. More...
 
protected void SetProviderAndBuilder (notnull SCR_CampaignBuildingCompositionComponent compositionComponent)
 Set the provider and builder entity to composition. Provider is the entity to which a composition belong to. For example a base, supply truck... Builder is a player who build it. More...
 
void InitGroup (SCR_AIGroup aiGroup)
 Init spawned AI group (set events and flags) More...
 
void SetAiFlag (SCR_EditableEntityComponent component)
 
protected void OnPlaceEntityServer (int prefabID, SCR_EditableEntityComponent entity)
 
protected void PlaySoundEvent (vector pos, string soundEvent)
 
override protected void CreateEntityServer (SCR_EditorPreviewParams params, RplId prefabID, int playerID, int entityIndex, bool isQueue, array< RplId > recipientIds, bool canBePlayer)
 
bool IsPreviewOutOfRange ()
 
ResourceName GetOutlineToSpawn (notnull SCR_EditableEntityComponent entity)
 Search for the outline that is assigned to this composition to be spawned. More...
 
override bool CanCreateEntity (out ENotification outNotification=-1, inout SCR_EPreviewState previewStateToShow=SCR_EPreviewState.PLACEABLE)
 
override protected void EOnEditorActivate ()
 
override protected void EOnEditorActivateServer ()
 
override protected void EOnEditorOpen ()
 
override protected void EOnEditorClose ()
 
override protected void EOnEditorOpenServer ()
 
private void SetInitialEvent ()
 
private void InitVariables ()
 
override protected void EOnEditorDeactivateServer ()
 
bool UseCooldown ()
 Check if the cooldown is set with this provider. More...
 
void SetCooldownTimer (int cooldownTime)
 
void SetAIBudget (int value)
 

Variables

protected ref array< ResourceName > m_aClippingCheckIgnoredPrefabs
 
protected ResourceName m_sDefaultAIWP
 
protected bool m_bCanBeCreated = true
 
protected SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent
 
protected SCR_FreeRoamBuildingClientTriggerEntity m_AreaTrigger
 
protected IEntity m_Provider
 
protected ECantBuildNotificationType m_eBlockingReason
 
protected SCR_EditablePreviewEntity m_PreviewEnt
 

Enumeration Type Documentation

◆ ECantBuildNotificationType

Enumerator
OUT_OF_AREA 
BLOCKED 

Definition at line 430 of file SCR_CampaignBuildingPlacingEditorComponent.c.

Function Documentation

◆ Attribute()

SCR_CampaignBuildingPlacingEditorComponentClass SCR_PlacingEditorComponentClass Attribute ( "{C7EE4C198B641E21}Sounds/Editor/BaseBuilding/Editor_BaseBuilding.acp"  ,
UIWidgets.  ResourceNamePicker,
"Sound project file to be used for building"  ,
"acp"   
)

◆ CanCreateEntity()

override bool CanCreateEntity ( out ENotification  outNotification = -1,
inout SCR_EPreviewState  previewStateToShow = SCR_EPreviewState.PLACEABLE 
)

◆ ContainPrefab()

bool Attribute::ContainPrefab ( ResourceName  res)

Definition at line 5 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ CreateEntityServer()

override protected void CreateEntityServer ( SCR_EditorPreviewParams  params,
RplId  prefabID,
int  playerID,
int  entityIndex,
bool  isQueue,
array< RplId >  recipientIds,
bool  canBePlayer 
)

◆ EOnEditorActivate()

override protected void EOnEditorActivate ( )

◆ EOnEditorActivateServer()

override protected void EOnEditorActivateServer ( )

◆ EOnEditorClose()

override protected void EOnEditorClose ( )

◆ EOnEditorDeactivateServer()

override protected void EOnEditorDeactivateServer ( )

◆ EOnEditorOpen()

override protected void EOnEditorOpen ( )

◆ EOnEditorOpenServer()

override protected void EOnEditorOpenServer ( )

◆ GetAIBudgetClient()

protected void GetAIBudgetClient ( int  prefabID,
SCR_EditableEntityComponent  entity 
)

◆ GetCooldownTimeClient()

protected void GetCooldownTimeClient ( int  prefabID,
SCR_EditableEntityComponent  entity 
)

The placement is driven by a cooldown set on server. However for a client needs (to show him a remaining time) the cooldown has to be set as well. The difference in time between server and client is acceptable.

Definition at line 150 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ GetEntityBudgetValue()

int GetEntityBudgetValue ( notnull SCR_EditableEntityComponent  entity,
EEditableEntityBudget  budget 
)

Get value of given budget for given entity.

Definition at line 163 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ GetOutlineToSpawn()

ResourceName GetOutlineToSpawn ( notnull SCR_EditableEntityComponent  entity)

Search for the outline that is assigned to this composition to be spawned.

Definition at line 292 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ GetProviderBase()

protected bool GetProviderBase ( out SCR_MilitaryBaseComponent  base)

Return the base which belongs to a provider (if any)

Definition at line 34 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ InitGroup()

void InitGroup ( SCR_AIGroup  aiGroup)

Init spawned AI group (set events and flags)

Definition at line 212 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ InitVariables()

private void InitVariables ( )

◆ IsPreviewOutOfRange()

bool IsPreviewOutOfRange ( )

◆ OnBeforeEntityCreatedServer()

override void OnBeforeEntityCreatedServer ( ResourceName  prefab)

Definition at line 78 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ OnEntityCreatedServer()

override void OnEntityCreatedServer ( array< SCR_EditableEntityComponent entities)

Definition at line 91 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ OnPlaceEntityServer()

protected void OnPlaceEntityServer ( int  prefabID,
SCR_EditableEntityComponent  entity 
)

◆ OnPreviewCreated()

protected void OnPreviewCreated ( SCR_EditablePreviewEntity  previewEnt)

Method called when the preview of prefab to build is created.

Definition at line 49 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ PlaySoundEvent()

protected void PlaySoundEvent ( vector  pos,
string  soundEvent 
)

◆ SetAIBudget()

void SetAIBudget ( int  value)

◆ SetAiFlag()

void SetAiFlag ( SCR_EditableEntityComponent  component)

◆ SetCooldownTimer()

void SetCooldownTimer ( int  cooldownTime)

◆ SetInitialCanBeCreatedState()

protected void SetInitialCanBeCreatedState ( notnull SCR_EditablePreviewEntity  previewEnt)

Set the initial state of the preview can / can't be created (based on the place where player place the preview into the world.)

Definition at line 63 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ SetInitialEvent()

private void SetInitialEvent ( )

◆ SetProviderAndBuilder()

protected void SetProviderAndBuilder ( notnull SCR_CampaignBuildingCompositionComponent  compositionComponent)

Set the provider and builder entity to composition. Provider is the entity to which a composition belong to. For example a base, supply truck... Builder is a player who build it.

Definition at line 182 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ UseCooldown()

bool UseCooldown ( )

Check if the cooldown is set with this provider.

Definition at line 394 of file SCR_CampaignBuildingPlacingEditorComponent.c.

Variable Documentation

◆ m_aClippingCheckIgnoredPrefabs

protected ref array<ResourceName> m_aClippingCheckIgnoredPrefabs

Definition at line 3 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_AreaTrigger

◆ m_bCanBeCreated

protected bool m_bCanBeCreated = true

Definition at line 25 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_CampaignBuildingComponent

protected SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent

Definition at line 26 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_eBlockingReason

protected ECantBuildNotificationType m_eBlockingReason

Definition at line 29 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_PreviewEnt

protected SCR_EditablePreviewEntity m_PreviewEnt

Definition at line 30 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_Provider

protected IEntity m_Provider

Definition at line 28 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_sDefaultAIWP

protected ResourceName m_sDefaultAIWP

Definition at line 23 of file SCR_CampaignBuildingPlacingEditorComponent.c.