DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл AdvancedCommunication.c

См. исходные тексты.

Структуры данных

class  EntityAI
 
class  AdvancedCommunication
 

Функции

void AdvancedCommunication ()
 
void TurnOnTransmitter ()
 
void TurnOffTransmitter ()
 
void InitializeActions ()
 
override void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
 
void SetActions ()
 
void AddAction (typename actionName)
 
void RemoveAction (typename actionName)
 

Переменные

static ref map< typename, ref TInputActionMapm_AdvComTypeActionsMap = new map<typename, ref TInputActionMap>
 
TInputActionMap m_InputActionMap
 
bool m_ActionsInitialize
 
class PASBroadcaster extends AdvancedCommunication IsInventoryVisible
 

Функции

◆ AddAction()

void AddAction ( typename actionName )

Используется в ManBase::AddAction(), RemoteDetonatorReceiver(), EntityAI::SetActions(), Land_Radio_PanelBig::SetActions(), Land_Misc_Through_Static::SetActions(), Land_Underground_Panel_Lever::SetActions(), SetActions(), BuildingSuper::SetActions(), InventoryItemSuper::SetActions(), ItemBase::SetActions(), ItemOptics::SetActions(), ClaymoreMine::SetActions(), ImprovisedExplosive::SetActions(), Plastic_Explosive::SetActions(), RemoteDetonatorTrigger::SetActions(), Rifle_Base::SetActions(), BoltActionRifle_ExternalMagazine_Base::SetActions(), BoltActionRifle_Base::SetActions(), DoubleBarrel_Base::SetActions(), Weapon_Base::SetActions(), Mp133Shotgun_Base::SetActions(), Weapon::SetActions(), InventoryItem::SetActions(), Barrel_ColorBase::SetActions(), BaseBuildingBase::SetActions(), Battery9V::SetActions(), BloodContainerBase::SetActions(), ToolBase::SetActions(), CattleProd::SetActions(), Chemlight_ColorBase::SetActions(), ItemMap::SetActions(), Clothing::SetActions(), Mask_Base::SetActions(), HeadGear_Base::SetActions(), Top_Base::SetActions(), Pants_Base::SetActions(), BushlatPoliceJacket_ColorBase::SetActions(), DrysackBag_ColorBase::SetActions(), Glasses_Base::SetActions(), Shoes_Base::SetActions(), Gloves_Base::SetActions(), HelmetBase::SetActions(), NavyUniformJacket::SetActions(), NavyUniformPants::SetActions(), RopeBelt::SetActions(), SnowstormUshanka_ColorBase::SetActions(), WitchHoodCoif_ColorBase::SetActions(), Compass::SetActions(), Edible_Base::SetActions(), AgaricusMushroom::SetActions(), Apple::SetActions(), AuriculariaMushroom::SetActions(), Banana::SetActions(), BoletusMushroom::SetActions(), Cauldron::SetActions(), Pot::SetActions(), Cannabis::SetActions(), ChelatingTablets::SetActions(), CraterellusMushroom::SetActions(), DisinfectantSpray::SetActions(), GreenBellPepper::SetActions(), Kiwi::SetActions(), LactariusMushroom::SetActions(), MacrolepiotaMushroom::SetActions(), Orange::SetActions(), Pear::SetActions(), PleurotusMushroom::SetActions(), Plum::SetActions(), Potato::SetActions(), SlicedPumpkin::SetActions(), TetracyclineAntibiotics::SetActions(), Tomato::SetActions(), TunaCan::SetActions(), VitaminBottle::SetActions(), Zucchini::SetActions(), EyeMask_ColorBase::SetActions(), FireplaceBase::SetActions(), FishingRod_Base_New::SetActions(), WoodenCrate::SetActions(), Bandana_ColorBase::SetActions(), Shemag_ColorBase::SetActions(), Bone::SetActions(), DuctTape::SetActions(), SmallStone::SetActions(), TannedLeather::SetActions(), BurlapSack::SetActions(), ChickenFeather::SetActions(), LongWoodenStick::SetActions(), SharpWoodenStick::SetActions(), Spear::SetActions(), Fabric::SetActions(), AntiPestsSpray::SetActions(), SeedBase::SetActions(), SodaCan_ColorBase::SetActions(), BakedBeansCan_Opened::SetActions(), DogFoodCan::SetActions(), PorkCan::SetActions(), Lunchmeat::SetActions(), CrabCan::SetActions(), Pajka::SetActions(), Pate::SetActions(), BrisketSpread::SetActions(), Marmalade::SetActions(), MushroomBase::SetActions(), Honey::SetActions(), Zagorky_ColorBase::SetActions(), Snack_ColorBase::SetActions(), PeachesCan_Opened::SetActions(), PowderedMilk::SetActions(), Rice::SetActions(), SardinesCan_Opened::SetActions(), SpaghettiCan_Opened::SetActions(), TacticalBaconCan_Opened::SetActions(), TunaCan_Opened::SetActions(), AntiChemInjector::SetActions(), BloodTestKit::SetActions(), DisinfectantAlcohol::SetActions(), Epinephrine::SetActions(), IodineTincture::SetActions(), Morphine::SetActions(), SalineBagIV::SetActions(), Splint::SetActions(), GPSReceiver::SetActions(), Binoculars::SetActions(), AlarmClock_ColorBase::SetActions(), BroomBase::SetActions(), Crowbar::SetActions(), EpoxyPutty::SetActions(), FarmingHoe::SetActions(), FireExtinguisher::SetActions(), HandcuffKeys::SetActions(), Handcuffs::SetActions(), HandSaw::SetActions(), HayHook::SetActions(), Iceaxe::SetActions(), KitchenTimer::SetActions(), LeatherSewingKit::SetActions(), Lockpick::SetActions(), LugWrench::SetActions(), MeatTenderizer::SetActions(), Paddle::SetActions(), SewingKit::SetActions(), Wrench::SetActions(), Container_Base::SetActions(), Grenade_Base::SetActions(), Heatpack::SetActions(), FryingPan::SetActions(), KazuarOptic::SetActions(), StarlightOptic::SetActions(), Inventory_Base::SetActions(), LongTorch::SetActions(), ItemMegaphone::SetActions(), PoweredOptic_Base::SetActions(), PunchedCard::SetActions(), ItemRadio::SetActions(), Roadflare::SetActions(), StunBaton::SetActions(), Switchable_Base::SetActions(), TelescopicBaton::SetActions(), TentBase::SetActions(), FlammableBase::SetActions(), ItemTransmitter::SetActions(), TrapBase::SetActions(), TrapSpawnBase::SetActions(), TripodBase::SetActions(), VehicleBattery::SetActions(), WoodenStick::SetActions(), CarScript::SetActions(), ManBase::SetActions(), ManBase::SetActionsRemoteTarget() и UnknownFoodCan_Opened().

