Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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")]
5  protected bool m_bEditorPlaceAsOneGroup;
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  {
21  return m_bEditorPlaceAsOneGroup;
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  {
63  foreach (ECompartmentType type: m_aOccupantFillCompartmentTypes)
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 }
SCR_BaseContainerLocalizedTitleField
SCR_TabViewComponent SCR_ScriptedWidgetComponent SCR_BaseContainerLocalizedTitleField("m_sTabButtonContent")
Definition: SCR_TabViewComponent.c:963
SCR_EditableEntityUIInfo
Definition: SCR_EditableEntityUIInfo.c:2
ECompartmentType
ECompartmentType
Definition: ECompartmentType.c:7
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_EntityBudgetValue
Definition: SCR_EntityBudgetValue.c:2
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
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
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
SCR_EditableVehicleUIInfo
Definition: SCR_EditableVehicleUIInfo.c:2