Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_OpenAttributeWindowContextAction.c
Go to the documentation of this file.
3{
4 override bool IsServer()
5 {
6 return false;
7 }
8 override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
9 {
10 return hoveredEntity && !hoveredEntity.HasEntityFlag(EEditableEntityFlag.NON_INTERACTIVE) && !selectedEntities.IsEmpty();
11 }
12
13 override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
14 {
15 return hoveredEntity && !hoveredEntity.HasEntityFlag(EEditableEntityFlag.NON_INTERACTIVE) && !selectedEntities.IsEmpty();
16 }
17
18 override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
19 {
21 return;
22
23 SCR_AttributesManagerEditorComponent attributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
24 if (attributesManager)
25 {
26 set<SCR_EditableEntityComponent> children = new set<SCR_EditableEntityComponent>();
27 array<Managed> editedEntities = new array<Managed>; //--- Must be 'array', not 'set', otherwise it will confuse the attribute system
28 foreach (SCR_EditableEntityComponent entity: selectedEntities)
29 {
30 editedEntities.Insert(entity);
31
32 // For each entity, also select the children, but only if type system
33 // This is required so the properties of the children are also display
34 // Eg: Display spawner properties which is part of a composition
35 entity.GetChildren(children);
36 foreach(SCR_EditableEntityComponent child : children)
37 {
38 if (child.GetEntityType() == EEditableEntityType.SYSTEM)
39 editedEntities.Insert(child);
40 }
41 }
42 attributesManager.StartEditing(editedEntities);
43 }
44 }
45};
SCR_EAIThreatSectorFlags flags
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
bool HasEntityFlag(EEditableEntityFlag flag)
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
EEditableEntityFlag
Unique flags of the entity.