DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс TrapSpawnBase

Закрытые члены

override void InitTrapValues ()
 
override void OnVariablesSynchronized ()
 
override void InitCatchingComponent ()
 
override bool IsPlaceableAtPosition (vector position)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool IsDeployable ()
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
override void InitTrapValues ()
 
override bool CanBePlaced (Man player, vector position)
 
override void OnVariablesSynchronized ()
 
override void SetupTrap ()
 
override void InitCatchingComponent ()
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool IsDeployable ()
 
override string GetDeploySoundset ()
 
override string GetLoopDeploySoundset ()
 
override void SetActions ()
 
override void AlignCatch (ItemBase obj, string catch_name)
 
override void InitTrapValues ()
 
override void OnVariablesSynchronized ()
 
override void InitCatchingComponent ()
 
override bool IsPlaceableAtPosition (vector position)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 

Подробное описание

Методы

◆ AlignCatch()

override void AlignCatch ( ItemBase obj,
string catch_name )
inlineprivate
123 {
124 if ( catch_name == "Animal_LepusEuropaeus" )
125 {
126 obj.SetOrientation( GetOrientation() );
127
128 vector forward_vec = GetDirection();
129 vector side_vec = forward_vec.Perpend( ) * -0.22;
130 forward_vec = forward_vec * -0.3;
131
132 vector chatch_pos = obj.GetPosition() + forward_vec + side_vec;
133 obj.SetPosition( chatch_pos );
134 }
135 }
vector GetOrientation()
Definition AreaDamageManager.c:306
Definition EntityAI.c:95
Definition EnConvert.c:106

Перекрестные ссылки GetOrientation().

◆ CanBePlaced()

override bool CanBePlaced ( Man player,
vector position )
inlineprivate
23 {
25 return true;
26
27 int liquidType;
28 string surfaceType;
29 g_Game.SurfaceUnderObject(PlayerBase.Cast(player).GetHologramLocal().GetProjectionEntity(), surfaceType, liquidType);
30
31 return g_Game.IsSurfaceDigable(surfaceType);
32 }
DayZGame g_Game
Definition DayZGame.c:3815
bool m_IsBeingPlaced
Definition ItemBase.c:4820
Definition PlayerBaseClient.c:2

Перекрестные ссылки g_Game и m_IsBeingPlaced.

◆ CanReceiveAttachment() [1/2]

override bool CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate
53 {
54 if ( !attachment.IsInherited( Worm ) )
55 return false;
56
57 return super.CanReceiveAttachment( attachment, slotId );
58 }

◆ CanReceiveAttachment() [2/2]

override bool CanReceiveAttachment ( EntityAI attachment,
int slotId )
inlineprivate
52 {
53 if ( !attachment.IsInherited( Worm ) )
54 return false;
55
56 return super.CanReceiveAttachment( attachment, slotId );
57 }

◆ GetDeploySoundset() [1/2]

override string GetDeploySoundset ( )
inlineprivate
127 {
128 return "placeFishNetTrap_SoundSet";
129 }

◆ GetDeploySoundset() [2/2]

override string GetDeploySoundset ( )
inlineprivate
98 {
99 return "placeRabbitSnareTrap_SoundSet";
100 }

◆ GetLoopDeploySoundset() [1/2]

override string GetLoopDeploySoundset ( )
inlineprivate
132 {
133 return "fishnet_deploy_SoundSet";
134 }

◆ GetLoopDeploySoundset() [2/2]

override string GetLoopDeploySoundset ( )
inlineprivate
103 {
104 return "rabbitsnare_deploy_SoundSet";
105 }

◆ InitCatchingComponent() [1/3]

override void InitCatchingComponent ( )
inlineprivate
34 {
35 if (!m_CatchingContext)
36 {
37 int updateCount = m_MaxActiveTime/m_UpdateWaitTime;
39 m_CatchingContext = new CatchingContextTrapFishLarge(par);
40 }
41 }
Definition CatchingContextTraps.c:254

Используется в ItemBase::OnPlacementComplete(), ItemBase::OnStoreLoad() и ItemBase::SetActive().

◆ InitCatchingComponent() [2/3]

override void InitCatchingComponent ( )
inlineprivate
72 {
73 if (!m_CatchingContext)
74 {
75 int updateCount = m_MaxActiveTime/m_UpdateWaitTime;
77 m_CatchingContext = new CatchingContextTrapLandSnare(par);
78 }
79 }

◆ InitCatchingComponent() [3/3]

override void InitCatchingComponent ( )
inlineprivate
33 {
34 if (!m_CatchingContext)
35 {
36 int updateCount = m_MaxActiveTime/m_UpdateWaitTime;
38 m_CatchingContext = new CatchingContextTrapFishSmall(par);
39 }
40 }

◆ InitTrapValues() [1/3]

override void InitTrapValues ( )
inlineprivate
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 }
string m_AnimationPhaseTriggered
Definition TrapBase.c:34
float m_DefectRate
Definition TrapBase.c:19
string m_AnimationPhaseSet
Definition TrapBase.c:33

