Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_CampaignBuildingBudgetEditorComponent Interface Reference
Inheritance diagram for SCR_CampaignBuildingBudgetEditorComponent:
SCR_BudgetEditorComponent SCR_BaseEditorComponent

Public Member Functions

override bool GetMaxBudgetValue (EEditableEntityBudget type, out int maxBudget)
 Get max budget for this player per budget type.
 
override int GetCurrentBudgetValue (EEditableEntityBudget type)
 Get last received budget value for type.
 
int GetProviderMaxValue (EEditableEntityBudget budget)
 
bool HasCooldownTime ()
 Return current cooldown timer state.
 
int GetCooldownTime ()
 
SCR_ECharacterRank GetUserRank ()
 
override bool CanPlaceEntitySource (IEntityComponentSource editableEntitySource, out EEditableEntityBudget blockingBudget, bool isPlacingPlayer=false, bool updatePreview=true, bool showNotification=true)
 Checks if budget is sufficient to place passed EditableEntityComponentClass source.
 
void CanPlaceOwnerCampaignBuilding (bool canPlace, EEditableEntityBudget blockingBudget)
 
override bool GetMaxBudget (EEditableEntityBudget type, out SCR_EntityBudgetValue budget)
 
override bool CanPlace (notnull array< ref SCR_EntityBudgetValue > budgetCosts, out EEditableEntityBudget blockingBudget)
 Checks if budget is sufficient using passed budget costs.
 
bool IsBudgetCapEnabled (EEditableEntityBudget blockingBudget)
 Check if the given budget is on the list of budgets used by a provider.
 
