DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Trap_SmallFish.c
См. документацию.
1class Trap_SmallFish 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
15 m_MinimalDistanceFromPlayersToCatch = 15;
16
17 m_AnimationPhaseSet = "inventory";
18 m_AnimationPhaseTriggered = "placing";
19 m_AnimationPhaseUsed = "triggered";
20 }
21
22 override void InitCatchingComponent()
23 {
24 if (!m_CatchingContext)
25 {
26 int updateCount = m_MaxActiveTime/m_UpdateWaitTime;
27 Param2<EntityAI,int> par = new Param2<EntityAI,int>(this,updateCount);
28 m_CatchingContext = new CatchingContextTrapFishSmall(par);
29 }
30 }
31
32 //========================================================
33 //============= PLACING AND INVENTORY EVENTS =============
34 //========================================================
35
36 override bool IsPlaceableAtPosition( vector position )
37 {
38 return IsSurfaceWater( position );
39 }
40
41 override bool CanReceiveAttachment( EntityAI attachment, int slotId )
42 {
43 if ( !attachment.IsInherited( Worm ) )
44 return false;
45
46 return super.CanReceiveAttachment( attachment, slotId );
47 }
48
49 #ifdef PLATFORM_WINDOWS
50 // How one sees the tripwire when in vicinity
51 override int GetViewIndex()
52 {
53 if ( MemoryPointExists( "invView2" ) )
54 {
56 GetInventory().GetCurrentInventoryLocation( il );
58 switch ( type )
59 {
60 case InventoryLocationType.CARGO:
61 {
62 return 0;
63 }
64 case InventoryLocationType.ATTACHMENT:
65 {
66 return 1;
67 }
68 case InventoryLocationType.HANDS:
69 {
70 return 0;
71 }
72 case InventoryLocationType.GROUND:
73 {
74 // Different view index depending on deployment state
75 if ( IsDeployed() )
76 return 1;
77
78 // When folded
79 return 0;
80 }
81 case InventoryLocationType.PROXYCARGO:
82 {
83 return 0;
84 }
85 default:
86 {
87 if ( IsDeployed() )
88 return 1;
89
90 // When folded
91 return 0;
92 }
93 }
94 }
95 return 0;
96 }
97 #endif
98}
99
100class SmallFishTrap extends Trap_SmallFish
101{
102 // DEPRECATED
104
105 //================================================================
106 // ADVANCED PLACEMENT
107 //================================================================
108 override bool IsDeployable()
109 {
110 return true;
111 }
112
113 override string GetDeploySoundset()
114 {
115 return "placeSmallFishTrap_SoundSet";
116 }
117
118 override string GetLoopDeploySoundset()
119 {
120 return "fishtrap_deploy_SoundSet";
121 }
122
123 override bool DoPlacingHeightCheck()
124 {
125 return true; //has to be able to catch rain, default distance raycast
126 }
127}
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
bool IsDeployable()
Определения ItemBase.c:9028
string GetDeploySoundset()
Определения FireplaceBase.c:2592
string GetLoopDeploySoundset()
Определения LargeTent.c:151
class Trap_SmallFish extends TrapSpawnBase m_RainProcurement
override bool DoPlacingHeightCheck()
Определения Trap_SmallFish.c:123
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
DEPRECATED, done through the RainProcurementHandler / component instead.
Определения RainProcurementManager.c:3
override void InitTrapValues()
Определения Trap_SmallFish.c:3
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
Определения Trap_SmallFish.c:41
override void InitCatchingComponent()
Определения Trap_SmallFish.c:22
override bool IsPlaceableAtPosition(vector position)
Определения Trap_SmallFish.c:36
Определения Trap_FishNet.c:2
Определения EnConvert.c:106