DayZ 1.24
Loading...
Searching...
No Matches
ActionDeCraftDrysackBag.c
Go to the documentation of this file.
20
22 {
25 }
26
27 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
28 {
29 return item.IsEmpty();
30 }
31
32 override bool HasTarget()
33 {
34 return false;
35 }
36
38 {
39 EntityAI mainItem = action_data.m_MainItem;
40
41 string color = mainItem.ConfigGetString("color");
42 string className = "WaterproofBag_" + color;
43
44 EntityAI result1 = action_data.m_Player.SpawnEntityOnGroundPos(className, action_data.m_Player.GetPosition());
45 EntityAI result2 = action_data.m_Player.SpawnEntityOnGroundPos("Rope", action_data.m_Player.GetPosition());
46
47 if (!result1 || !result2)
48 return;
49
50 MiscGameplayFunctions.TransferItemProperties(mainItem, result1);
51 MiscGameplayFunctions.TransferItemProperties(mainItem, result2);
52
53 action_data.m_MainItem.Delete();
54 }
55}
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
bool HasTarget()
Definition ActionBase.c:210
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
ActionDeCraftDrysackBagCB ActionContinuousBaseCB ActionDeCraftDrysackBag()
ActionData m_ActionData
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DEFAULT_DECRAFT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597