Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionupgradetorchfromgaspump.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.ADD_FUEL_TO_TORCH);
6  }
7 };
8 
10 {
12  {
13  m_CallbackClass = ActionUpgradeTorchFromGasPumpCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18  m_Text = "#str_upgrade_torch_fuel";
19  }
20 
21  override void CreateConditionComponents()
22  {
23 
26  }
27 
28  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
29  {
30  Land_FuelStation_Feed fuelstation = Land_FuelStation_Feed.Cast(target.GetObject());
31  FlammableBase flammable = FlammableBase.Cast(item);
32 
33  if ( flammable && fuelstation && fuelstation.HasFuelToGive() )
34  {
35  return flammable.CanReceiveUpgrade();
36  }
37 
38  return false;
39  }
40 
41  override void OnFinishProgressServer( ActionData action_data )
42  {
43  Torch torch = Torch.Cast(action_data.m_MainItem);
44 
45  if (torch)
46  {
47  //torch.ConsumeRag();
48  torch.Upgrade(null);
49  }
50  }
51 };
ItemBase
Definition: inventoryitem.c:730
ActionUpgradeTorchFromGasPump
Definition: actionupgradetorchfromgaspump.c:9
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
CCTDummy
Definition: cctdummy.c:1
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionUpgradeTorchFromGasPumpCB
Definition: actionupgradetorchfromgaspump.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionContinuousBase
Definition: actioncontinuousbase.c:132
CCINonRuined
Definition: ccinonruined.c:1
FlammableBase
Definition: torch.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53