DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Trap_FishNet.c
См. документацию.
1class Trap_FishNet extends TrapSpawnBase
2{
3 override void InitTrapValues()
4 {
5 super.InitTrapValues();
6
7 m_DefectRate = 2.5; //Added damage after trap activation
8
9 m_InitWaitTimeMin = 120;
10 m_InitWaitTimeMax = 180;
11 m_UpdateWaitTime = 30;
12 m_SpawnUpdateWaitTime = 30;
13 m_MaxActiveTime = 1200;
14 m_IsFoldable = true;
15
16 m_MinimalDistanceFromPlayersToCatch = 15;
17
18 m_AnimationPhaseSet = "inventory";
19 m_AnimationPhaseTriggered = "placing";
20 m_AnimationPhaseUsed = "triggered";
21 }
22
23 override void InitCatchingComponent()
24 {
25 if (!m_CatchingContext)
26 {
27 int updateCount = m_MaxActiveTime/m_UpdateWaitTime;
28 Param2<EntityAI,int> par = new Param2<EntityAI,int>(this,updateCount);
29 m_CatchingContext = new CatchingContextTrapFishLarge(par);
30 }
31 }
32
33 //========================================================
34 //============= PLACING AND INVENTORY EVENTS =============
35 //========================================================
36
37 override bool IsPlaceableAtPosition( vector position )
38 {
39 return IsSurfaceWater( position );
40 }
41
42 override bool CanReceiveAttachment( EntityAI attachment, int slotId )
43 {
44 if ( !attachment.IsInherited( Worm ) )
45 return false;
46
47 return super.CanReceiveAttachment( attachment, slotId );
48 }
49
50 #ifdef PLATFORM_WINDOWS
51 // How one sees the tripwire when in vicinity
52 override int GetViewIndex()
53 {
54 if ( MemoryPointExists( "invView2" ) )
55 {
57 GetInventory().GetCurrentInventoryLocation( il );
59 switch ( type )
60 {
61 case InventoryLocationType.CARGO:
62 {
63 return 0;
64 }
65 case InventoryLocationType.ATTACHMENT:
66 {
67 return 1;
68 }
69 case InventoryLocationType.HANDS:
70 {
71 return 0;
72 }
73 case InventoryLocationType.GROUND:
74 {
75 // Different view index depending on deployment state
76 if ( IsActive() )
77 return 1;
78
79 // When folded
80 return 0;
81 }
82 case InventoryLocationType.PROXYCARGO:
83 {
84 return 0;
85 }
86 default:
87 {
88 if ( IsActive() )
89 return 1;
90
91 // When folded
92 return 0;
93 }
94 }
95 }
96 return 0;
97 }
98 #endif
99
100 //================================================================
101 // ADVANCED PLACEMENT
102 //================================================================
103 override bool IsDeployable()
104 {
105 return true;
106 }
107
108 override string GetDeploySoundset()
109 {
110 return "placeFishNetTrap_SoundSet";
111 }
112
113 override string GetLoopDeploySoundset()
114 {
115 return "fishnet_deploy_SoundSet";
116 }
117}
118
119class FishNetTrap extends Trap_FishNet
120{
121
122}
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
bool IsActive()
Определения ModifierBase.c:130
string m_AnimationPhaseTriggered
Определения TrapBase.c:34
float m_DefectRate
Определения TrapBase.c:19
string m_AnimationPhaseSet
Определения TrapBase.c:33
Определения Building.c:6
proto native int GetType()
returns type of InventoryLocation
InventoryLocation.
Определения InventoryLocation.c:29
Определения PPEConstants.c:68
override string GetLoopDeploySoundset()
Определения Trap_FishNet.c:113
override void InitTrapValues()
Определения Trap_FishNet.c:3
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
Определения Trap_FishNet.c:42
override void InitCatchingComponent()
Определения Trap_FishNet.c:23
override bool IsDeployable()
Определения Trap_FishNet.c:103
override string GetDeploySoundset()
Определения Trap_FishNet.c:108
override bool IsPlaceableAtPosition(vector position)
Определения Trap_FishNet.c:37
Определения Trap_FishNet.c:2
Определения EnConvert.c:106