Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actioncraftimprovisedheadcover.c
Go to the documentation of this file.
2{
3 private const float TIME_TO_CRAFT_CLOTHES = 5.0;
4
5 override void CreateActionComponent()
6 {
7 m_ActionData.m_ActionComponent = new CAContinuousTime(TIME_TO_CRAFT_CLOTHES);
8 }
9};
10
11
13{
15 {
17 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
18 m_FullBody = true;
19 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
20 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_HIGH;
21 m_Text = "#STR_CraftImprovisedHeadCover";
22 }
23
24 override void CreateConditionComponents()
25 {
28 }
29
30 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
31 {
32 if( item.GetQuantity() >= 2 )
33 {
34 return true;
35 }
36 return false;
37 }
38
39 override bool HasTarget()
40 {
41 return false;
42 }
43
44 override void OnFinishProgressServer( ActionData action_data )
45 {
46 EntityAI item_ingredient = action_data.m_MainItem;
47 EntityAI cover = action_data.m_Player.SpawnEntityOnGroundRaycastDispersed("HeadCover_Improvised");
48 action_data.m_MainItem.AddQuantity(-2);
49
50 MiscGameplayFunctions.TransferItemProperties(item_ingredient, cover);
51 }
52
53 override string GetSoundCategory(ActionData action_data)
54 {
55 return "ImprovisedCloth_craft";
56 }
57};
ActionData m_ActionData
float m_SpecialtyWeight
Definition actionbase.c:77
int m_StanceMask
Definition actionbase.c:62
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
bool m_FullBody
Definition actionbase.c:61
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602