Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditableVehicleUIInfo.c
Go to the documentation of this file.
3{
4 [Attribute("1", desc: "If true when placing the entity in editor this will make sure that both crew and passengers are spawned as one group. Else passengers and crew are split in two groups")]
6
7 [Attribute(desc: "Auto filled by plugin. Compartments Types that can be filled with characters within when using the editor to place the vehicle.", uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ECompartmentType))]
8 protected ref array<ECompartmentType> m_aOccupantFillCompartmentTypes;
9
10 [Attribute("", category: "Editable Entity", desc: "Auto filled by plugin. Contains budget costs of default prefabs for pilot/crew slots")]
11 private ref array<ref SCR_EntityBudgetValue> m_aCrewEntityBudgetCost;
12
13 [Attribute("", category: "Editable Entity", desc: "Auto filled by plugin. Contains budget costs of default prefabs for passenger slots")]
14 private ref array<ref SCR_EntityBudgetValue> m_aPassengerEntityBudgetCost;
15
16 //------------------------------------------------------------------------------------------------
19 bool GetEditorPlaceAsOneGroup()
20 {
22 }
23
24 //------------------------------------------------------------------------------------------------
28 int GetOccupantFillCompartmentTypes(out notnull array<ECompartmentType> compartmentTypes)
29 {
30 compartmentTypes.Clear();
31 compartmentTypes.Copy(m_aOccupantFillCompartmentTypes);
32
33 return compartmentTypes.Count();
34 }
35
36 //------------------------------------------------------------------------------------------------
39 bool CanFillWithCrew()
40 {
41 return CanFillWithGivenTypes(SCR_BaseCompartmentManagerComponent.CREW_COMPARTMENT_TYPES);
42 }
43
44 //------------------------------------------------------------------------------------------------
47 bool CanFillWithPassengers()
48 {
49 return CanFillWithGivenTypes(SCR_BaseCompartmentManagerComponent.PASSENGER_COMPARTMENT_TYPES);
50 }
51
52 //------------------------------------------------------------------------------------------------
56 bool CanFillWithGivenTypes(array<ECompartmentType> typesToCheck)
57 {
58 if (m_aOccupantFillCompartmentTypes.IsEmpty() || !typesToCheck || typesToCheck.IsEmpty())
59 return false;
60
61 foreach (ECompartmentType checkType: typesToCheck)
62 {
64 {
65 if (type == checkType)
66 return true;
67 }
68 }
69
70 return false;
71 }
72
73 //------------------------------------------------------------------------------------------------
76 void GetFillBudgetCostsOfCrew(out notnull array<ref SCR_EntityBudgetValue> budgetCosts)
77 {
78 budgetCosts.Clear();
79
80 if (!CanFillWithCrew())
81 return;
82
83 foreach(SCR_EntityBudgetValue budget: m_aCrewEntityBudgetCost)
84 budgetCosts.Insert(budget);
85 }
86
87 //------------------------------------------------------------------------------------------------
90 void GetFillBudgetCostsOfPassengers(out notnull array<ref SCR_EntityBudgetValue> budgetCosts)
91 {
92 budgetCosts.Clear();
93
94 if (!CanFillWithPassengers())
95 return;
96
97 foreach(SCR_EntityBudgetValue budget: m_aPassengerEntityBudgetCost)
98 budgetCosts.Insert(budget);
99 }
100}
ECompartmentType
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
SCR_PlayerCommandingConfigActionPair Managed SCR_BaseContainerLocalizedTitleField("m_sCommandName")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ref array< ECompartmentType > m_aOccupantFillCompartmentTypes
SCR_FieldOfViewSettings Attribute