Перекрестные ссылки m_AnimationPhaseSet, m_AnimationPhaseTriggered и m_DefectRate.

Используется в ItemBase::TrapSpawnBase().

◆ InitTrapValues() [2/3]

override void InitTrapValues ( )
inlineprivate
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 m_MinimalDistanceFromPlayersToCatch = 15;
16
17 m_AnimationPhaseSet = "inventory";
18 m_AnimationPhaseTriggered = "placing";
19 m_AnimationPhaseUsed = "triggered";
20 }

Перекрестные ссылки m_AnimationPhaseSet, m_AnimationPhaseTriggered и m_DefectRate.

◆ InitTrapValues() [3/3]

override void InitTrapValues ( )
inlineprivate
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 }

Перекрестные ссылки m_AnimationPhaseSet, m_AnimationPhaseTriggered и m_DefectRate.

◆ IsDeployable() [1/2]

override bool IsDeployable ( )
inlineprivate
122 {
123 return true;
124 }

◆ IsDeployable() [2/2]

override bool IsDeployable ( )
inlineprivate
93 {
94 return true;
95 }

◆ IsPlaceableAtPosition() [1/2]

override bool IsPlaceableAtPosition ( vector position)
inlineprivate
48 {
49 return IsSurfaceWater( position );
50 }

Используется в ItemBase::CanBePlaced() и ItemBase::IsPlaceable().

◆ IsPlaceableAtPosition() [2/2]

override bool IsPlaceableAtPosition ( vector position)
inlineprivate
47 {
48 return IsSurfaceWater( position );
49 }

◆ OnPlacementComplete() [1/2]

override void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate
115 {
116 super.OnPlacementComplete( player, position, orientation );
117
118 SetIsPlaceSound( true );
119 }
void SetIsPlaceSound(bool is_place_sound)
Definition ItemBase.c:9083

Перекрестные ссылки SetIsPlaceSound().

◆ OnPlacementComplete() [2/2]

override void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate
86 {
87 super.OnPlacementComplete( player, position, orientation );
88 SetOrientation(orientation);
89 SetIsPlaceSound( true );
90 }

Перекрестные ссылки SetIsPlaceSound().

◆ OnVariablesSynchronized() [1/3]

override void OnVariablesSynchronized ( )
inlineprivate
24 {
25 super.OnVariablesSynchronized();
26
27 if ( IsPlaceSound() )
28 {
30 }
31 }
void PlayPlaceSound()
Definition ItemBase.c:9148
bool IsPlaceSound()
Definition ItemBase.c:9088

Перекрестные ссылки IsPlaceSound() и PlayPlaceSound().

◆ OnVariablesSynchronized() [2/3]

override void OnVariablesSynchronized ( )
inlineprivate
35 {
36 super.OnVariablesSynchronized();
37
38 if (IsPlaceSound())
39 {
41 }
42 }

Перекрестные ссылки IsPlaceSound() и PlayPlaceSound().

◆ OnVariablesSynchronized() [3/3]

override void OnVariablesSynchronized ( )
inlineprivate
23 {
24 super.OnVariablesSynchronized();
25
26 if ( IsPlaceSound() )
27 {
29 }
30 }

Перекрестные ссылки IsPlaceSound() и PlayPlaceSound().

◆ SetActions()

override void SetActions ( )
inlineprivate
108 {
109 super.SetActions();
110
111 // We remove the hunting trap deploy action in order to all advanced placement
113
115 AddAction(ActionDeployObject);
116 }
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
void RemoveAction(typename actionName)
Definition AdvancedCommunication.c:252
Definition ActionDeployHuntingTrap.c:2
Definition ActionTogglePlaceObject.c:2

Перекрестные ссылки AddAction() и RemoveAction().

◆ SetupTrap()

override void SetupTrap ( )
inlineprivate
45 {
46 if ( GetGame().IsServer() )
47 {
48 if ( GetHierarchyRootPlayer().CanDropEntity( this ) )
49 {
50 if ( IsRuined() )
51 {
52 PlayerBase player = PlayerBase.Cast( GetHierarchyRootPlayer() );
53 }
54 else
55 {
56 PlayerBase owner_player = PlayerBase.Cast( GetHierarchyRootPlayer() );
57
58 //GetDirection
59 vector trapPos = owner_player.GetDirection();
60 trapPos[1] = 0;
61 SetPosition( owner_player.GetPosition() + trapPos );
62
63 SetActive();
64
65 SetOrientation( owner_player.GetOrientation() );
66 }
67 }
68 }
69 }
void SetActive()
Definition TrapBase.c:419
proto native CGame GetGame()
proto native void SetPosition(vector position)
Set the world position of the Effect.
Definition Effect.c:438

Перекрестные ссылки GetGame(), SetActive() и SetPosition().


Объявления и описания членов классов находятся в файлах: