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;
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;
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;
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;
19 bool GetEditorPlaceAsOneGroup()
21 return m_bEditorPlaceAsOneGroup;
28 int GetOccupantFillCompartmentTypes(out notnull array<ECompartmentType> compartmentTypes)
30 compartmentTypes.Clear();
31 compartmentTypes.Copy(m_aOccupantFillCompartmentTypes);
33 return compartmentTypes.Count();
39 bool CanFillWithCrew()
41 return CanFillWithGivenTypes(SCR_BaseCompartmentManagerComponent.CREW_COMPARTMENT_TYPES);
47 bool CanFillWithPassengers()
49 return CanFillWithGivenTypes(SCR_BaseCompartmentManagerComponent.PASSENGER_COMPARTMENT_TYPES);
56 bool CanFillWithGivenTypes(array<ECompartmentType> typesToCheck)
58 if (m_aOccupantFillCompartmentTypes.IsEmpty() || !typesToCheck || typesToCheck.IsEmpty())
65 if (
type == checkType)
76 void GetFillBudgetCostsOfCrew(out notnull array<ref SCR_EntityBudgetValue> budgetCosts)
80 if (!CanFillWithCrew())
84 budgetCosts.Insert(budget);
90 void GetFillBudgetCostsOfPassengers(out notnull array<ref SCR_EntityBudgetValue> budgetCosts)
94 if (!CanFillWithPassengers())
98 budgetCosts.Insert(budget);