6 BaseCompartmentManagerComponent compartmentManager = BaseCompartmentManagerComponent.Cast(vehicleEntity.FindComponent(BaseCompartmentManagerComponent));
7 if (!compartmentManager)
return false;
9 array<BaseCompartmentSlot> compartments =
new array<BaseCompartmentSlot>;
10 compartmentManager.GetCompartments(compartments);
12 foreach (BaseCompartmentSlot slot : compartments)
14 if (slot.GetOccupant() !=
null || slot.AttachedOccupant() !=
null)
24 return selectedEntity !=
null && selectedEntity.GetEntityType() ==
EEditableEntityType.VEHICLE;
30 return owner !=
null && EntityIsOccupied(owner);
39 BaseCompartmentManagerComponent compartmentManager = BaseCompartmentManagerComponent.Cast(owner.FindComponent(BaseCompartmentManagerComponent));
40 if (!compartmentManager)
47 array<BaseCompartmentSlot> compartments =
new array<BaseCompartmentSlot>;
48 compartmentManager.GetCompartments(compartments);
50 set<SCR_EditableEntityComponent> toSelect =
new set<SCR_EditableEntityComponent>();
51 foreach (BaseCompartmentSlot slot: compartments)
53 IEntity occupant = slot.GetOccupant();
55 occupant = slot.AttachedOccupant();
62 toSelect.Insert(editableOccupant);
65 filter.Replace(toSelect);