Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
EditablePrefabsLabel_GroupSize.c
Go to the documentation of this file.
3{
4 [Attribute(desc:"GROUPSIZE_SMALL label will be added to groups >= x entities")]
5 protected int m_GroupSizeSmall;
6
7 [Attribute(desc:"GROUPSIZE_MEDIUM label will be added to groups >= x entities")]
8 protected int m_GroupSizeMedium;
9
10 [Attribute(desc:"GROUPSIZE_LARGE label will be added to groups >= x entities")]
11 protected int m_GroupSizeLarge;
12
13 //------------------------------------------------------------------------------------------------
14 override bool GetLabelValid(WorldEditorAPI api, IEntitySource entitySource, IEntityComponentSource componentSource, string targetPath, EEditableEntityType entityType, notnull array<EEditableEntityLabel> authoredLabels, out EEditableEntityLabel label)
15 {
16 if (entityType != EEditableEntityType.GROUP)
17 return false;
18
19 array<ResourceName> memberPrefabs;
20 entitySource.Get("m_aUnitPrefabSlots", memberPrefabs);
21
22 if (!memberPrefabs || memberPrefabs.IsEmpty())
23 return false;
24
25 int memberCount = memberPrefabs.Count();
26 if (memberCount >= m_GroupSizeLarge)
27 {
28 label = EEditableEntityLabel.GROUPSIZE_LARGE;
29 return true;
30 }
31 else if (memberCount >= m_GroupSizeMedium)
32 {
33 label = EEditableEntityLabel.GROUPSIZE_MEDIUM;
34 return true;
35 }
36 else if (memberCount >= m_GroupSizeSmall)
37 {
38 label = EEditableEntityLabel.GROUPSIZE_SMALL;
39 return true;
40 }
41
42 return false;
43 }
44}
EEditableEntityLabel
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override bool GetLabelValid(WorldEditorAPI api, IEntitySource entitySource, IEntityComponentSource componentSource, string targetPath, EEditableEntityType entityType, notnull array< EEditableEntityLabel > authoredLabels, out EEditableEntityLabel label)
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
SCR_FieldOfViewSettings Attribute