DayZ 1.24
Loading...
Searching...
No Matches
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.
2class 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
12 {
13 return m_MineDisarmRate;
14 }
15
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}
int GetDisarmRate()
Definition ToolBase.c:11
void ToolBase()
Definition ToolBase.c:6
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Definition ToolBase.c:16
The class that will be instanced (moddable)
Definition gameplay.c:376
Serialization general interface. Serializer API works with:
Definition Serializer.c:56