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.
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:697
ItemBase::GetDisarmRate
int GetDisarmRate()
Definition
ToolBase.c:11
ItemBase::ToolBase
void ToolBase()
Definition
ToolBase.c:6
ItemBase::OnRPC
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Definition
ToolBase.c:16
Param3
Definition
EntityAI.c:95
PlayerIdentity
The class that will be instanced (moddable)
Definition
gameplay.c:376
Serializer
Serialization general interface. Serializer API works with:
Definition
Serializer.c:56
ToolBase
Definition
BoneKnife.c:2
scripts
4_World
Entities
ItemBase
ToolBase.c
Generated by
1.10.0