Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SelectedEntitiesContextAction.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
11 {
12  override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
13  {
14  foreach (SCR_EditableEntityComponent entity : selectedEntities)
15  {
16  if (CanBeShown(entity, cursorWorldPosition, flags))
17  {
18  return true;
19  }
20  }
21  return false;
22  }
23 
24  override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
25  {
26  foreach (SCR_EditableEntityComponent entity : selectedEntities)
27  {
28  if (CanBePerformed(entity, cursorWorldPosition, flags))
29  {
30  return true;
31  }
32  }
33  return false;
34  }
35 
36  override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags, int param = -1)
37  {
38  if (!InitPerform()) return;
39 
40  foreach (SCR_EditableEntityComponent entity : selectedEntities)
41  {
42  if (CanBePerformed(entity, cursorWorldPosition, 0))
43  {
44  Perform(entity, cursorWorldPosition);
45  }
46  }
47  }
48 
49  override void PerformOwner(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags, int param = -1)
50  {
51  if (!InitPerform()) return;
52 
53  foreach (SCR_EditableEntityComponent entity : selectedEntities)
54  {
55  if (CanBePerformed(entity, cursorWorldPosition, 0))
56  {
57  PerformOwner(entity, cursorWorldPosition);
58  }
59  }
60  }
61 
66  bool CanBeShown(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
67  {
68  return true;
69  }
70 
71  bool CanBePerformed(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
72  {
73  return true;
74  }
75 
79  bool InitPerform()
80  {
81  return true;
82  }
83 
89  void Perform(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition)
90  {
91 
92  }
93 
99  void PerformOwner(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition)
100  {
101 
102  }
103 };
SCR_BaseContextAction
Definition: SCR_BaseContextAction.c:7
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_SelectedEntitiesContextAction
Definition: SCR_SelectedEntitiesContextAction.c:10
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468