Dayz Explorer 1.28.160049
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
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
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}
int GetKeyCompatibilityType()
If used to un/lock doors, which does it open. Bitwise.
Definition toolbase.c:12
int GetDisarmRate()
Definition toolbase.c:19
void ToolBase()
Definition toolbase.c:6
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Definition toolbase.c:24
The class that will be instanced (moddable)
Definition gameplay.c:389
Serialization general interface. Serializer API works with:
Definition serializer.c:56
EBuildingLockType