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

◆ InitializeActions()

void IsInventoryVisible::InitializeActions ( )

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

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