|
Arma Reforger Script API
|
Public Member Functions | |
| 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. | |
| 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 | GetBudgetCosts (IEntityComponentSource editableEntitySource, out notnull array< ref SCR_EntityBudgetValue > budgetCosts) |
| void | GetBudgetCostsDontDiscardCampaignBudget (IEntityComponentSource editableEntitySource, out notnull array< ref SCR_EntityBudgetValue > budgetCosts) |
| bool | CanPlace (notnull array< ref SCR_EntityBudgetValue > budgetCosts, out EEditableEntityBudget blockingBudget) |
| Checks if budget is sufficient using passed budget costs. | |
| bool | GetEntityPreviewBudgetCosts (SCR_EditableEntityUIInfo entityUIInfo, 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 () |
| bool | GetMaxBudgetValue (EEditableEntityBudget type, out int maxBudget) |
| Get max budget for this player per budget type. | |
| 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. | |
| int | GetCurrentBudgetValue (EEditableEntityBudget type) |
| Get last received budget value for 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 () |
Public Attributes | |
| 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 | |
| const int | DEFAULT_MAX_BUDGET = 100 |
| const int | DEFAULT_MIN_COST = 1 |
Protected Member Functions | |
| 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 (EEditableEntityBudget type, out SCR_EntityBudgetValue budget) |
| 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 | RefreshBudgetSettings () |
| Get default budget definitions from core, budget values not synced on client, use GetCurrentBudget for updated budget. | |
| 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) |
| void | OnEntityCoreBudgetUpdatedOwner (EEditableEntityBudget entityBudget, int budgetValue, int budgetChange, bool sendBudgetMaxEvent, bool budgetMaxReached) |
| 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 | EOnEditorActivate () |
| When the component is activated. | |
| 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. | |
| void | EOnEditorDeactivate () |
| When the component is deactivated. | |
| 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 | EOnEditorActivateServer () |
| When the component is activated (called on server) | |
| void | EOnEditorDeactivateServer () |
| When the component is deactivated (called on server) | |
Protected Attributes | |
| ref array< ref SCR_EntityBudgetValue > | m_MaxBudgets |
| ref map< EEditableEntityBudget, ref SCR_EntityBudgetValue > | m_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 |
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). | |
| void SCR_BudgetEditorComponent.~SCR_BudgetEditorComponent | ( | ) |
|
protected |
| bool SCR_BudgetEditorComponent.CanPlace | ( | notnull array< ref SCR_EntityBudgetValue > | budgetCosts, |
| out EEditableEntityBudget | blockingBudget ) |
Checks if budget is sufficient using passed budget costs.
| [in] | budgetCosts | array with budget costs values either read from entity in world or directly from prefab |
| [out] | blockingBudget |
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
|
protected |
| bool SCR_BudgetEditorComponent.CanPlaceEntityInfo | ( | SCR_EditableEntityUIInfo | info, |
| out EEditableEntityBudget | blockingBudget, | ||
| bool | showNotification ) |
Checks if budget is sufficient to place passed entity.
| [in] | info | |
| [out] | blockingBudget | |
| [in] | showNotification |
| bool SCR_BudgetEditorComponent.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.
| [in] | info | |
| [out] | budgetCosts | |
| [out] | blockingBudget | |
| [in] | showNotification |
| bool SCR_BudgetEditorComponent.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.
| [in] | editableEntitySource | IEntityComponentSource SCR_EditableEntityComponentClass to check budget cost of prefab |
| [out] | blockingBudget | |
| [in] | isPlacingPlayer | |
| [in] | updatePreview | |
| [in] | showNotification |
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
|
protected |
Fallback function in case no budget costs are defined on the entity.
| [in] | entityType | EEditableEntityType of the entity |
| [out] | budgetCosts | |
| [out] | blockingBudget |
|
protected |
|
protected |
|
protected |
|
protected |
| void SCR_BudgetEditorComponent.DelayedSetMaxBudgetSetup | ( | EEditableEntityBudget | type, |
| int | newValue, | ||
| int | playerChangingBudget ) |
| [in] | type | |
| [in] | newValue | |
| [in] | playerChangingBudget |
| void SCR_BudgetEditorComponent.DemandBudgetUpdateFromServer | ( | ) |
|
protected |
When the component is activated.
Implements SCR_BaseEditorComponent.
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
|
protected |
Every frame while the editor is opened and debug menu is shown.
Implements SCR_BaseEditorComponent.
|
protected |
When the entity is destroyed (called on server)
Implements SCR_BaseEditorComponent.
|
protected |
When the entity is created.
Implements SCR_BaseEditorComponent.
|
protected |
When the entity is created (called on server)
Implements SCR_BaseEditorComponent.
|
protected |
|
protected |
| void SCR_BudgetEditorComponent.GetBudgetCosts | ( | IEntityComponentSource | editableEntitySource, |
| out notnull array< ref SCR_EntityBudgetValue > | budgetCosts ) |
| void SCR_BudgetEditorComponent.GetBudgetCostsDontDiscardCampaignBudget | ( | IEntityComponentSource | editableEntitySource, |
| out notnull array< ref SCR_EntityBudgetValue > | budgetCosts ) |
| void SCR_BudgetEditorComponent.GetBudgets | ( | out notnull array< ref SCR_EditableEntityCoreBudgetSetting > | budgets | ) |
| [out] | budgets |
| SCR_EditableEntityCoreBudgetSetting SCR_BudgetEditorComponent.GetBudgetSetting | ( | EEditableEntityBudget | budgetType | ) |
| [in] | budgetType |
| bool SCR_BudgetEditorComponent.GetCurrentBudgetInfo | ( | EEditableEntityBudget | budgetType, |
| out SCR_UIInfo | blockingBudgetInfo ) |
Get current settings of budget with given type.
| [in] | budgetType | |
| [out] | blockingBudgetInfo |
|
protected |
| int SCR_BudgetEditorComponent.GetCurrentBudgetValue | ( | EEditableEntityBudget | type | ) |
Get last received budget value for type.
| [in] | type |
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
| bool SCR_BudgetEditorComponent.GetEntityPreviewBudgetCosts | ( | SCR_EditableEntityUIInfo | entityUIInfo, |
| out notnull array< ref SCR_EntityBudgetValue > | budgetCosts ) |
| [in] | entityUIInfo | |
| [out] | budgetCosts |
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
| bool SCR_BudgetEditorComponent.GetEntityPreviewBudgetCostsDontDiscardCampaignBudget | ( | SCR_EditableEntityUIInfo | entityUIInfo, |
| out notnull array< ref SCR_EntityBudgetValue > | budgetCosts ) |
| [in] | entityUIInfo | |
| [out] | budgetCosts |
| bool SCR_BudgetEditorComponent.GetEntitySourcePreviewBudgetCosts | ( | IEntityComponentSource | editableEntitySource, |
| out notnull array< ref SCR_EntityBudgetValue > | budgetCosts ) |
| [in] | editableEntitySource | |
| [out] | budgetCosts |
|
protected |
| void SCR_BudgetEditorComponent.GetEntityTypeBudgetCost | ( | EEditableEntityType | entityType, |
| out array< ref SCR_EntityBudgetValue > | budgetCosts ) |
Gets the minimun cost of the given entity type.
| [in] | entityType | entity type |
| [out] | budgetCosts | The minimum cost for the given budget type |
|
protected |
|
protected |
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
|
protected |
| bool SCR_BudgetEditorComponent.GetMaxBudgetValue | ( | EEditableEntityBudget | type, |
| out int | maxBudget ) |
Get max budget for this player per budget type.
| [in] | type | |
| [out] | maxBudget |
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
| bool SCR_BudgetEditorComponent.GetVehicleOccupiedBudgetCosts | ( | IEntityComponentSource | editableEntitySource, |
| EEditorPlacingFlags | placingFlags, | ||
| out notnull array< ref SCR_EntityBudgetValue > | budgetCosts, | ||
| bool | includeVehicleCost = true ) |
Return the cost of the occupants for a vehicle.
It takes the cost directly from the UIinfo
| [in] | editableEntitySource | The Vehicle Entity source to get budget from |
| [in] | placingFlags | To check which costs it needs to grab (Passengers and/or Vrew) |
| [out] | budgetCosts | Array of total budget costs |
| [in] | includeVehicleCost | If true will also return the vehicle budget cost |
| bool SCR_BudgetEditorComponent.GetVehicleOccupiedBudgetCosts | ( | SCR_EditableVehicleUIInfo | editableUIInfo, |
| EEditorPlacingFlags | placingFlags, | ||
| out notnull array< ref SCR_EntityBudgetValue > | budgetCosts ) |
| [in] | editableUIInfo | |
| [in] | placingFlags | |
| [out] | budgetCosts |
|
protected |
|
protected |
|
protected |
|
protected |
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
|
protected |
Get default budget definitions from core, budget values not synced on client, use GetCurrentBudget for updated budget.
Implemented in SCR_CampaignBuildingBudgetEditorComponent.
| void SCR_BudgetEditorComponent.ResetPreviewCost | ( | ) |
| void SCR_BudgetEditorComponent.RpcOwner_UpdateBudget | ( | EEditableEntityBudget | budgetType, |
| int | currentBudget ) |
| [in] | budgetType | |
| [in] | currentBudget |
| void SCR_BudgetEditorComponent.RpcServer_UpdateBudget | ( | ) |
| void SCR_BudgetEditorComponent.SetCurrentBudgetValue | ( | EEditableEntityBudget | budgetType, |
| int | value ) |
Set current budget value.
| [in] | budgetType | |
| [in] | value |
| void SCR_BudgetEditorComponent.SetMaxBudgetValue | ( | EEditableEntityBudget | type, |
| int | newValue ) |
Set max budget for this player for budget type.
| [in] | type | |
| [in] | newValue |
| void SCR_BudgetEditorComponent.SetMultiMaxBudgetValues | ( | notnull map< EEditableEntityBudget, int > | budgets, |
| int | playerChangingBudget ) |
| [in] | budgets | |
| [in] | playerChangingBudget | unused |
|
protected |
| void SCR_BudgetEditorComponent.UpdatePreviewCost | ( | notnull array< ref SCR_EntityBudgetValue > | budgetCosts | ) |
| [in] | budgetCosts |
|
static |
|
static |
| ref ScriptInvoker_EntityBudgetMaxReachedEvent SCR_BudgetEditorComponent.Event_OnBudgetMaxReached = new ScriptInvoker_EntityBudgetMaxReachedEvent() |
| ref ScriptInvoker_EntityBudgetMaxUpdatedEvent SCR_BudgetEditorComponent.Event_OnBudgetMaxUpdated = new ScriptInvoker_EntityBudgetMaxUpdatedEvent() |
| ref ScriptInvoker SCR_BudgetEditorComponent.Event_OnBudgetPreviewReset = new ScriptInvoker() |
| ref ScriptInvoker SCR_BudgetEditorComponent.Event_OnBudgetPreviewUpdated = new ScriptInvoker() |
| ref ScriptInvoker_EntityBudgetUpdatedEvent SCR_BudgetEditorComponent.Event_OnBudgetUpdated = new ScriptInvoker_EntityBudgetUpdatedEvent() |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |