DayZ 1.24
Loading...
Searching...
No Matches
ActionStripCarrierVest.c
Go to the documentation of this file.
8
10{
20
26
27 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
28 {
29 if (item.GetNumberOfItems() > 0)
30 return false;
31 return true;
32 }
33
34 override bool HasTarget()
35 {
36 return false;
37 }
38
40 {
41 if (action_data.m_MainItem && action_data.m_MainItem.GetHierarchyRootPlayer() == action_data.m_Player)
42 {
45 string itemName = action_data.m_MainItem.GetType();
47 results.Insert("PlateCarrierBlank");
48
49 switch (itemName)
50 {
51 case "PlateCarrierHolster":
52 results.Insert("CarrierHolsterSolo");
53 break
54
55 case "PlateCarrierPouches":
56 results.Insert("CarrierPouches");
57 break
58
59 case "PlateCarrierComplete":
60 results.Insert("CarrierPouches");
61 results.Insert("CarrierHolsterSolo");
62 break
63 }
64
65 for (int i = 0; i < results.Count(); i++)
66 {
67 object = EntityAI.Cast(GetGame().CreateObjectEx(results.Get(i), action_data.m_Player.GetPosition(), ECE_PLACE_ON_SURFACE));
68 object.SetHealth("", "", action_data.m_MainItem.GetHealth("", ""));
69 }
70 action_data.m_MainItem.Delete();
71 action_data.m_MainItem = NULL;
72 }
73 }
74};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
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
const int ECE_PLACE_ON_SURFACE
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Super root of all classes in Enforce script.
Definition EnScript.c:11
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.