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

Go to the source code of this file.

Classes

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)
Faction GetProviderAffiliatedFaction ()
bool GetProviderBase (out SCR_MilitaryBaseComponent base)
 Return the base which belongs to a provider (if any).
void OnPreviewCreated (SCR_EditablePreviewEntity previewEnt)
 Method called when the preview of prefab to build is created.
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.).
override void OnBeforeEntityCreatedServer (ResourceName prefab)
override bool IsThereEnoughBudgetToSpawn (IEntityComponentSource entitySource)
void OnEntityCreatedServer (array< SCR_EditableEntityComponent > entities)
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.
void GetAIBudgetClient (int prefabID, SCR_EditableEntityComponent entity)
int GetEntityBudgetValue (notnull SCR_EditableEntityComponent entity, EEditableEntityBudget budget)
 Get value of given budget for given entity.
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.
void InitGroup (SCR_AIGroup aiGroup)
 Init spawned AI group (set events and flags).
void SetAiFlag (SCR_EditableEntityComponent component)
void OnPlaceEntityServer (int prefabID, SCR_EditableEntityComponent entity)
void PlaySoundEvent (vector pos, string soundEvent)
void CreateEntityServer (SCR_EditorPreviewParams params, RplId prefabID, int playerID, int entityIndex, bool isQueue, array< RplId > recipientIds, bool canBePlayer, RplId holderId)
ResourceName GetOutlineToSpawn (notnull SCR_EditableEntityComponent entity)
 Search for the outline that is assigned to this composition to be spawned.
override bool CanCreateEntity (out ENotification outNotification=-1, inout SCR_EPreviewState previewStateToShow=SCR_EPreviewState.PLACEABLE, SCR_EditorPreviewParams params=null, int prefabID=-1)
bool CanPlaceEntityServer (IEntityComponentSource editableEntitySource, out EEditableEntityBudget blockingBudget, bool updatePreview, bool showNotification, int prefabID=-1, int playerID=-1, SCR_EditorPreviewParams params=null)
bool AreLabelsMatching (notnull array< EEditableEntityLabel > entityLabels)
void EOnEditorActivate ()
void EOnEditorActivateServer ()
void EOnEditorOpen ()
void EOnEditorClose ()
void EOnEditorOpenServer ()
void EOnEditorDeactivateServer ()
bool UseCooldown ()
 Check if the cooldown is set with this provider.
void SetCooldownTimer (int cooldownTime)
void SetAIBudget (int value)

Variables

ref array< ResourceNamem_aClippingCheckIgnoredPrefabs
ResourceName m_sDefaultAIWP
bool m_bCanBeCreated = true
SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent
ScriptedGameTriggerEntity m_AreaTrigger
IEntity m_Provider
ECantBuildNotificationType m_eBlockingReason
SCR_EditablePreviewEntity m_PreviewEnt
ref map< EEditableEntityBudget, intm_accumulatedCampaignBudgetChanges = new map<EEditableEntityBudget, int>

Enumeration Type Documentation

◆ ECantBuildNotificationType

Enumerator
OUT_OF_AREA 
BLOCKED 

User has this asset blocked so it should not be possible to interact with it until unblocked.

Definition at line 573 of file SCR_CampaignBuildingPlacingEditorComponent.c.

Function Documentation

◆ AreLabelsMatching()

bool AreLabelsMatching ( notnull array< EEditableEntityLabel > entityLabels)
protected

Method used by the server to validate if labels from entity that was requested to spawn are matching with labels that are available with current building mode provider

Parameters
[in]entityLabelslist of labels which should be validated
Returns
true if validation was successful, otherwise false

Definition at line 400 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ 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,
SCR_EditorPreviewParams params = null,
int prefabID = -1 )
protected

◆ CanPlaceEntityServer()

bool CanPlaceEntityServer ( IEntityComponentSource editableEntitySource,
out EEditableEntityBudget blockingBudget,
bool updatePreview,
bool showNotification,
int prefabID = -1,
int playerID = -1,
SCR_EditorPreviewParams params = null )
protected

◆ ContainPrefab()

bool Attribute::ContainPrefab ( ResourceName res)
protected

Definition at line 3 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ CreateEntityServer()

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

◆ EOnEditorActivate()

void EOnEditorActivate ( )
protected

◆ EOnEditorActivateServer()

