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

◆ GetActions()

override void IsInventoryVisible::GetActions ( typename action_input_type ,
out array< ActionBase_Basic > actions )

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

203{
207
209 {
210 if (!GetGame().IsDedicatedServer())
211 {
212 if(GetGame().GetPlayer())
213 {
214 m_ActionsInitialize = false;
215 }
216 }
217 }
218
219 //HUD
220 /*
221 protected Hud GetHud( PlayerBase player )
222 {
223 if ( !player )
224 {
225 return NULL;
226 }
227
228 return player.m_Hud;
229 }
230
231 void DisplayRadioInfo( string message, PlayerBase player )
232 {
233 Hud hud;
234 if ( player )
235 {
236 hud = GetHud( player );
237 }
238
239 if ( hud )
240 {
241 hud.SetWalkieTalkieText( message );
242 hud.ShowWalkieTalkie( 3 );
243 }
244 }
245 */
246
247 //control transmitter via user actions
248 void TurnOnTransmitter()
249 {
250 GetCompEM().SwitchOn();
251 }
252
253 void TurnOffTransmitter()
254 {
255 GetCompEM().SwitchOff();
256 }
257
258 void InitializeActions()
259 {
261 if(!m_InputActionMap)
262 {
264 m_InputActionMap = iam;
265 SetActions();
266 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
267 }
268 }
269
270 override void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
271 {
273 {
274 m_ActionsInitialize = true;
276 }
277
278 actions = m_InputActionMap.Get(action_input_type);
279 }
280
281 void SetActions()
282 {
286 }
287
288 void AddAction(typename actionName)
289 {
290 ActionBase action = ActionManagerBase.GetAction(actionName);
291
292 if (!action)
293 {
294 Debug.LogError("Action " + actionName + " dosn't exist!");
295 return;
296 }
297
298 typename ai = action.GetInputType();
299 if (!ai)
300 {
301 m_ActionsInitialize = false;
302 return;
303 }
304
305 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
306
307 if (!action_array)
308 {
309 action_array = new array<ActionBase_Basic>;
310 m_InputActionMap.Insert(ai, action_array);
311 }
312
314 {
315 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
316 }
317 action_array.Insert(action);
318 }
319
320 void RemoveAction(typename actionName)
321 {
322 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
323 ActionBase action = player.GetActionManager().GetAction(actionName);
324 typename ai = action.GetInputType();
325 array<ActionBase_Basic> action_array = m_InputActionMap.Get( ai );
326
327 if (action_array)
328 {
329 action_array.RemoveItem(action);
330 }
331 }
332}
333
335{
336 override bool IsInventoryVisible()
337 {
338 return false;
339 }
340};
341
343{
344 proto native void SwitchOn(bool onOff);
345 proto native bool IsOn();
346};
347
348class StaticTransmitter extends AdvancedCommunication
349{
350 proto native void SwitchOn(bool onOff);
351 proto native bool IsOn();
352 proto native void SetNextChannel();
353 proto native void SetPrevChannel();
354 proto native float GetTunedFrequency();
355 proto native void EnableBroadcast(bool state);
356 proto native void EnableReceive(bool state);
357 proto native bool IsBroadcasting();
358 proto native bool IsReceiving();
359 proto native int GetTunedFrequencyIndex();
360 proto native void SetFrequencyByIndex(int index);
361}
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()