Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
sambucusberry.c
Go to the documentation of this file.
1class SambucusBerry 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);
61 }
62}
void AddAction(typename actionName)
override bool IsOpen()
override bool IsFruit()
override bool CanDecay()
override void SetActions()
bool CanBeCooked()
Definition itembase.c:7478
bool CanBeCookedOnStick()
Definition itembase.c:7483