Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionstripcarriervest.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.DEFAULT);
6  }
7 };
8 
10 {
12  {
13  m_CallbackClass = ActionStripCarrierVestCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18  m_Text = "#strip_vest";
19  }
20 
21  override void CreateConditionComponents()
22  {
25  }
26 
27  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
28  {
29  if ( item.GetNumberOfItems() > 0 )
30  {
31  return false;
32  }
33  return true;
34  }
35 
36  override bool HasTarget()
37  {
38  return false;
39  }
40 
41  override void OnFinishProgressServer( ActionData action_data )
42  {
43  if ( action_data.m_MainItem && action_data.m_MainItem.GetHierarchyRootPlayer() == action_data.m_Player )
44  {
45  TStringArray results;
46  Class.CastTo(results, new TStringArray);
47  string itemName = action_data.m_MainItem.GetType();
48  EntityAI object;
49  results.Insert("PlateCarrierBlank");
50 
51  switch (itemName)
52  {
53  case "PlateCarrierHolster":
54  results.Insert("CarrierHolsterSolo");
55  break
56 
57  case "PlateCarrierPouches":
58  results.Insert("CarrierPouches");
59  break
60 
61  case "PlateCarrierComplete":
62  results.Insert("CarrierPouches");
63  results.Insert("CarrierHolsterSolo");
64  break
65  }
66 
67  for ( int i = 0; i < results.Count(); i++ )
68  {
69  object = EntityAI.Cast( GetGame().CreateObjectEx(results.Get(i), action_data.m_Player.GetPosition(), ECE_PLACE_ON_SURFACE) );
70  object.SetHealth("","",action_data.m_MainItem.GetHealth("",""));
71  }
72  action_data.m_MainItem.Delete();
73  action_data.m_MainItem = NULL;
74  }
75  }
76 };
ItemBase
Definition: inventoryitem.c:730
ActionStripCarrierVestCB
Definition: actionstripcarriervest.c:1
GetGame
proto native CGame GetGame()
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionStripCarrierVest
Definition: actionstripcarriervest.c:9
CCTNone
Definition: cctnone.c:1
ECE_PLACE_ON_SURFACE
const int ECE_PLACE_ON_SURFACE
Definition: centraleconomy.c:37
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
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
array< string >
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
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
EntityAI
Definition: building.c:5