10 override void CreateConditionComponents()
16 override typename GetInputType()
21 override bool HasProgress()
35 if (!
Class.CastTo(trans, target.GetObject()))
40 if (player.GetItemInHands() && player.GetItemInHands().IsHeavyBehaviour())
45 if (player.GetCommand_Vehicle())
50 int componentIndex = target.GetComponentIndex();
51 int crew_index = trans.CrewPositionIndex(componentIndex);
57 Human crew = trans.CrewMember(crew_index);
63 if (!trans.CrewCanGetThrough(crew_index) || !trans.IsAreaAtDoorFree(crew_index))
69 trans.GetActionComponentNameList(componentIndex, selections);
71 for (
int i = 0; i < selections.Count(); i++)
73 if (trans.CanReachSeatFromDoors(selections[i], player.GetPosition(), 1.0))
84 super.Start( action_data );
87 int componentIndex = action_data.m_Target.GetComponentIndex();
88 int crew_index = trans.CrewPositionIndex(componentIndex);
91 int seat = trans.GetSeatAnimationType(crew_index);
92 HumanCommandVehicle vehCommand = action_data.m_Player.StartCommand_Vehicle(trans, crew_index, seat);
95 vehCommand.SetVehicleType(trans.GetAnimInstance());
98 if (action_data.m_Player.GetInventory())
100 action_data.m_Player.GetInventory().LockInventory(LOCK_FROM_SCRIPT);
105 override void OnStartServer(
ActionData action_data)
110 car.ForceUpdateLightsStart();
114 override bool CanBeUsedInRestrain()
119 override void OnUpdate(
ActionData action_data)
122 if (action_data.m_State ==
UA_START)
124 if (!action_data.m_Player.GetCommand_Vehicle() || !action_data.m_Player.GetCommand_Vehicle().IsGettingIn())
131 override int GetActionCategory()
136 override void OnEndClient(
ActionData action_data)
138 if (action_data.m_Player.GetInventory())
140 action_data.m_Player.GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
144 override void OnEndServer(
ActionData action_data)
146 if (action_data.m_Player.GetInventory())
148 action_data.m_Player.GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
154 car.ForceUpdateLightsEnd();