DayZ 1.24
Loading...
Searching...
No Matches
ActionDeCraftDrysackBag.c File Reference

Go to the source code of this file.

Classes

class  ActionDeCraftDrysackBagCB
 

Functions

ActionDeCraftDrysackBagCB ActionContinuousBaseCB ActionDeCraftDrysackBag ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool HasTarget ()
 
override void OnFinishProgressServer (ActionData action_data)
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 27 of file ActionDeCraftDrysackBag.c.

28 {
29 return item.IsEmpty();
30 }

◆ ActionDeCraftDrysackBag()

Definition at line 1 of file ActionDeCraftDrysackBag.c.

12 {
13 m_CallbackClass = ActionDeCraftDrysackBagCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18 m_Text = "#dismantle";
19 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and DrysackBag_ColorBase::SetActions().

◆ CreateActionComponent()

override void ActionDeCraftDrysackBag::CreateActionComponent ( )

Definition at line 12 of file ActionDeCraftDrysackBag.c.

12 {
13 m_CallbackClass = ActionDeCraftDrysackBagCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;

References m_FullBody, m_SpecialtyWeight, m_StanceMask, m_Text, and UASoftSkillsWeight::ROUGH_HIGH.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 21 of file ActionDeCraftDrysackBag.c.

22 {
25 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool HasTarget ( )

Definition at line 32 of file ActionDeCraftDrysackBag.c.

33 {
34 return false;
35 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 37 of file ActionDeCraftDrysackBag.c.

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 }