Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
caninaberry.c
Go to the documentation of this file.
1
class
CaninaBerry
extends
Edible_Base
2
{
3
override
bool
CanBeCooked
()
4
{
5
return
true
;
6
}
7
8
override
bool
CanBeCookedOnStick
()
9
{
10
return
false
;
11
}
12
13
override
bool
IsFruit
()
14
{
15
return
true
;
16
}
17
18
override
bool
CanDecay
()
19
{
20
return
true
;
21
}
22
23
bool
ConditionAttach
(
EntityAI
parent )
24
{
25
//if Barrel_ColorBase
26
if
( parent.IsInherited(
Barrel_ColorBase
) )
27
{
28
Barrel_ColorBase
barrel =
Barrel_ColorBase
.Cast( parent );
29
30
if
( barrel.
IsOpen
() && !barrel.FindAttachmentBySlotName(
"Nails"
) && !barrel.FindAttachmentBySlotName(
"OakBark"
) && !barrel.FindAttachmentBySlotName(
"BirchBark"
) && !barrel.FindAttachmentBySlotName(
"Lime"
) && !barrel.FindAttachmentBySlotName(
"Disinfectant"
) && !barrel.FindAttachmentBySlotName(
"Guts"
) )
31
{
32
return
true
;
33
}
34
}
35
36
return
false
;
37
}
38
39
bool
ConditionDetach
(
EntityAI
parent )
40
{
41
//if Barrel_ColorBase
42
if
( parent.IsInherited(
Barrel_ColorBase
) )
43
{
44
Barrel_ColorBase
barrel =
Barrel_ColorBase
.Cast( parent );
45
46
if
( !barrel.
IsOpen
() )
47
{
48
return
false
;
49
}
50
}
51
52
return
true
;
53
}
54
55
override
void
SetActions
()
56
{
57
super.SetActions();
58
59
AddAction
(
ActionForceFeed
);
60
AddAction
(
ActionEat
);
61
}
62
}
ActionForceFeed
ActionForceFeedSmallCB ActionForceFeed
Definition
actionforcefeed.c:11
AddAction
void AddAction(typename actionName)
Definition
advancedcommunication.c:220
ActionEat
Definition
actioneat.c:46
Barrel_ColorBase
Definition
barrel_colorbase.c:2
Barrel_ColorBase::IsOpen
override bool IsOpen()
Definition
barrel_colorbase.c:125
Edible_Base
Definition
edible_base.c:2
Edible_Base::ConditionAttach
bool ConditionAttach(EntityAI parent)
Definition
caninaberry.c:23
Edible_Base::CanDecay
override bool CanDecay()
Definition
caninaberry.c:18
Edible_Base::CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition
caninaberry.c:8
Edible_Base::CanBeCooked
override bool CanBeCooked()
Definition
caninaberry.c:3
Edible_Base::IsFruit
override bool IsFruit()
Definition
caninaberry.c:13
Edible_Base::ConditionDetach
bool ConditionDetach(EntityAI parent)
Definition
caninaberry.c:39
Edible_Base::SetActions
override void SetActions()
Definition
caninaberry.c:55
EntityAI
Definition
inventoryitem.c:2
Games
Dayz
scripts
4_world
entities
itembase
edible_base
caninaberry.c
Generated by
1.17.0