DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionCraftImprovisedHandsCover.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
13{
15 {
17 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
18 m_FullBody = true;
19 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
21 m_Text = "#STR_CraftImprovisedHandsCover";
22 }
23
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;
48
49 cover = action_data.m_Player.SpawnEntityOnGroundPos("HandsCover_Improvised", action_data.m_Player.GetPosition());
50 action_data.m_MainItem.AddQuantity(-2);
51
52 MiscGameplayFunctions.TransferItemProperties(item_ingredient, cover);
53 }
54};
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