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

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

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

class  ActionRepairItemWithBlowtorchCB
 

Функции

ActionRepairItemWithBlowtorchCB ActionContinuousBaseCB ActionRepairItemWithBlowtorch ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartAnimationLoopServer (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
30 {
33 Blowtorch bt = Blowtorch.Cast(item);
34
35 return bt.HasEnoughEnergyForRepair(UATimeSpent.BASEBUILDING_REPAIR_MEDIUM) && moduleRepairing && moduleRepairing.CanRepair(item, target.GetObject());
36 }
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition EntityAI.c:95
Definition ActionConstants.c:28
const float BASEBUILDING_REPAIR_MEDIUM
Definition ActionConstants.c:67
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки UATimeSpent::BASEBUILDING_REPAIR_MEDIUM, Class::CastTo() и GetPlugin().

◆ ActionRepairItemWithBlowtorch()

ActionRepairItemWithBlowtorchCB ActionContinuousBaseCB ActionRepairItemWithBlowtorch ( )
12 {
13 m_CallbackClass = ActionRepairItemWithBlowtorchCB;
14 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
15
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FLAME_REPAIR;
17 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
18 m_FullBody = true;
19 m_LockTargetOnUse = false;
20 m_Text = "#repair";
21 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionRepairItemWithBlowtorch.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions() и ItemBase::SetActions().

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionRepairItemWithBlowtorchCB;
14 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
15

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

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
24 {
25 m_ConditionItem = new CCINonRuined();
26 m_ConditionTarget = new CCTCursor(UAMaxDistances.REPAIR);
27 }
Definition CCINonRuined.c:2
Definition CCTCursor.c:2
Definition ActionConstants.c:106
const float REPAIR
Definition ActionConstants.c:109

Перекрестные ссылки UAMaxDistances::REPAIR.

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
61 {
62 super.OnEndServer(action_data);
63
64 action_data.m_MainItem.GetCompEM().SwitchOff();
65 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
46 {
47 super.OnFinishProgressServer(action_data);
48
49 ItemBase targetItem = ItemBase.Cast(action_data.m_Target.GetObject());
50 if (targetItem)
51 {
54 moduleRepairing.Repair(action_data.m_Player, action_data.m_MainItem, targetItem, m_SpecialtyWeight);
55 }
56
57 action_data.m_MainItem.GetCompEM().SwitchOff();
58 }
Definition InventoryItem.c:731

Перекрестные ссылки Class::CastTo() и GetPlugin().

◆ OnStartAnimationLoopServer()

override void OnStartAnimationLoopServer ( ActionData action_data)
39 {
40 super.OnStartAnimationLoopServer(action_data);
41
42 action_data.m_MainItem.GetCompEM().SwitchOn();
43 }