DayZ
1.24
Loading...
Searching...
No Matches
ActionEatCan.c
Go to the documentation of this file.
1
class
ActionEatCanCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.
m_ActionComponent
=
new
CAContinuousQuantityEdible
(
UAQuantityConsumed
.
EAT_BIG
,
UATimeSpent
.
DEFAULT
);
6
}
7
};
8
9
10
class
ActionEatCan
:
ActionEatBig
11
{
12
void
ActionEatCan
()
13
{
14
m_CallbackClass
=
ActionEatCanCB
;
15
}
16
17
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
18
{
19
return
super
.ActionCondition(
player
,
target
,
item
);
20
/*
21
//if staging for cans is introduced
22
if ( item && item.IsOpen() )
23
{
24
return true;
25
}
26
return false;
27
*/
28
}
29
};
30
31
//-----------------SMALL BITES VARIANT-------------------
32
33
class
ActionEatSmallCanCB
:
ActionContinuousBaseCB
34
{
35
override
void
CreateActionComponent
()
36
{
37
m_ActionData
.
m_ActionComponent
=
new
CAContinuousQuantityEdible
(
UAQuantityConsumed
.
EAT_SMALL
,
UATimeSpent
.
DEFAULT
);
38
}
39
};
40
41
42
class
ActionEatSmallCan
:
ActionEatBig
43
{
44
void
ActionEatSmallCan
()
45
{
46
m_CallbackClass
=
ActionEatSmallCanCB
;
47
}
48
49
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
50
{
51
if
(!
super
.ActionCondition(
player
,
target
,
item
))
52
return
false
;
53
return
true
;
54
/*
55
//if staging for cans is introduced
56
if ( item && item.IsOpen() )
57
{
58
return true;
59
}
60
return false;
61
*/
62
}
63
};
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
AnimatedActionBase.c:3
ActionContinuousBaseCB
Definition
ActionContinuousBase.c:2
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Definition
ActionBase.c:30
ActionEatBig
Definition
ActionEat.c:10
ActionEatCanCB
Definition
ActionEatCan.c:2
ActionEatCanCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionEatCan.c:3
ActionEatCan
Definition
ActionEatCan.c:11
ActionEatCan::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionEatCan.c:17
ActionEatCan::ActionEatCan
void ActionEatCan()
Definition
ActionEatCan.c:12
ActionEatSmallCanCB
Definition
ActionEatCan.c:34
ActionEatSmallCanCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionEatCan.c:35
ActionEatSmallCan
Definition
ActionEatCan.c:43
ActionEatSmallCan::ActionEatSmallCan
void ActionEatSmallCan()
Definition
ActionEatCan.c:44
ActionEatSmallCan::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionEatCan.c:49
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
AnimatedActionBase.c:124
CAContinuousQuantityEdible
Definition
CAContinuousQuantityEdible.c:2
ItemBase
Definition
InventoryItem.c:697
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
UAQuantityConsumed
Definition
ActionConstants.c:4
UAQuantityConsumed::EAT_SMALL
const float EAT_SMALL
Definition
ActionConstants.c:7
UAQuantityConsumed::EAT_BIG
const float EAT_BIG
Definition
ActionConstants.c:9
UATimeSpent
Definition
ActionConstants.c:27
UATimeSpent::DEFAULT
const float DEFAULT
Definition
ActionConstants.c:28
scripts
4_World
Classes
UserActionsComponent
Actions
Continuous
ActionEatCan.c
Generated by
1.10.0