4 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
9 ChimeraCharacter character = ChimeraCharacter.Cast(pUserEntity);
13 CharacterControllerComponent controller = character.GetCharacterController();
14 if (controller && controller.IsUnconscious())
17 BaseCompartmentSlot targetCompartment = GetCompartmentSlot();
18 if (!targetCompartment)
21 CompartmentAccessComponent compartmentAcess = character.GetCompartmentAccessComponent();
22 if (!compartmentAcess)
26 if (!compartmentAcess.GetOutVehicle(GetRelevantDoorIndex(pUserEntity),
true))
29 super.PerformAction(pOwnerEntity, pUserEntity);
33 override bool CanBePerformedScript(IEntity user)
35 ChimeraCharacter character = ChimeraCharacter.Cast(user);
39 CharacterControllerComponent controller = character.GetCharacterController();
40 if (controller && controller.IsUnconscious())
43 CompartmentAccessComponent compartmentAccess = character.GetCompartmentAccessComponent();
44 if (!compartmentAccess)
47 if (!compartmentAccess.IsInCompartment())
50 if (compartmentAccess.IsGettingIn() || compartmentAccess.IsGettingOut())
53 BaseCompartmentSlot compartment = compartmentAccess.GetCompartment();
57 BaseCompartmentSlot thisCompartment = GetCompartmentSlot();
58 return thisCompartment == compartment;
62 override bool CanBeShownScript(IEntity user)
64 return CanBePerformed(user);
68 override bool GetActionNameScript(out
string outName)
70 BaseCompartmentSlot compartment = GetCompartmentSlot();
78 outName = actionInfo.GetName();