DayZ
1.24
Loading...
Searching...
No Matches
ActionPickBerry.c
Go to the documentation of this file.
1
class
ActionPickBerryCB
:
ActionInteractLoopBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.
m_ActionComponent
=
new
CAInteractLoop
(
UATimeSpent
.
DEFAULT_PICK
);
6
}
7
/*override void OnAnimationEvent(int pEventID)
8
{
9
Print("ActionInteractLoopBase.c | OnAnimationEvent | OnAnimationEvent called");
10
if ( !m_Interrupted && pEventID == UA_ANIM_EVENT )
11
{
12
SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
13
m_State = UA_FINISHED;
14
m_ActionData.Do(this,m_State,m_ActionComponent,m_Player,m_Target,m_Item);
15
}
16
}*/
17
};
18
19
class
ActionPickBerry
:
ActionInteractLoopBase
20
{
21
void
ActionPickBerry
()
22
{
23
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_INTERACT;
24
m_FullBody
=
true
;
25
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH |
DayZPlayerConstants
.STANCEMASK_ERECT;
26
m_SpecialtyWeight
=
UASoftSkillsWeight
.
ROUGH_MEDIUM
;
27
28
m_CallbackClass
=
ActionPickBerryCB
;
29
m_Text
=
"#harvest"
;
30
}
31
32
override
void
CreateConditionComponents
()
33
{
34
m_ConditionTarget
=
new
CCTCursor
(
UAMaxDistances
.
DEFAULT
);
35
m_ConditionItem
=
new
CCINone
;
36
}
37
38
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
39
{
40
Object
targetObject
=
target
.GetObject();
41
if
(
player
&&
targetObject
&&
targetObject
.IsWoodBase())
42
return
true
;
43
return
false
;
44
}
45
46
//deprecated
48
//{
49
/*Object targetObject = action_data.m_Target.GetObject();
50
WoodBase ntarget = WoodBase.Cast( targetObject );
51
string drop_name = ntarget.GetMaterial(NULL);
52
float drop_quantity = ntarget.GetAmountOfMaterialPerDrop(action_data.m_MainItem);
53
54
targetObject.DecreaseHealth( "", "", (1 / Math.Max(1,ntarget.GetAmountOfDrops(action_data.m_MainItem)))*100, true );
55
56
ItemBase drop = ItemBase.Cast( GetGame().CreateObject(drop_name, action_data.m_Player.GetPosition(), false) );
57
drop.SetQuantity(drop_quantity, false);
58
59
action_data.m_Player.GetSoftSkillManager().AddSpecialty( m_SpecialtyWeight );*/
60
//}
61
};
m_FullBody
bool m_FullBody
Definition
ActionBase.c:52
m_Text
string m_Text
Definition
ActionBase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition
ActionBase.c:55
m_SpecialtyWeight
float m_SpecialtyWeight
Definition
ActionBase.c:68
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
ActionBase.c:56
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
AnimatedActionBase.c:3
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Definition
ActionBase.c:30
ActionInteractLoopBaseCB
Definition
ActionInteractLoopBase.c:2
ActionInteractLoopBase
Definition
ActionInteractLoopBase.c:36
ActionPickBerryCB
Definition
ActionPickBerry.c:2
ActionPickBerryCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionPickBerry.c:3
ActionPickBerry
Definition
ActionPickBerry.c:20
ActionPickBerry::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionPickBerry.c:32
ActionPickBerry::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionPickBerry.c:38
ActionPickBerry::ActionPickBerry
void ActionPickBerry()
Definition
ActionPickBerry.c:21
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
AnimatedActionBase.c:124
CAInteractLoop
Definition
CAInteractLoop.c:2
CCINone
Definition
CCINone.c:2
CCTCursor
Definition
CCTCursor.c:2
ItemBase
Definition
InventoryItem.c:697
Object
Definition
ObjectTyped.c:2
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
UAMaxDistances
Definition
ActionConstants.c:105
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
ActionConstants.c:107
UASoftSkillsWeight
Definition
ActionConstants.c:119
UASoftSkillsWeight::ROUGH_MEDIUM
const float ROUGH_MEDIUM
Definition
ActionConstants.c:121
UATimeSpent
Definition
ActionConstants.c:27
UATimeSpent::DEFAULT_PICK
const float DEFAULT_PICK
Definition
ActionConstants.c:29
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
scripts
4_World
Classes
UserActionsComponent
Actions
Interact
ActionPickBerry.c
Generated by
1.10.0