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

◆ SetActions()

override void SetActions ( )

См. определение в файле AdvancedCommunication.c строка 213

214{
218
220 {
221 if (!GetGame().IsDedicatedServer())
222 {
223 if(GetGame().GetPlayer())
224 {
225 m_ActionsInitialize = false;
226 }
227 }
228 }
229
230 //HUD
231 /*
232 protected Hud GetHud( PlayerBase player )
233 {
234 if ( !player )
235 {
236 return NULL;
237 }
238
239 return player.m_Hud;
240 }
241
242 void DisplayRadioInfo( string message, PlayerBase player )
243 {
244 Hud hud;
245 if ( player )
246 {
247 hud = GetHud( player );
248 }
249
250 if ( hud )
251 {
252 hud.SetWalkieTalkieText( message );
253 hud.ShowWalkieTalkie( 3 );
254 }
255 }
256 */
257
258 //control transmitter via user actions
259 void TurnOnTransmitter()
260 {
261 GetCompEM().SwitchOn();
262 }
263
264 void TurnOffTransmitter()
265 {
266 GetCompEM().SwitchOff();
267 }
268
269 void InitializeActions()
270 {
272 if(!m_InputActionMap)
273 {
275 m_InputActionMap = iam;
276 SetActions();
277 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
278 }
279 }
280
281 override void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
282 {
284 {
285 m_ActionsInitialize = true;
287 }
288
289 actions = m_InputActionMap.Get(action_input_type);
290 }
291
292 void SetActions()
293 {
297 }
298
299 void AddAction(typename actionName)
300 {
301 ActionBase action = ActionManagerBase.GetAction(actionName);
302
303 if (!action)
304 {
305 Debug.LogError("Action " + actionName + " dosn't exist!");
306 return;
307 }
308
309 typename ai = action.GetInputType();
310 if (!ai)
311 {
312 m_ActionsInitialize = false;
313 return;
314 }
315
316 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
317
318 if (!action_array)
319 {
320 action_array = new array<ActionBase_Basic>;
321 m_InputActionMap.Insert(ai, action_array);
322 }
323
325 {
326 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
327 }
328 action_array.Insert(action);
329 }
330
331 void RemoveAction(typename actionName)
332 {
333 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
334 ActionBase action = player.GetActionManager().GetAction(actionName);
335 typename ai = action.GetInputType();
336 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
337
338 if (action_array)
339 {
340 action_array.RemoveItem(action);
341 }
342 }
343}
344
346{
347 override bool IsInventoryVisible()
348 {
349 return false;
350 }
351};
352
354{
355 proto native void SwitchOn(bool onOff);
356 proto native bool IsOn();
357};
358
359class StaticTransmitter extends AdvancedCommunication
360{
361 proto native void SwitchOn(bool onOff);
362 proto native bool IsOn();
363 proto native void SetNextChannel();
364 proto native void SetPrevChannel();
365 proto native float GetTunedFrequency();
366 proto native void EnableBroadcast(bool state);
367 proto native void EnableReceive(bool state);
368 proto native bool IsBroadcasting();
369 proto native bool IsReceiving();
370 proto native int GetTunedFrequencyIndex();
371 proto native void SetFrequencyByIndex(int index);
372}
void ActionManagerBase(PlayerBase player)
Определения ActionManagerBase.c:63
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Определения ActionManagerClient.c:1
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
void RemoveAction(typename actionName)
Определения AdvancedCommunication.c:252
void AdvancedCommunication()
Определения AdvancedCommunication.c:140
TInputActionMap m_InputActionMap
Определения AdvancedCommunication.c:137
void TurnOnTransmitter()
Определения AdvancedCommunication.c:180
void TurnOffTransmitter()
Определения AdvancedCommunication.c:185
bool m_ActionsInitialize
Определения AdvancedCommunication.c:138
class PASBroadcaster extends AdvancedCommunication IsInventoryVisible
Определения AdvancedCommunication.c:135
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Определения AdvancedCommunication.c:202
static ref map< typename, ref TInputActionMap > m_AdvComTypeActionsMap
Определения AdvancedCommunication.c:136
void SetActions()
Определения AdvancedCommunication.c:213
void InitializeActions()
Определения AdvancedCommunication.c:190
map
Определения ControlsXboxNew.c:4
string Type
Определения JsonDataContaminatedArea.c:11
PlayerBase GetPlayer()
Определения ModifierBase.c:51
GetInputType()
Определения ActionBase.c:215
Определения ActionBase.c:53
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Определения Debug.c:245
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения Debug.c:127
Определения Debug.c:2
static bool IsActionLogEnable()
Определения Debug.c:638
Определения Debug.c:594
Определения Land_Lamp_City1_amp.c:2
Определения PlayerBaseClient.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()

Используется в EntityAI::InitializeActions(), InitializeActions() и ManBase::InitializeActions().