DayZ 1.24
Loading...
Searching...
No Matches
ActionRepairItemWithBlowtorch.c
Go to the documentation of this file.
22
28
29 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 }
37
39 {
40 super.OnStartAnimationLoopServer(action_data);
41
42 action_data.m_MainItem.GetCompEM().SwitchOn();
43 }
44
46 {
47 super.OnFinishProgressServer(action_data);
48
49 ItemBase targetItem = ItemBase.Cast(action_data.m_Target.GetObject());
50 if (targetItem)
51 {
55 }
56
57 action_data.m_MainItem.GetCompEM().SwitchOff();
58 }
59
61 {
62 super.OnEndServer(action_data);
63
64 action_data.m_MainItem.GetCompEM().SwitchOff();
65 }
66}
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
void OnEndServer(ActionData action_data)
Definition ActionBase.c:962
bool m_LockTargetOnUse
Definition ActionBase.c:51
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionRepairItemWithBlowtorchCB ActionContinuousBaseCB ActionRepairItemWithBlowtorch()
PluginBase GetPlugin(typename plugin_type)
ActionData m_ActionData
void OnStartAnimationLoopServer(ActionData action_data)
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Super root of all classes in Enforce script.
Definition EnScript.c:11
const float REPAIR
const float BASEBUILDING_REPAIR_MEDIUM
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.