DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionUpgradeTorchFromGasPump.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 }
7};
8
10{
12 {
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
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 Torch torch = Torch.Cast(item);
32
33 if ( fuelstation && fuelstation.HasFuelToGive() )
34 {
35 return torch.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};
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
class ActionTargets ActionTarget
protected ActionData m_ActionData
ItemBase m_MainItem
Definition ActionBase.c:28
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float ADD_FUEL_TO_TORCH
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602