Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionrepaircarpartwithblowtorch.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 = ActionRepairCarPartWithBlowtorchCB;
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
ActionRepairCarPartWithBlowtorch
ActionRepairCarPartWithBlowtorchCB ActionRepairCarPartCB ActionRepairCarPartWithBlowtorch()
Definition: actionrepaircarpartwithblowtorch.c:11
OnStartAnimationLoopServer
override void OnStartAnimationLoopServer(ActionData action_data)
Definition: actionrepaircarpartwithblowtorch.c:30
UAMaxDistances
Definition: actionconstants.c:104
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actionrepaircarpartwithblowtorch.c:37
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionRepairCarPart
void ActionRepairCarPart()
Definition: actionrepaircarpart.c:25
CCTCursor
Definition: cctcursor.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionRepairCarPartWithBlowtorchCB
Definition: actionrepaircarpartwithblowtorch.c:1
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionrepaircarpartwithblowtorch.c:24
ActionRepairCarPartCB
Definition: actionrepaircarpart.c:11
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
OnEndServer
override void OnEndServer(ActionData action_data)
Definition: actionrepaircarpartwithblowtorch.c:44
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
CreateConditionComponents
override void CreateConditionComponents()
Definition: actionrepaircarpartwithblowtorch.c:18