◆ AdvancedCommunication()

void AdvancedCommunication ( )
142{
143 proto native void SwitchOn(bool onOff);
144 proto native bool IsOn();
145};
146
147class StaticTransmitter extends AdvancedCommunication
148{
149 proto native void SwitchOn(bool onOff);
Definition AdvancedCommunication.c:142
Definition EntityAI.c:95

◆ GetActions()

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 {
265 SetActions();
266 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
267 }
268 }
269
271 {
273 {
274 m_ActionsInitialize = true;
276 }
277
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
306
307 if (!action_array)
308 {
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 {
323 ActionBase action = player.GetActionManager().GetAction(actionName);
324 typename ai = action.GetInputType();
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}
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Definition ActionManagerClient.c:1
TInputActionMap m_InputActionMap
Definition AdvancedCommunication.c:137
void TurnOnTransmitter()
Definition AdvancedCommunication.c:180
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Definition AdvancedCommunication.c:202
bool m_ActionsInitialize
Definition AdvancedCommunication.c:138
class PASBroadcaster extends AdvancedCommunication IsInventoryVisible
Definition AdvancedCommunication.c:135
void AdvancedCommunication()
Definition AdvancedCommunication.c:140
static ref map< typename, ref TInputActionMap > m_AdvComTypeActionsMap
Definition AdvancedCommunication.c:136
void RemoveAction(typename actionName)
Definition AdvancedCommunication.c:252
void SetActions()
Definition AdvancedCommunication.c:213
void TurnOffTransmitter()
Definition AdvancedCommunication.c:185
void InitializeActions()
Definition AdvancedCommunication.c:190
string Type
Definition JsonDataContaminatedArea.c:11
PlayerBase GetPlayer()
Definition ModifierBase.c:51
Definition ActionBase.c:53
Definition ActionDetachPowerSourceFromPanel.c:3
Definition ActionTurnOffTransmitterOnGround.c:2
Definition ActionTurnOnTransmitterOnGround.c:2
Definition Debug.c:14
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:141
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.
Definition Debug.c:259
Definition Debug.c:600
static bool IsActionLogEnable()
Definition Debug.c:644
Definition Land_Radio_PanelPAS.c:2
Definition Land_Lamp_City1_amp.c:2
Definition PlayerBaseClient.c:2
proto native CGame GetGame()

◆ InitializeActions()

void InitializeActions ( )
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 {
253 SetActions();
254 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
255 }
256 }
257
259 {
261 {
262 m_ActionsInitialize = true;
264 }
265
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
294
295 if (!action_array)
296 {
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 {
311 ActionBase action = player.GetActionManager().GetAction(actionName);
312 typename ai = action.GetInputType();
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}

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

◆ RemoveAction()

void RemoveAction ( typename actionName )
253{
257
259 {
260 if (!GetGame().IsDedicatedServer())
261 {
262 if(GetGame().GetPlayer())
263 {
264 m_ActionsInitialize = false;
265 }
266 }
267 }
268
269 //HUD
270 /*
271 protected Hud GetHud( PlayerBase player )
272 {
273 if ( !player )
274 {
275 return NULL;
276 }
277
278 return player.m_Hud;
279 }
280
281 void DisplayRadioInfo( string message, PlayerBase player )
282 {
283 Hud hud;
284 if ( player )
285 {
286 hud = GetHud( player );
287 }
288
289 if ( hud )
290 {
291 hud.SetWalkieTalkieText( message );
292 hud.ShowWalkieTalkie( 3 );
293 }
294 }
295 */
296
297 //control transmitter via user actions
298 void TurnOnTransmitter()
299 {
300 GetCompEM().SwitchOn();
301 }
302
303 void TurnOffTransmitter()
304 {
305 GetCompEM().SwitchOff();
306 }
307
308 void InitializeActions()
309 {
311 if(!m_InputActionMap)
312 {
315 SetActions();
316 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
317 }
318 }
319
321 {
323 {
324 m_ActionsInitialize = true;
326 }
327
329 }
330
331 void SetActions()
332 {
336 }
337
338 void AddAction(typename actionName)
339 {
340 ActionBase action = ActionManagerBase.GetAction(actionName);
341
342 if (!action)
343 {
344 Debug.LogError("Action " + actionName + " dosn't exist!");
345 return;
346 }
347
348 typename ai = action.GetInputType();
349 if (!ai)
350 {
351 m_ActionsInitialize = false;
352 return;
353 }
354
356
357 if (!action_array)
358 {
361 }
362
364 {
365 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
366 }
367 action_array.Insert(action);
368 }
369
370 void RemoveAction(typename actionName)
371 {
373 ActionBase action = player.GetActionManager().GetAction(actionName);
374 typename ai = action.GetInputType();
376
377 if (action_array)
378 {
379 action_array.RemoveItem(action);
380 }
381 }
382}
383
385{
386 override bool IsInventoryVisible()
387 {
388 return false;
389 }
390};
391
393{
394 proto native void SwitchOn(bool onOff);
395 proto native bool IsOn();
396};
397
398class StaticTransmitter extends AdvancedCommunication
399{
400 proto native void SwitchOn(bool onOff);
401 proto native bool IsOn();
402 proto native void SetNextChannel();
403 proto native void SetPrevChannel();
404 proto native float GetTunedFrequency();
405 proto native void EnableBroadcast(bool state);
406 proto native void EnableReceive(bool state);
407 proto native bool IsBroadcasting();
408 proto native bool IsReceiving();
409 proto native int GetTunedFrequencyIndex();
410 proto native void SetFrequencyByIndex(int index);
411}

Используется в OnVariablesSynchronized(), ManBase::RemoveAction(), Land_Misc_Through_Static::SetActions(), CarDoor::SetActions(), RemoteDetonatorTrigger::SetActions(), Rifle_Base::SetActions(), BoltActionRifle_Base::SetActions(), DoubleBarrel_Base::SetActions(), Weapon_Base::SetActions(), Mp133Shotgun_Base::SetActions(), SetActions(), ItemBase::SetActions(), Cauldron::SetActions(), Pot::SetActions(), Binoculars::SetActions(), PoweredOptic_Base::SetActions(), TentBase::SetActions() и TrapSpawnBase::SetActions().

◆ SetActions()

override void SetActions ( )
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 {
276 SetActions();
277 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
278 }
279 }
280
282 {
284 {
285 m_ActionsInitialize = true;
287 }
288
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
317
318 if (!action_array)
319 {
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 {
334 ActionBase action = player.GetActionManager().GetAction(actionName);
335 typename ai = action.GetInputType();
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}

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

◆ TurnOffTransmitter()

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

◆ TurnOnTransmitter()

void TurnOnTransmitter ( )
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 {
243 SetActions();
244 m_AdvComTypeActionsMap.Insert(this.Type(), m_InputActionMap);
245 }
246 }
247
249 {
251 {
252 m_ActionsInitialize = true;
254 }
255
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
284
285 if (!action_array)
286 {
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 {
301 ActionBase action = player.GetActionManager().GetAction(actionName);
302 typename ai = action.GetInputType();
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}

Переменные

◆ IsInventoryVisible

136 {
137 return false;
138 }

◆ m_ActionsInitialize

◆ m_AdvComTypeActionsMap

ref map<typename, ref TInputActionMap> m_AdvComTypeActionsMap = new map<typename, ref TInputActionMap>
static

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

◆ m_InputActionMap