void EOnEditorActivateServer ( )
protected

◆ EOnEditorClose()

void EOnEditorClose ( )
protected

◆ EOnEditorDeactivateServer()

void EOnEditorDeactivateServer ( )
protected

◆ EOnEditorOpen()

void EOnEditorOpen ( )
protected

◆ EOnEditorOpenServer()

void EOnEditorOpenServer ( )
protected

◆ GetAIBudgetClient()

void GetAIBudgetClient ( int prefabID,
SCR_EditableEntityComponent entity )
protected

◆ GetCooldownTimeClient()

void GetCooldownTimeClient ( int prefabID,
SCR_EditableEntityComponent entity )
protected

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 191 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ GetEntityBudgetValue()

int GetEntityBudgetValue ( notnull SCR_EditableEntityComponent entity,
EEditableEntityBudget budget )
protected

Get value of given budget for given entity.

Definition at line 204 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ GetOutlineToSpawn()

ResourceName GetOutlineToSpawn ( notnull SCR_EditableEntityComponent entity)
protected

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

Definition at line 323 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ GetProviderAffiliatedFaction()

Faction GetProviderAffiliatedFaction ( )
protected

Definition at line 37 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ GetProviderBase()

bool GetProviderBase ( out SCR_MilitaryBaseComponent base)
protected

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

Definition at line 55 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ InitGroup()

void InitGroup ( SCR_AIGroup aiGroup)
protected

Init spawned AI group (set events and flags).

Definition at line 253 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ IsThereEnoughBudgetToSpawn()

override bool IsThereEnoughBudgetToSpawn ( IEntityComponentSource entitySource)
protected

◆ OnBeforeEntityCreatedServer()

override void OnBeforeEntityCreatedServer ( ResourceName prefab)
protected

Definition at line 99 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ OnEntityCreatedServer()

void OnEntityCreatedServer ( array< SCR_EditableEntityComponent > entities)
protected

◆ OnPlaceEntityServer()

void OnPlaceEntityServer ( int prefabID,
SCR_EditableEntityComponent entity )
protected

◆ OnPreviewCreated()

void OnPreviewCreated ( SCR_EditablePreviewEntity previewEnt)
protected

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

Definition at line 70 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ PlaySoundEvent()

void PlaySoundEvent ( vector pos,
string soundEvent )
protected

◆ SetAIBudget()

void SetAIBudget ( int value)
protected

◆ SetAiFlag()

void SetAiFlag ( SCR_EditableEntityComponent component)
protected

◆ SetCooldownTimer()

void SetCooldownTimer ( int cooldownTime)
protected

◆ SetInitialCanBeCreatedState()

void SetInitialCanBeCreatedState ( notnull SCR_EditablePreviewEntity previewEnt)
protected

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 84 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ SetProviderAndBuilder()

void SetProviderAndBuilder ( notnull SCR_CampaignBuildingCompositionComponent compositionComponent)
protected

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 223 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ UseCooldown()

bool UseCooldown ( )
protected

Check if the cooldown is set with this provider.

Definition at line 537 of file SCR_CampaignBuildingPlacingEditorComponent.c.

Variable Documentation

◆ m_accumulatedCampaignBudgetChanges

ref map<EEditableEntityBudget, int> m_accumulatedCampaignBudgetChanges = new map<EEditableEntityBudget, int>
protected

Definition at line 34 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_aClippingCheckIgnoredPrefabs

ref array<ResourceName> m_aClippingCheckIgnoredPrefabs
protected

Definition at line 1 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_AreaTrigger

ScriptedGameTriggerEntity m_AreaTrigger
protected

Definition at line 27 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_bCanBeCreated

bool m_bCanBeCreated = true
protected

Definition at line 25 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_CampaignBuildingComponent

SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent
protected

Definition at line 26 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_eBlockingReason

ECantBuildNotificationType m_eBlockingReason
protected

Definition at line 29 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_PreviewEnt

SCR_EditablePreviewEntity m_PreviewEnt
protected

Definition at line 30 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_Provider

IEntity m_Provider
protected

Definition at line 28 of file SCR_CampaignBuildingPlacingEditorComponent.c.

◆ m_sDefaultAIWP

ResourceName m_sDefaultAIWP
protected

Definition at line 23 of file SCR_CampaignBuildingPlacingEditorComponent.c.