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

◆ TurnOnTransmitter()

void IsInventoryVisible::TurnOnTransmitter ( )

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

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