Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionBuildShelter
+ Граф наследования:ActionBuildShelter:

Защищенные члены

void ActionBuildShelter ()
 
void ~ActionBuildShelter ()
 
override void CreateConditionComponents ()
 
override string GetText ()
 
override void OnActionInfoUpdate (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool CanBeUsedLeaning ()
 
override GetInputType ()
 
override bool UseMainItem ()
 
override bool HasProgress ()
 
override bool HasAlternativeInterrupt ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool SetupAction (PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
 
override ActionData CreateActionData ()
 
override void WriteToContext (ParamsWriteContext ctx, ActionData action_data)
 
override bool ReadFromContext (ParamsReadContext ctx, out ActionReciveData action_recive_data)
 
override void HandleReciveData (ActionReciveData action_recive_data, ActionData action_data)
 
override bool ActionConditionContinue (ActionData action_data)
 
override void OnStart (ActionData action_data)
 
override void OnStartClient (ActionData action_data)
 
override void OnStartAnimationLoopClient (ActionData action_data)
 
override void OnEnd (ActionData action_data)
 
override void OnEndClient (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnFinishProgressClient (ActionData action_data)
 
void DetermineConstructionSounds (ActionData action_data)
 
void PlayActionStartSound (ActionData action_data)
 
void PlayActionLoopSound (ActionData action_data)
 
void StopActionLoopSound ()
 
void DestroyActionLoopSound ()
 
void PlayActionFinishSound (ActionData action_data)
 
override string GetSoundCategory (ActionData action_data)
 

Защищенные данные

EffectSound m_BuildLoopSound
 

Закрытые данные

string m_SoundsetBuildStart
 
string m_SoundsetBuildLoop
 
string m_SoundsetBuildFinish
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

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

Конструктор(ы)

◆ ActionBuildShelter()

void ActionBuildShelter ( )
inlineprotected
9 {
11 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DEPLOY_2HD;
12 m_FullBody = true;
13 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
14 m_Text = "#build_shelter_leather";
15 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
Definition ActionBuildPart.c:12
int m_CommandUID
Definition AnimatedActionBase.c:135
m_CallbackClass
Definition AnimatedActionBase.c:137
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, m_FullBody, m_StanceMask и m_Text.

◆ ~ActionBuildShelter()

void ~ActionBuildShelter ( )
inlineprotected
18 {
20 }
void DestroyActionLoopSound()
Definition ActionBuildShelter.c:312

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

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprotected
109 {
110 //Action not allowed if player has broken legs
111 if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
112 return false;
113
114 if (target.GetObject() && !target.GetObject().CanUseConstructionBuild())
115 return false;
116 if ( player.IsPlacingLocal() || player.IsPlacingServer() )
117 return false;
118
119 if ( (!GetGame().IsDedicatedServer()) )
120 {
121 if ( MiscGameplayFunctions.ComplexBuildCollideCheckClient(player, target, item, m_VariantID ) )
122 {
123 return true;
124 }
125 return false;
126 }
127 return true;
128 }
int m_VariantID
Definition ActionBase.c:59
eBrokenLegs
Definition EBrokenLegs.c:2
Definition EntityAI.c:95
proto native CGame GetGame()

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

◆ ActionConditionContinue()

override bool ActionConditionContinue ( ActionData action_data)
inlineprotected
184 {
185 BaseBuildingBase base_building = BaseBuildingBase.Cast( action_data.m_Target.GetObject() );
186 Construction construction = base_building.GetConstruction();
187 string part_name = BuildPartActionData.Cast(action_data).m_PartType;
189
190 check_data.m_PartName = part_name;
191 check_data.m_AdditionalExcludes.Insert(action_data.m_Player);
192
193 return !construction.IsCollidingEx( check_data ) && construction.CanBuildPart( part_name, action_data.m_MainItem, false );
194 }
void CollisionCheckData()
Definition Construction.c:1310
void Construction(BaseBuildingBase parent)
Definition Construction.c:26
Definition Fence.c:2

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

◆ CanBeUsedLeaning()

override bool CanBeUsedLeaning ( )
inlineprotected
84 {
85 return false;
86 }

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprotected
147 {
149 return action_data;
150 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprotected
23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCINone.c:2
Definition CCTCursor.c:2

Перекрестные ссылки m_ConditionItem и m_ConditionTarget.

◆ DestroyActionLoopSound()

void DestroyActionLoopSound ( )
inlineprotected
313 {
315 }
EffectSound m_BuildLoopSound
Definition ActionBuildShelter.c:6
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition EffectManager.c:267

Перекрестные ссылки SEffectManager::DestroyEffect() и m_BuildLoopSound.

Используется в ~ActionBuildShelter().

◆ DetermineConstructionSounds()

void DetermineConstructionSounds ( ActionData action_data)
inlineprotected
255 {
256 ConstructionActionData construction_action_data = action_data.m_Player.GetConstructionActionData();
259 {
260 switch (constrution_part.GetName())
261 {
262 case "leather":
263 m_SoundsetBuildStart = "Shelter_Leather_Build_Start_SoundSet";
264 m_SoundsetBuildLoop = "Shelter_Leather_Build_Loop_SoundSet";
265 m_SoundsetBuildFinish = "Shelter_Leather_Build_Finish_SoundSet";
266 break;
267
268 case "fabric":
269 m_SoundsetBuildStart = "Shelter_Fabric_Build_Start_SoundSet";
270 m_SoundsetBuildLoop = "Shelter_Fabric_Build_Loop_SoundSet";
271 m_SoundsetBuildFinish = "Shelter_Fabric_Build_Finish_SoundSet";
272 break;
273
274 case "stick":
275 m_SoundsetBuildStart = "Shelter_Wooden_Stick_Build_Start_SoundSet";
276 m_SoundsetBuildLoop = "Shelter_Wooden_Stick_Build_Loop_SoundSet";
277 m_SoundsetBuildFinish = "Shelter_Wooden_Stick_Build_Finish_SoundSet";
278 break;
279
280 default:
284 break;
285 }
286 }
287 }
string m_SoundsetBuildLoop
Definition ActionBuildShelter.c:4
string m_SoundsetBuildStart
Definition ActionBuildShelter.c:3
string m_SoundsetBuildFinish
Definition ActionBuildShelter.c:5
Definition ConstructionActionData.c:2
Definition ConstructionPart.c:2

Перекрестные ссылки m_SoundsetBuildFinish, m_SoundsetBuildLoop, m_SoundsetBuildStart и m_VariantID.

Используется в OnStartClient().

◆ GetInputType()

override GetInputType ( )
inlineprotected
89 {
91 }
Definition ActionInput.c:522

◆ GetSoundCategory()

override string GetSoundCategory ( ActionData action_data)
inlineprotected
324 {
325 return "Base_building";
326 }

◆ GetText()

override string GetText ( )
inlineprotected
29 {
31 if ( player )
32 {
33 ConstructionActionData construction_action_data = player.GetConstructionActionData();
35
36 if ( constrution_part )
37 {
38 string ret = "";
39 switch (constrution_part.GetName())
40 {
41 case "leather":
42 ret = "#build_shelter_leather";
43 break;
44
45 case "fabric":
46 ret = "#build_shelter_fabric";
47 break;
48
49 case "stick":
50 ret = "#build_shelter_stick";
51 break;
52 }
53 }
54 }
55
56 return ret;
57 }
PlayerBase GetPlayer()
Definition ModifierBase.c:47
Definition PlayerBaseClient.c:2

Перекрестные ссылки GetGame(), GetPlayer() и m_VariantID.

◆ HandleReciveData()

override void HandleReciveData ( ActionReciveData action_recive_data,
ActionData action_data )
inlineprotected
177 {
178 super.HandleReciveData(action_recive_data, action_data);
179
181 }
Definition ActionBuildPart.c:2
string m_PartType
Definition ActionBuildPart.c:3

Перекрестные ссылки BuildPartActionReciveData::m_PartType.

◆ HasAlternativeInterrupt()

override bool HasAlternativeInterrupt ( )
inlineprotected
104 {
105 return false;
106 }

◆ HasProgress()

override bool HasProgress ( )
inlineprotected
99 {
100 return true;
101 }

◆ OnActionInfoUpdate()

override void OnActionInfoUpdate ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprotected
60 {
61 ConstructionActionData construction_action_data = player.GetConstructionActionData();
63
64 if ( constrution_part )
65 {
66 switch (constrution_part.GetName())
67 {
68 case "leather":
69 m_Text = "#build_shelter_leather";
70 break;
71
72 case "fabric":
73 m_Text = "#build_shelter_fabric";
74 break;
75
76 case "stick":
77 m_Text = "#build_shelter_stick";
78 break;
79 }
80 }
81 }

Перекрестные ссылки m_Text и m_VariantID.

◆ OnEnd()

override void OnEnd ( ActionData action_data)
inlineprotected
218 {
219 super.OnEnd(action_data);
220 action_data.m_Player.TryHideItemInHands(false);
221 }

◆ OnEndClient()

override void OnEndClient ( ActionData action_data)
inlineprotected
224 {
225 super.OnEndClient(action_data);
226
228 //DestroyActionLoopSound();
229 }
void StopActionLoopSound()
Definition ActionBuildShelter.c:303

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

◆ OnFinishProgressClient()

override void OnFinishProgressClient ( ActionData action_data)
inlineprotected
248 {
249 super.OnFinishProgressClient(action_data);
250
252 }
void PlayActionFinishSound(ActionData action_data)
Definition ActionBuildShelter.c:317

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

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprotected
232 {
233 BaseBuildingBase base_building = BaseBuildingBase.Cast( action_data.m_Target.GetObject() );
234 Construction construction = base_building.GetConstruction();
235
236 string part_name = BuildPartActionData.Cast(action_data).m_PartType;
237
238 if ( !construction.IsColliding( part_name ) && construction.CanBuildPart( part_name, action_data.m_MainItem, false ) )
239 {
240 //build
241 construction.BuildPartServer( action_data.m_Player, part_name, AT_BUILD_PART );
242 }
243
244 action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
245 }
const int AT_BUILD_PART
Definition _constants.c:6
float m_SpecialtyWeight
Definition ActionBase.c:68

Перекрестные ссылки AT_BUILD_PART, Construction() и m_SpecialtyWeight.

◆ OnStart()

override void OnStart ( ActionData action_data)
inlineprotected
197 {
198 super.OnStart(action_data);
199 action_data.m_Player.TryHideItemInHands(true);
200 }

◆ OnStartAnimationLoopClient()

override void OnStartAnimationLoopClient ( ActionData action_data)
inlineprotected
211 {
212 super.OnStartAnimationLoopClient(action_data);
213
215 }
void PlayActionLoopSound(ActionData action_data)
Definition ActionBuildShelter.c:295

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

◆ OnStartClient()

override void OnStartClient ( ActionData action_data)
inlineprotected
203 {
204 super.OnStartClient(action_data);
205
208 }
void PlayActionStartSound(ActionData action_data)
Definition ActionBuildShelter.c:289
void DetermineConstructionSounds(ActionData action_data)
Definition ActionBuildShelter.c:254

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

◆ PlayActionFinishSound()

void PlayActionFinishSound ( ActionData action_data)
inlineprotected
318 {
319 EffectSound sound = SEffectManager.PlaySound(m_SoundsetBuildFinish, action_data.m_Target.GetObject().GetPosition());
320 sound.SetAutodestroy( true );
321 }
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:165

Перекрестные ссылки m_SoundsetBuildFinish и SEffectManager::PlaySound().

Используется в OnFinishProgressClient().

◆ PlayActionLoopSound()

void PlayActionLoopSound ( ActionData action_data)
inlineprotected
296 {
298 {
299 m_BuildLoopSound = SEffectManager.PlaySound( m_SoundsetBuildLoop, action_data.m_Target.GetObject().GetPosition(), 0, 0, true );
300 }
301 }
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
Definition EffectSound.c:274

Перекрестные ссылки EffectSound::IsSoundPlaying(), m_BuildLoopSound, m_SoundsetBuildLoop и SEffectManager::PlaySound().

Используется в OnStartAnimationLoopClient().

◆ PlayActionStartSound()

void PlayActionStartSound ( ActionData action_data)
inlineprotected
290 {
291 EffectSound sound = SEffectManager.PlaySound(m_SoundsetBuildStart, action_data.m_Target.GetObject().GetPosition());
292 sound.SetAutodestroy( true );
293 }

Перекрестные ссылки m_SoundsetBuildStart и SEffectManager::PlaySound().

Используется в OnStartClient().

◆ ReadFromContext()

override bool ReadFromContext ( ParamsReadContext ctx,
out ActionReciveData action_recive_data )
inlineprotected
160 {
162 super.ReadFromContext(ctx, action_recive_data);
163
164 string part_type;
165 if ( ctx.Read(part_type) )
166 {
168 return true;
169 }
170 else
171 {
172 return false;
173 }
174 }

Перекрестные ссылки BuildPartActionReciveData::m_PartType.

◆ SetupAction()

override bool SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
inlineprotected
132 {
133 if ( super.SetupAction( player, target, item, action_data, extra_data ) )
134 {
135 if ( !GetGame().IsDedicatedServer() )
136 {
137 ConstructionActionData construction_action_data = action_data.m_Player.GetConstructionActionData();
138 BuildPartActionData.Cast(action_data).m_PartType = construction_action_data.GetBuildPartNoToolAtIndex(m_VariantID).GetPartName();
139 }
140 return true;
141 }
142
143 return false;
144 }

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

◆ StopActionLoopSound()

void StopActionLoopSound ( )
inlineprotected
304 {
306 {
309 }
310 }
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
Definition EffectSound.c:885
void SoundStop()
Stops sound.
Definition EffectSound.c:217

Перекрестные ссылки m_BuildLoopSound, EffectSound::SetSoundFadeOut() и EffectSound::SoundStop().

Используется в OnEndClient().

◆ UseMainItem()

override bool UseMainItem ( )
inlineprotected
94 {
95 return false;
96 }

◆ WriteToContext()

override void WriteToContext ( ParamsWriteContext ctx,
ActionData action_data )
inlineprotected
153 {
154 super.WriteToContext(ctx, action_data);
155
156 ctx.Write(BuildPartActionData.Cast(action_data).m_PartType);
157 }

Поля

◆ m_BuildLoopSound

EffectSound m_BuildLoopSound
protected

◆ m_SoundsetBuildFinish

string m_SoundsetBuildFinish
private

Используется в DetermineConstructionSounds() и PlayActionFinishSound().

◆ m_SoundsetBuildLoop

string m_SoundsetBuildLoop
private

Используется в DetermineConstructionSounds() и PlayActionLoopSound().

◆ m_SoundsetBuildStart

string m_SoundsetBuildStart
private

Используется в DetermineConstructionSounds() и PlayActionStartSound().


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