Arma Reforger Script API
|
Base container class for editor context actions which apply to selected entities. More...
Public Member Functions | |
override bool | CanBeShown (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags) |
Determine if action can be shown with passed hovered entity and selected entitites. | |
override bool | CanBePerformed (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags) |
Determine if action can be performed with passed hovered entity and selected entitites. | |
override void | Perform (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags, int param=-1) |
Perform action. | |
override void | PerformOwner (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags, int param=-1) |
bool | CanBeShown (SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags) |
Helper function for actions that should be performed on multiple entities, avoids having foreach loops in each subclass. | |
bool | CanBePerformed (SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags) |
bool | InitPerform () |
Helper function to execute code before performing the action on all entities, called only once (eg. | |
void | Perform (SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition) |
Perform function for each selected entity. | |
void | PerformOwner (SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition) |
Perform function for each selected entity, executed on owner, player that executed the action. | |
Public Member Functions inherited from SCR_BaseContextAction | |
override bool | IsServer () |
Should action be sent to server. | |
Public Member Functions inherited from SCR_BaseEditorAction | |
bool | IsEnabled () |
bool | CanBeShown (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags) |
Determine if action can be shown with passed hovered entity and selected entitites. | |
bool | CanBePerformed (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags) |
Determine if action can be performed with passed hovered entity and selected entitites. | |
void | Perform (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags, int param=-1) |
Perform action. | |
void | PerformOwner (SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags, int param=-1) |
SCR_UIInfo | GetInfo () |
EEditorActionType | GetActionType () |
EEditorActionGroup | GetActionGroup () |
string | GetShortcut () |
Get action shortcut that triggers this action. | |
void | SetShortcutRef (string shortcutRef) |
Set shortcut reference - it's shown in GUI, but not actually listened to. | |
int | GetOrder () |
Get order of this entity, can be any integer value including negative. | |
bool | IsServer () |
Should action be sent to server. | |
int | GetParam () |
Get custom param which can be used to pass extra information to performed action. | |
array< ref SCR_BaseEditorEffect > | GetEffects () |
Get effects tied to the action. | |
void | AddShortcut (SCR_BaseActionsEditorComponent actionsManager) |
void | RemoveShortcut () |
bool | CheckAndSetCooldown () |
Check if action is on cooldown and if not set action on cooldown The cooldown will never be set if cooldownTime is equal or less than 0. | |
bool | IsOnCooldown () |
Check if action is on cooldown. | |
void | ~SCR_BaseEditorAction () |
Additional Inherited Members | |
Protected Member Functions inherited from SCR_BaseEditorAction | |
void | OnShortcut () |
void | ActivateCooldown () |
void | UpdateCooldown () |
void | OnCooldownDone () |
Protected Attributes inherited from SCR_BaseEditorAction | |
bool | m_bEnabled |
ref SCR_UIInfo | m_Info |
EEditorActionType | m_ActionType |
EEditorActionGroup | m_ActionGroup |
int | m_iOrder |
string | m_sShortcut |
bool | m_bEnableShortcutLogics |
ref array< ref SCR_BaseEditorEffect > | m_Effects |
SCR_BaseActionsEditorComponent | m_ActionsManager |
string | m_sShortcutRef |
float | m_fCooldownTime |
float | m_fCurrentCooldownTime |
float | m_fCooldownUpdateFreq = 50 |
bool | m_bShowOnCooldownNotification |
bool | m_bIsOnCooldown |
Base container class for editor context actions which apply to selected entities.
override bool SCR_SelectedEntitiesContextAction.CanBePerformed | ( | SCR_EditableEntityComponent | hoveredEntity, |
notnull set< SCR_EditableEntityComponent > | selectedEntities, | ||
vector | cursorWorldPosition, | ||
int | flags | ||
) |
Determine if action can be performed with passed hovered entity and selected entitites.
Implements SCR_BaseEditorAction.
Implemented in SCR_CaptureBasesContextAction, SCR_SupplyBasesContextAction, SCR_CreateLayerContextAction, and SCR_ChooseAndSpawnOccupantsContextAction.
bool SCR_SelectedEntitiesContextAction.CanBePerformed | ( | SCR_EditableEntityComponent | selectedEntity, |
vector | cursorWorldPosition, | ||
int | flags | ||
) |
Implemented in SCR_BleedCharacterContextAction, SCR_BombardContextAction, SCR_CampaignBuildingDeleteSelectedContextAction, SCR_CopyContextAction, SCR_CutContextAction, SCR_DefendContextAction, SCR_DeleteSelectedContextAction, SCR_DisembarkContextAction, SCR_FuelEntityContextAction, SCR_HealEntitiesContextAction, SCR_KickPlayerContextAction, SCR_NeutralizeEntityContextAction, SCR_OrientToSeaNormalContextAction, SCR_OrientToTerrainContextAction, SCR_RemoveWeaponContextAction, SCR_ResupplyContextAction, SCR_SelectOccupantsContextAction, SCR_SetFireVehicleContextAction, SCR_SnapToTerrainContextAction, SCR_SpawnOccupantsContextAction, SCR_TaskActivateContextAction, SCR_TaskContextAction, and SCR_RemoveBleedCharacterContextAction.
override bool SCR_SelectedEntitiesContextAction.CanBeShown | ( | SCR_EditableEntityComponent | hoveredEntity, |
notnull set< SCR_EditableEntityComponent > | selectedEntities, | ||
vector | cursorWorldPosition, | ||
int | flags | ||
) |
Determine if action can be shown with passed hovered entity and selected entitites.
Implements SCR_BaseEditorAction.
Implemented in SCR_CaptureBasesContextAction, SCR_SupplyBasesContextAction, SCR_CreateLayerContextAction, and SCR_ChooseAndSpawnOccupantsContextAction.
bool SCR_SelectedEntitiesContextAction.CanBeShown | ( | SCR_EditableEntityComponent | selectedEntity, |
vector | cursorWorldPosition, | ||
int | flags | ||
) |
Helper function for actions that should be performed on multiple entities, avoids having foreach loops in each subclass.
selectedEntity | Current selectedEntities iteration |
Implemented in SCR_BleedCharacterContextAction, SCR_BombardContextAction, SCR_CampaignBuildingDeleteSelectedContextAction, SCR_CopyContextAction, SCR_CutContextAction, SCR_DefendContextAction, SCR_DeleteSelectedContextAction, SCR_DisembarkContextAction, SCR_FuelEntityContextAction, SCR_HealEntitiesContextAction, SCR_KickPlayerContextAction, SCR_NeutralizeEntityContextAction, SCR_OrientToSeaNormalContextAction, SCR_OrientToTerrainContextAction, SCR_RemoveWeaponContextAction, SCR_ResupplyContextAction, SCR_SelectOccupantsContextAction, SCR_SetFireVehicleContextAction, SCR_SnapToTerrainContextAction, SCR_SpawnOccupantsContextAction, SCR_TaskActivateContextAction, SCR_TaskContextAction, and SCR_RemoveBleedCharacterContextAction.
bool SCR_SelectedEntitiesContextAction.InitPerform | ( | ) |
Helper function to execute code before performing the action on all entities, called only once (eg.
clear selection)
override void SCR_SelectedEntitiesContextAction.Perform | ( | SCR_EditableEntityComponent | hoveredEntity, |
notnull set< SCR_EditableEntityComponent > | selectedEntities, | ||
vector | cursorWorldPosition, | ||
int | flags, | ||
int | param = -1 |
||
) |
Perform action.
Implements SCR_BaseEditorAction.
Implemented in SCR_CaptureBasesContextAction, SCR_SupplyBasesContextAction, SCR_CreateLayerContextAction, SCR_CampaignBuildingDeleteSelectedContextAction, SCR_ChooseAndSpawnOccupantsContextAction, SCR_KickPlayerContextAction, and SCR_SpawnOccupantsContextAction.
void SCR_SelectedEntitiesContextAction.Perform | ( | SCR_EditableEntityComponent | selectedEntity, |
vector | cursorWorldPosition | ||
) |
Perform function for each selected entity.
selectedEntity | Current selectedEntities iteration |
cursorWorldPosition | Cursor world position |
Implemented in SCR_BleedCharacterContextAction, SCR_BombardContextAction, SCR_CopyContextAction, SCR_CutContextAction, SCR_DefendContextAction, SCR_DeleteSelectedContextAction, SCR_DisembarkContextAction, SCR_FuelEntityContextAction, SCR_HealEntitiesContextAction, SCR_NeutralizeEntityContextAction, SCR_OrientToSeaNormalContextAction, SCR_OrientToTerrainContextAction, SCR_RemoveWeaponContextAction, SCR_ResupplyContextAction, SCR_SelectOccupantsContextAction, SCR_SetFireVehicleContextAction, SCR_SnapToTerrainContextAction, SCR_SpawnOccupantsContextAction, SCR_TaskActivateContextAction, SCR_TaskContextAction, and SCR_RemoveBleedCharacterContextAction.
override void SCR_SelectedEntitiesContextAction.PerformOwner | ( | SCR_EditableEntityComponent | hoveredEntity, |
notnull set< SCR_EditableEntityComponent > | selectedEntities, | ||
vector | cursorWorldPosition, | ||
int | flags, | ||
int | param = -1 |
||
) |
Implements SCR_BaseEditorAction.
void SCR_SelectedEntitiesContextAction.PerformOwner | ( | SCR_EditableEntityComponent | selectedEntity, |
vector | cursorWorldPosition | ||
) |
Perform function for each selected entity, executed on owner, player that executed the action.
selectedEntity | Current selectedEntities iteration |
cursorWorldPosition | Cursor world position |