override bool GetEntityPreviewBudgetCosts (SCR_EditableEntityUIInfo entityUIInfo, out notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
- Public Member Functions inherited from SCR_BudgetEditorComponent
bool CanPlaceEntityInfo (SCR_EditableEntityUIInfo info, out EEditableEntityBudget blockingBudget, bool showNotification)
 Checks if budget is sufficient to place passed entity.
 
bool CanPlaceEntityInfo (SCR_EditableEntityUIInfo info, out notnull array< ref SCR_EntityBudgetValue > budgetCosts, out EEditableEntityBudget blockingBudget, bool showNotification)
 Checks if budget is sufficient to place passed entity.
 
void GetBudgetCosts (IEntityComponentSource editableEntitySource, out notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
void GetBudgetCostsDontDiscardCampaignBudget (IEntityComponentSource editableEntitySource, out notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
bool GetEntityPreviewBudgetCostsDontDiscardCampaignBudget (SCR_EditableEntityUIInfo entityUIInfo, out notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
bool GetEntitySourcePreviewBudgetCosts (IEntityComponentSource editableEntitySource, out notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
bool GetVehicleOccupiedBudgetCosts (IEntityComponentSource editableEntitySource, EEditorPlacingFlags placingFlags, out notnull array< ref SCR_EntityBudgetValue > budgetCosts, bool includeVehicleCost=true)
 Return the cost of the occupants for a vehicle.
 
bool GetVehicleOccupiedBudgetCosts (SCR_EditableVehicleUIInfo editableUIInfo, EEditorPlacingFlags placingFlags, out notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
void UpdatePreviewCost (notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
void ResetPreviewCost ()
 
void SetMaxBudgetValue (EEditableEntityBudget type, int newValue)
 Set max budget for this player for budget type.
 
void DelayedSetMaxBudgetSetup (EEditableEntityBudget type, int newValue, int playerChangingBudget)
 
void SetMultiMaxBudgetValues (notnull map< EEditableEntityBudget, int > budgets, int playerChangingBudget)
 
void GetEntityTypeBudgetCost (EEditableEntityType entityType, out array< ref SCR_EntityBudgetValue > budgetCosts)
 Gets the minimun cost of the given entity type.
 
void SetCurrentBudgetValue (EEditableEntityBudget budgetType, int value)
 Set current budget value.
 
bool GetCurrentBudgetInfo (EEditableEntityBudget budgetType, out SCR_UIInfo blockingBudgetInfo)
 Get current settings of budget with given type.
 
void GetBudgets (out notnull array< ref SCR_EditableEntityCoreBudgetSetting > budgets)
 
SCR_EditableEntityCoreBudgetSetting GetBudgetSetting (EEditableEntityBudget budgetType)
 
void DemandBudgetUpdateFromServer ()
 
void RpcServer_UpdateBudget ()
 
void RpcOwner_UpdateBudget (EEditableEntityBudget budgetType, int currentBudget)
 
void ~SCR_BudgetEditorComponent ()
 
- Public Member Functions inherited from SCR_BaseEditorComponent
void OnInitBase ()
 
void OnDeleteBase ()
 
void OnRequestBase (bool isOpen)
 
void OnOpenedBase ()
 
void OnClosedBase ()
 
void OnPreActivateBase ()
 
void OnActivateBase ()
 
bool OnActivateAsyncBase (int attempt)
 
void OnPostActivateBase ()
 
void OnDeactivateBase ()
 
void OnPostDeactivateBase ()
 
bool OnDeactivateAsyncBase (int attempt)
 
void OnEffectBase (SCR_BaseEditorEffect effect)
 
SCR_EditorManagerEntity GetManager ()
 Get editor manager this component belongs to.
 
SCR_BaseEditorComponent FindEditorComponent (TypeName type, bool showError=false, bool modeFirst=false)
 Get the editor manager to which this component belongs.
 
EntityComponentPrefabData GetEditorComponentData ()
 Get prefab data of this component.
 
bool IsRemoved ()
 Check if the component is being deleted.
 
void ResetEditorComponent ()
 Reset values controlled by the component.
 
ScriptInvoker GetOnEffect ()
 Get event called when an effect is activated.
 
void InitServer ()
 
void InitOwner ()
 
override void OnPostInit (IEntity owner)
 
void SCR_BaseEditorComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_BaseEditorComponent ()
 

Protected Member Functions

override void EOnEditorActivateServer ()
 When the component is activated (called on server)
 
override void EOnEditorActivate ()
 When the component is activated.
 
override void EOnEditorDeactivate ()
 When the component is deactivated.
 
void OnResourceTypeEnabledChanged (array< EResourceType > disabledResourceTypes)
 
bool RefreshSuppliesComponent ()
 
void OnBaseResourcesChanged (SCR_ResourceConsumer consumer, int previousValue)
 
void OnBaseSuppliesChanged (int supplies)
 
void OnTargetBaseChanged (IEntity targetEntity)
 
override void OnEntityCoreBudgetUpdatedOwner (EEditableEntityBudget entityBudget, int budgetValue, int budgetChange, bool sendBudgetMaxEvent, bool budgetMaxReached)
 
bool RefreshResourcesComponent ()
 
override void RefreshBudgetSettings ()
 Get default budget definitions from core, budget values not synced on client, use GetCurrentBudget for updated budget.
 
bool CanPlaceResultCampaignBuilding (bool canPlace, bool showNotification, EEditableEntityBudget blockingBudget)
 
- Protected Member Functions inherited from SCR_BudgetEditorComponent
bool CanPlaceEntityType (EEditableEntityType entityType, out notnull array< ref SCR_EntityBudgetValue > budgetCosts, out EEditableEntityBudget blockingBudget)
 Fallback function in case no budget costs are defined on the entity.
 
bool CanPlace (SCR_EntityBudgetValue budgetCost, out EEditableEntityBudget blockingBudget)
 
bool CanPlace (int currentBudget, int budgetChange, int maxBudget)
 
bool IsBudgetAvailable (EEditableEntityBudget type)
 
bool GetMaxBudget_Old (EEditableEntityBudget type, out SCR_EntityBudgetValue budget)
 
void DelayedSetMaxBudget (int playerChangingBudget)
 
int GetEntityTypeBudgetCost (EEditableEntityBudget budgetType)
 
bool GetCurrentBudgetSettings (EEditableEntityBudget budgetType, out SCR_EditableEntityCoreBudgetSetting budgetSettings)
 
void UpdateMaxBudgetOwner (int budgetType, int oldMaxBudget, int newMaxBudget)
 
bool CanPlaceResult (bool canPlace, bool showNotification)
 
void CanPlaceOwner (bool canPlace)
 
void OnEntityCoreBudgetUpdated (EEditableEntityBudget entityBudget, int originalBudgetValue, int budgetChange, int updatedBudgetValue)
 
bool CheckMaxBudgetReached (EEditableEntityBudget entityBudget, int budgetChange, int originalBudgetValue, int updatedBudgetValue, int maxBudgetValue, out bool maxBudgetReached)
 
void FilterAvailableBudgets (inout notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
void FilterAvailableBudgetsDontDiscardCampaignBudget (inout notnull array< ref SCR_EntityBudgetValue > budgetCosts)
 
EEditableEntityBudget GetFirstAvailableBudget ()
 
bool IsBudgetCapEnabled ()
 
override void EOnEditorDebug (array< string > debugTexts)
 Every frame while the editor is opened and debug menu is shown.
 
override void EOnEditorInitServer ()
 When the entity is created (called on server)
 
override void EOnEditorDeleteServer ()
 When the entity is destroyed (called on server)
 
override void EOnEditorInit ()
 When the entity is created.
 
- Protected Member Functions inherited from SCR_BaseEditorComponent
bool IsOnEditorManager ()
 
bool IsOwner ()
 
bool IsProxy ()
 
bool IsMaster ()
 
bool IsAdmin ()
 
SCR_BaseEditorComponent GetParentComponent ()
 
void SetParentComponent (SCR_BaseEditorComponent parent)
 
void SendNotification (ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero)
 
void EOnEditorDelete ()
 When the entity is destroyed.
 
void EOnEditorRequest (bool isOpen)
 When opening/closing request is sent to server.
 
void EOnEditorOpen ()
 When the editor is opened.
 
void EOnEditorClose ()
 When the editor is closed.
 
void EOnEditorPreActivate ()
 Before the component is activated.
 
bool EOnEditorActivateAsync (int attempt)
 When the component is activated.
 
void EOnEditorPostActivate ()
 When the component is activated, but after EOnEditorActivate() function was called in all components.
 
bool EOnEditorDeactivateAsync (int attempt)
 When the component is deactivated.
 
void EOnEditorPostDeactivate ()
 When the component is deactivated, but after the next mode is activated.
 
void EOnEffect (SCR_BaseEditorEffect effect)
 When an effect is created in reaction an an event.
 
void EOnEditorOpenServer ()
 When the editor is opened (called on server)
 
void EOnEditorOpenServerCallback ()
 When the editor is opened (called on server after async loading finished on client)
 
void EOnEditorCloseServer ()
 When the editor is closed (called on server)
 
void EOnEditorCloseServerCallback ()
 When the editor is closed (called on server after async loading finished on client)
 
void EOnEditorDeactivateServer ()
 When the component is deactivated (called on server)
 

Protected Attributes

SCR_ResourceComponent m_ResourceComponent
 
SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent
 
SCR_CampaignSuppliesComponent m_SuppliesComponent
 
SCR_ECharacterRank m_eHighestRank
 
- Protected Attributes inherited from SCR_BudgetEditorComponent
ref array< ref SCR_EntityBudgetValuem_MaxBudgets
 
ref map< EEditableEntityBudget, ref SCR_EntityBudgetValuem_maxBudgetsInternal = new map<EEditableEntityBudget, ref SCR_EntityBudgetValue>
 
SCR_EditableEntityCore m_EntityCore
 
SCR_BaseEditableEntityFilter m_DestroyedEntityFilter
 
ref map< EEditableEntityBudget, SCR_EditableEntityCoreBudgetSetting > m_BudgetSettingsMap = new map<EEditableEntityBudget, SCR_EditableEntityCoreBudgetSetting>
 
ref map< EEditableEntityBudget, int > m_DelayedSetMaxBudgetsMap = new map<EEditableEntityBudget, int>()
 
bool m_bListenToMaxBudgetDelay = false
 
- Protected Attributes inherited from SCR_BaseEditorComponent
SCR_EditorBaseEntity m_Owner
 
SCR_EditorManagerEntity m_Manager
 
SCR_BaseEditorComponent m_Parent
 
RplComponent m_RplComponent
 

Static Protected Attributes

static const int UNLIMITED_PROP_BUDGET = -1
 

Additional Inherited Members

- Static Public Member Functions inherited from SCR_BaseEditorComponent
static Managed GetInstance (TypeName type, bool showError=false, bool modeFirst=false)
 Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity).
 
static Managed GetInstance (SCR_EditorBaseEntity editorManager, TypeName type, bool showError=false)
 Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity).
 
static int GetAllInstances (TypeName type, out notnull array< Managed > outComponents)
 Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity).
 
- Public Attributes inherited from SCR_BudgetEditorComponent
ref ScriptInvoker_EntityBudgetUpdatedEvent Event_OnBudgetUpdated = new ScriptInvoker_EntityBudgetUpdatedEvent()
 
ref ScriptInvoker_EntityBudgetMaxReachedEvent Event_OnBudgetMaxReached = new ScriptInvoker_EntityBudgetMaxReachedEvent()
 
ref ScriptInvoker_EntityBudgetMaxUpdatedEvent Event_OnBudgetMaxUpdated = new ScriptInvoker_EntityBudgetMaxUpdatedEvent()
 
ref ScriptInvoker Event_OnBudgetPreviewUpdated = new ScriptInvoker()
 
ref ScriptInvoker Event_OnBudgetPreviewReset = new ScriptInvoker()
 
- Static Public Attributes inherited from SCR_BudgetEditorComponent
const int DEFAULT_MAX_BUDGET = 100
 
const int DEFAULT_MIN_COST = 1
 

Member Function Documentation

◆ CanPlace()

override bool SCR_CampaignBuildingBudgetEditorComponent.CanPlace ( notnull array< ref SCR_EntityBudgetValue > budgetCosts,
out EEditableEntityBudget blockingBudget )

Checks if budget is sufficient using passed budget costs.

Parameters
[in]budgetCostsarray with budget costs values either read from entity in world or directly from prefab
[out]blockingBudget
Returns
True if passed budgetCosts array is not empty and entity can be placed according to the passed values

Implements SCR_BudgetEditorComponent.

◆ CanPlaceEntitySource()

override bool SCR_CampaignBuildingBudgetEditorComponent.CanPlaceEntitySource ( IEntityComponentSource editableEntitySource,
out EEditableEntityBudget blockingBudget,
bool isPlacingPlayer = false,
bool updatePreview = true,
bool showNotification = true )

Checks if budget is sufficient to place passed EditableEntityComponentClass source.

Parameters
[in]editableEntitySourceIEntityComponentSource SCR_EditableEntityComponentClass to check budget cost of prefab
[out]blockingBudget
[in]isPlacingPlayer
[in]updatePreview
[in]showNotification
Returns

Implements SCR_BudgetEditorComponent.

◆ CanPlaceOwnerCampaignBuilding()

void SCR_CampaignBuildingBudgetEditorComponent.CanPlaceOwnerCampaignBuilding ( bool canPlace,
EEditableEntityBudget blockingBudget )
Parameters
[in]canPlace
[in]blockingBudget

◆ CanPlaceResultCampaignBuilding()

bool SCR_CampaignBuildingBudgetEditorComponent.CanPlaceResultCampaignBuilding ( bool canPlace,
bool showNotification,
EEditableEntityBudget blockingBudget )
protected

◆ EOnEditorActivate()

override void SCR_CampaignBuildingBudgetEditorComponent.EOnEditorActivate ( )
protected

When the component is activated.

Implements SCR_BudgetEditorComponent.

◆ EOnEditorActivateServer()

override void SCR_CampaignBuildingBudgetEditorComponent.EOnEditorActivateServer ( )
protected

When the component is activated (called on server)

Implements SCR_BaseEditorComponent.

◆ EOnEditorDeactivate()

override void SCR_CampaignBuildingBudgetEditorComponent.EOnEditorDeactivate ( )
protected

When the component is deactivated.

Implements SCR_BaseEditorComponent.

◆ GetCooldownTime()

int SCR_CampaignBuildingBudgetEditorComponent.GetCooldownTime ( )

◆ GetCurrentBudgetValue()

override int SCR_CampaignBuildingBudgetEditorComponent.GetCurrentBudgetValue ( EEditableEntityBudget type)

Get last received budget value for type.

Parameters
[in]type
Returns

Implements SCR_BudgetEditorComponent.

◆ GetEntityPreviewBudgetCosts()

override bool SCR_CampaignBuildingBudgetEditorComponent.GetEntityPreviewBudgetCosts ( SCR_EditableEntityUIInfo entityUIInfo,
out notnull array< ref SCR_EntityBudgetValue > budgetCosts )
Parameters
[in]entityUIInfo
[out]budgetCosts
Returns

Implements SCR_BudgetEditorComponent.

◆ GetMaxBudget()

override bool SCR_CampaignBuildingBudgetEditorComponent.GetMaxBudget ( EEditableEntityBudget type,
out SCR_EntityBudgetValue budget )

◆ GetMaxBudgetValue()

override bool SCR_CampaignBuildingBudgetEditorComponent.GetMaxBudgetValue ( EEditableEntityBudget type,
out int maxBudget )

Get max budget for this player per budget type.

Parameters
[in]type
[out]maxBudget
Returns

Implements SCR_BudgetEditorComponent.

◆ GetProviderMaxValue()

int SCR_CampaignBuildingBudgetEditorComponent.GetProviderMaxValue ( EEditableEntityBudget budget)
Returns
max prop value for a current provider. This number limits the number of prefabs (compositions) buildable with this provider.

◆ GetUserRank()

SCR_ECharacterRank SCR_CampaignBuildingBudgetEditorComponent.GetUserRank ( )
Returns

◆ HasCooldownTime()

bool SCR_CampaignBuildingBudgetEditorComponent.HasCooldownTime ( )

Return current cooldown timer state.

◆ IsBudgetCapEnabled()

bool SCR_CampaignBuildingBudgetEditorComponent.IsBudgetCapEnabled ( EEditableEntityBudget blockingBudget)

Check if the given budget is on the list of budgets used by a provider.

Parameters
[in]blockingBudget
Returns

◆ OnBaseResourcesChanged()

void SCR_CampaignBuildingBudgetEditorComponent.OnBaseResourcesChanged ( SCR_ResourceConsumer consumer,
int previousValue )
protected

◆ OnBaseSuppliesChanged()

void SCR_CampaignBuildingBudgetEditorComponent.OnBaseSuppliesChanged ( int supplies)
protected

◆ OnEntityCoreBudgetUpdatedOwner()

override void SCR_CampaignBuildingBudgetEditorComponent.OnEntityCoreBudgetUpdatedOwner ( EEditableEntityBudget entityBudget,
int budgetValue,
int budgetChange,
bool sendBudgetMaxEvent,
bool budgetMaxReached )
protected

◆ OnResourceTypeEnabledChanged()

void SCR_CampaignBuildingBudgetEditorComponent.OnResourceTypeEnabledChanged ( array< EResourceType > disabledResourceTypes)
protected

◆ OnTargetBaseChanged()

void SCR_CampaignBuildingBudgetEditorComponent.OnTargetBaseChanged ( IEntity targetEntity)
protected

◆ RefreshBudgetSettings()

override void SCR_CampaignBuildingBudgetEditorComponent.RefreshBudgetSettings ( )
protected

Get default budget definitions from core, budget values not synced on client, use GetCurrentBudget for updated budget.

Implements SCR_BudgetEditorComponent.

◆ RefreshResourcesComponent()

bool SCR_CampaignBuildingBudgetEditorComponent.RefreshResourcesComponent ( )
protected

◆ RefreshSuppliesComponent()

bool SCR_CampaignBuildingBudgetEditorComponent.RefreshSuppliesComponent ( )
protected

Member Data Documentation

◆ m_CampaignBuildingComponent

SCR_CampaignBuildingEditorComponent SCR_CampaignBuildingBudgetEditorComponent.m_CampaignBuildingComponent
protected

◆ m_eHighestRank

SCR_ECharacterRank SCR_CampaignBuildingBudgetEditorComponent.m_eHighestRank
protected

◆ m_ResourceComponent

SCR_ResourceComponent SCR_CampaignBuildingBudgetEditorComponent.m_ResourceComponent
protected

◆ m_SuppliesComponent

SCR_CampaignSuppliesComponent SCR_CampaignBuildingBudgetEditorComponent.m_SuppliesComponent
protected

◆ UNLIMITED_PROP_BUDGET

const int SCR_CampaignBuildingBudgetEditorComponent.UNLIMITED_PROP_BUDGET = -1
staticprotected

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