DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ActionCondition()

override bool ActionSwitchLights::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

См. определение в файле ActionSwitchLights.c строка 26

27 {
28 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
29 if (vehCommand)
30 {
31 Transport transport = vehCommand.GetTransport();
32 if (transport)
33 {
34 if (transport.CrewMemberIndex(player) == DayZPlayerConstants.VEHICLESEAT_DRIVER)
35 {
36 if (!transport.LightIsOn())
37 {
38 if (transport.NeedElectricitySourceDevice())
39 {
40 EntityAI neededItem = transport.GetElectricitySourceDevice();
41
42 if (neededItem && !neededItem.IsRuined())
43 return neededItem.GetCompEM() && neededItem.GetCompEM().GetEnergy() > 0;
44 }
45 else
46 return true;
47 }
48 else
49 return true;
50 }
51 }
52 }
53
54 return false;
55 }
class LogManager EntityAI
proto native Transport GetTransport()
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602

Перекрестные ссылки ActionTarget() и HumanCommandVehicle::GetTransport().