Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_PlacingFlagToolbarAction.c
Go to the documentation of this file.
1 // Script File
4 {
5  [Attribute(uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(EEditorPlacingFlags))]
6  protected EEditorPlacingFlags m_PlacingFlag;
7 
8  protected void OnPlacingFlagsChange(EEditorPlacingFlags flag, bool toAdd)
9  {
10  if (flag == m_PlacingFlag)
11  Toggle(toAdd, toAdd);
12  }
13 
14  override void Track()
15  {
17  if (placingComponent)
18  {
19  placingComponent.GetOnPlacingFlagsChange().Insert(OnPlacingFlagsChange);
20  OnPlacingFlagsChange(m_PlacingFlag, placingComponent.HasPlacingFlag(m_PlacingFlag));
21  }
22  }
23  override void Untrack()
24  {
26  if (placingComponent)
27  {
28  placingComponent.GetOnPlacingFlagsChange().Remove(OnPlacingFlagsChange);
29  }
30  }
31  override bool IsServer()
32  {
33  return false;
34  }
35  override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
36  {
38  return placingComponent && placingComponent.IsPlacing() && placingComponent.IsPlacingFlagCompatible(m_PlacingFlag);
39  }
40  override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
41  {
42  return true;
43  }
44  override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
45  {
47  if (placingComponent)
48  placingComponent.TogglePlacingFlag(m_PlacingFlag);
49  }
50 };
SCR_PlacingFlagToolbarAction
Definition: SCR_PlacingFlagToolbarAction.c:3
Toggle
void Toggle()
Toggle hint. Hide it if it's shown, and open it again if it's hidden.
Definition: SCR_HintManagerComponent.c:216
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_BaseToggleToolbarAction
Definition: SCR_BaseToggleToolbarAction.c:3
EEditorPlacingFlags
EEditorPlacingFlags
Definition: EEditorPlacingFlags.c:1
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
SCR_PlacingEditorComponent
Definition: SCR_PlacingEditorComponent.c:118
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