Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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 
61  }
62 }
ActionEat
Definition: actioneat.c:64
CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition: edible_base.c:101
IsFruit
override bool IsFruit()
Definition: edible_base.c:249
AddAction
void AddAction(typename actionName)
Definition: advancedcommunication.c:86
SetActions
void SetActions()
Definition: advancedcommunication.c:79
ActionForceFeed
ActionForceFeedSmallCB ActionForceFeed
Definition: actionforcefeed.c:11
Barrel_ColorBase
Definition: barrel_colorbase.c:1
CanBeCooked
override bool CanBeCooked()
Definition: edible_base.c:96
CanDecay
Marmalade CanDecay
Definition: cannedfood.c:87
EntityAI
Definition: building.c:5
Edible_Base
Definition: bearsteakmeat.c:1