Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionrepaircarenginewithblowtorch.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.BASEBUILDING_REPAIR_MEDIUM);
6  }
7 }
8 
10 {
12  {
13  m_CallbackClass = ActionRepairCarEngineWithBlowtorchCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FLAME_REPAIR;
15  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
16  }
17 
18  override void CreateConditionComponents()
19  {
22  }
23 
24  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
25  {
26  Blowtorch bt = Blowtorch.Cast(item);
27  return super.ActionCondition(player, target, item) && bt.HasEnoughEnergyForRepair(UATimeSpent.BASEBUILDING_REPAIR_MEDIUM));
28  }
29 
30  override void OnStartAnimationLoopServer(ActionData action_data)
31  {
32  super.OnStartAnimationLoopServer(action_data);
33 
34  action_data.m_MainItem.GetCompEM().SwitchOn();
35  }
36 
37  override void OnFinishProgressServer(ActionData action_data)
38  {
39  super.OnFinishProgressServer(action_data);
40 
41  action_data.m_MainItem.GetCompEM().SwitchOff();
42  }
43 
44  override void OnEndServer(ActionData action_data)
45  {
46  super.OnEndServer(action_data);
47 
48  action_data.m_MainItem.GetCompEM().SwitchOff();
49  }
50 }
ItemBase
Definition: inventoryitem.c:730
CAContinuousTime
Definition: cacontinuoustime.c:1
ActionRepairCarEngineCB
Definition: actionrepaircarengine.c:11
ActionRepairCarEngine
void ActionRepairCarEngine()
Definition: actionrepaircarengine.c:25
ActionRepairCarEngineWithBlowtorchCB
Definition: actionrepaircarenginewithblowtorch.c:1
UAMaxDistances
Definition: actionconstants.c:104
OnStartAnimationLoopServer
override void OnStartAnimationLoopServer(ActionData action_data)
Definition: actionrepaircarenginewithblowtorch.c:30
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionrepaircarenginewithblowtorch.c:24
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actionrepaircarenginewithblowtorch.c:37
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CreateConditionComponents
override void CreateConditionComponents()
Definition: actionrepaircarenginewithblowtorch.c:18
OnEndServer
override void OnEndServer(ActionData action_data)
Definition: actionrepaircarenginewithblowtorch.c:44
CCTCursor
Definition: cctcursor.c:1
UATimeSpent
Definition: actionconstants.c:26
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
CCINonRuined
Definition: ccinonruined.c:1
ActionRepairCarEngineWithBlowtorch
ActionRepairCarEngineWithBlowtorchCB ActionRepairCarEngineCB ActionRepairCarEngineWithBlowtorch()
Definition: actionrepaircarenginewithblowtorch.c:11
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53