DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionRepairCarEngine.c

См. исходные тексты.

Структуры данных

class  ActionRepairCarEngineCB
 
class  RepairCarEngineActionReciveData
 

Функции

void ActionRepairCarEngine ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void AdjustVehicleHealthServer (ActionData action_data)
 

Переменные

ActionRepairCarEngineCB m_LastValidType
 
int m_LastValidComponentIndex = -1
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
21 {
22 if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
23 return false;
24
25 CarScript car = CarScript.Cast(target.GetObject());
26 if (!car || car.EngineIsOn())
27 return false;
28
29 if (GetGame().IsDedicatedServer())
30 return true;
31
32 if (m_LastValidType != target.Type() || m_LastValidComponentIndex != target.GetComponentIndex() || m_CurrentDamageZone == "")
33 {
34 string damageZone = "";
36 car.GetActionComponentNameList(target.GetComponentIndex(), selections, LOD.NAME_VIEW);
37
38 foreach (string selection : selections)
39 {
40 if (car && DamageSystem.GetDamageZoneFromComponentName(car, selection, damageZone))
41 {
42 if (damageZone == "Engine")
43 {
44 int zoneHP = car.GetHealthLevel(damageZone);
46 {
47 m_CurrentDamageZone = damageZone;
48 m_LastValidComponentIndex = target.GetComponentIndex();
49
50 return true;
51 }
52 }
53 }
54 }
55 }
56
57 return false;
58 }
int m_LastValidComponentIndex
Definition ActionRepairCarEngine.c:7
ActionRepairCarEngineCB m_LastValidType
eBrokenLegs
Definition EBrokenLegs.c:2
Definition CivilianSedan.c:2
Definition constants.c:638
LOD class.
Definition gameplay.c:203
static const string NAME_VIEW
Definition gameplay.c:206
Definition EntityAI.c:95
proto native CGame GetGame()
const int STATE_RUINED
Definition constants.c:807
const int STATE_WORN
Definition constants.c:810

Перекрестные ссылки GetGame(), m_LastValidComponentIndex, m_LastValidType, LOD::NAME_VIEW, GameConstants::STATE_RUINED и GameConstants::STATE_WORN.

◆ ActionRepairCarEngine()

void ActionRepairCarEngine ( )
10 {
11 m_CallbackClass = ActionRepairCarEngineCB;
12 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
13 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
14 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
15 m_FullBody = true;
16 m_LockTargetOnUse = false;
17 m_Text = "#repair";
18 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionRepairCarEngine.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ AdjustVehicleHealthServer()

override void AdjustVehicleHealthServer ( ActionData action_data)
61 {
62 super.AdjustVehicleHealthServer(action_data);
63
64 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, UADamageApplied.BUILD);
65 }
Definition ActionConstants.c:142
const float BUILD
Definition ActionConstants.c:143

Перекрестные ссылки UADamageApplied::BUILD.

Переменные

◆ m_LastValidComponentIndex

int m_LastValidComponentIndex = -1

Используется в ActionCondition().

◆ m_LastValidType

ActionRepairCarEngineCB m_LastValidType

Используется в ActionCondition().