Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
toolbase.c
Go to the documentation of this file.
1 //TODO trees are static objects, there is no script event for playing sounds on clients when they are chopped down.
2 class ToolBase extends ItemBase
3 {
4  protected int m_MineDisarmRate = 60; //Success rate when disarming with this tool
5 
6  void ToolBase()
7  {
8 
9  }
10 
11  int GetDisarmRate()
12  {
13  return m_MineDisarmRate;
14  }
15 
16  override void OnRPC(PlayerIdentity sender, int rpc_type,ParamsReadContext ctx)
17  {
18  super.OnRPC(sender, rpc_type,ctx);
19 
20  switch(rpc_type)
21  {
22  case PlantType.TREE_HARD:
23  SoundHardTreeFallingPlay();
24  break;
25 
26  case PlantType.TREE_SOFT:
27  SoundSoftTreeFallingPlay();
28  break;
29 
30  case PlantType.BUSH_HARD:
31  SoundHardBushFallingPlay();
32  break;
33 
34  case PlantType.BUSH_SOFT:
35  SoundSoftBushFallingPlay();
36  break;
37  }
38  }
39 }
ItemBase
Definition: inventoryitem.c:730
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
OnRPC
void OnRPC(ParamsReadContext ctx)
Definition: displaystatus.c:216
PlayerIdentity
The class that will be instanced (moddable)
Definition: gameplay.c:377
ToolBase
Definition: boneknife.c:1