DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
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 //float adjusted_time = m_ActionData.m_Player.GetSoftSkillsManager().AdjustCraftingTime(TIME_TO_CRAFT_CLOTHES,UASoftSkillsWeight.ROUGH_HIGH);
9 }
10};
11
12
14{
16 {
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
19 m_FullBody = true;
20 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
22 m_Text = "#STR_CraftImprovisedHeadCover";
23 }
24
26 {
29 }
30
31 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
32 {
33 if( item.GetQuantity() >= 2 )
34 {
35 return true;
36 }
37 return false;
38 }
39
40 override bool HasTarget()
41 {
42 return false;
43 }
44
45 override void OnFinishProgressServer( ActionData action_data )
46 {
47 EntityAI item_ingredient = action_data.m_MainItem;
48 EntityAI cover;
49
50 cover = action_data.m_Player.SpawnEntityOnGroundPos("HeadCover_Improvised", action_data.m_Player.GetPosition());
51 action_data.m_MainItem.AddQuantity(-2);
52
53 MiscGameplayFunctions.TransferItemProperties(item_ingredient, cover);
54 }
55};
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
class ActionTargets ActionTarget
protected ActionData m_ActionData
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
ItemBase m_MainItem
Definition ActionBase.c:28
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602