Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
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
12
int
GetKeyCompatibilityType
()
13
{
14
//you can combine the bit values like so:
15
//return (1 << EBuildingLockType.LOCKPICK) | (1 << EBuildingLockType.SHIP_CONTAINER_1);
16
return
EBuildingLockType
.NONE;
//pure '0'
17
}
18
19
int
GetDisarmRate
()
20
{
21
return
m_MineDisarmRate
;
22
}
23
24
override
void
OnRPC
(
PlayerIdentity
sender,
int
rpc_type,
ParamsReadContext
ctx)
25
{
26
super.OnRPC(sender, rpc_type,ctx);
27
28
switch
(rpc_type)
29
{
30
case
PlantType.TREE_HARD:
31
SoundHardTreeFallingPlay();
32
break
;
33
34
case
PlantType.TREE_SOFT:
35
SoundSoftTreeFallingPlay();
36
break
;
37
38
case
PlantType.BUSH_HARD:
39
SoundHardBushFallingPlay();
40
break
;
41
42
case
PlantType.BUSH_SOFT:
43
SoundSoftBushFallingPlay();
44
break
;
45
}
46
}
47
}
ItemBase
Definition
inventoryitem.c:742
ItemBase::OnRPC
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Definition
toolbase.c:24
ItemBase::GetKeyCompatibilityType
int GetKeyCompatibilityType()
If used to un/lock doors, which does it open. Bitwise.
Definition
toolbase.c:12
ItemBase::ToolBase
void ToolBase()
Definition
toolbase.c:6
ItemBase::GetDisarmRate
int GetDisarmRate()
Definition
toolbase.c:19
ItemBase::m_MineDisarmRate
int m_MineDisarmRate
Definition
toolbase.c:4
PlayerIdentity
The class that will be instanced (moddable).
Definition
gameplay.c:389
ToolBase
Definition
boneknife.c:2
EBuildingLockType
EBuildingLockType
Definition
ebuildinglocktypes.c:2
ParamsReadContext
Serializer ParamsReadContext
Definition
gameplay.c:15
Games
Dayz
scripts
4_world
entities
itembase
toolbase.c
Generated by
1.17.0