Returns an instance (singleton) of a requester based on index.
339{
342
344
378
382
384
386 {
388
391
393 }
394
396 {
398 {
401 }
402 }
403
411 {
412 if (!type)
413 {
414 Error(
"Requested type is NULL!");
415 return null;
416 }
417
421 {
423 if (temp.Type() == type)
424 {
426 break;
427 }
428 }
429
430 if (!ret)
431 {
432 Debug.
Log(
"'" + type.ToString() +
"' not found in bank! Register first in 'RegisterRequester' method.");
433 }
434 return ret;
435 }
436
444 {
446
447 if (!ret)
448 {
449 Debug.
Log(
"Requester idx '" + index +
"' not found in bank! Register first in 'RegisterRequester' method.");
450 }
451 return ret;
452 }
453
461 {
462 int ret = -1;
464
466 {
468 if (temp.Type() == type)
469 {
471 }
472 }
473
474 if ( ret == -1 )
475 {
476 Debug.
Log(
"Requester instance of the '" + type.ToString() +
"' type not found in bank! Register first in 'RegisterRequester' method.");
477 }
478 return ret;
479 }
480
487 {
488 typename ret;
490 if ( !temp )
491 {
492 Debug.
Log(
"No requester exists under idx '" + index +
"' in bank! Register first in 'RegisterRequester' method.");
493 }
494 else
495 {
496 ret = temp.Type();
497 }
498
499 return ret;
500 }
501
507 {
510
512 {
513
514 Debug.
Log(
"Trying to register an already existing requester type: " + type);
515 return -1;
516 }
517
519
524
526 }
527
530 {
532 {
533 return true;
534 }
535
538 {
540 if (temp == req)
541 {
542 return true;
543 }
544 }
545
546
547 Debug.
Log(
"Requester instance '" + req +
"' not valid! Please use registered instances from PPERequesterBank.");
548 return false;
549 }
550
551
552
553
554
555
556
557
558
559
560}
561
564{
566 {
568 }
569
571 {
572
573 }
574}
575
576
577
578
579
580
581
582
static const int REQ_HEALTHHITEFFECTS
static const int REQ_GLASSESTACTICAL
static const int REQ_CONTROLLERDISCONNECT
static const int REQ_LATENCYBLUR
static const int REQ_GLASSESSPORTBLACK
void RegisterAdditionalRequesters()
static ref map< int, ref PPERequesterBase > m_Instances
static const int REQ_FEEDBACKBLUR
static const int REQ_INTROCHROMABB
static const int REQ_CONTROLLERBLUR
static const int REQ_GLASSESDESIGNER
class PPERequesterBank extends Managed PPERequesterRegistrations()
Mod this, if you wish to register custom requesters inside 'RegisterAdditionalRequesters' override.
static const int REQ_BURLAPSACK
static const int REQ_INVENTORYBLUR
static const int REQ_CONTAMINATEDAREA
static const int REQ_GLASSESAVIATOR
static const int REQ_MOTOHELMETBLACK
static bool VerifyRequester(PPERequesterBase req)
Verifies the instance.
static const int REQ_GLASSESSPORTORANGE
static const int REQ_CAMERANV
static const int REQ_SHOCKHITEFFECTS
static const int REQ_FEVEREFFECTS
static int RegisterRequester(typename type)
Registers new requester type.
static const int REQ_DROWNING
static int GetRequesterID(typename type)
Returns an ID of a requester type.
static const int REQ_TUTORIALEFFECTS
static ref PPERequesterRegistrations m_Registrations
static const int REQ_DEATHEFFECTS
static GetRequesterTypename(int index)
Returns a typename from a requester ID.
static const int REQ_UNCONEFFECTS
static const int REQ_TUNELVISSION
static const int REQ_BLOODLOSS
static const int REQ_HMP_GHOST
static const int REQ_GLASSESWELDING
static const int REQ_PAINBLUR
static const int REQ_FLASHBANGEFFECTS
static const int REQ_CAMERAADS
static const int REQ_MENUEFFECTS
static const int REQ_UNDERGROUND
static const int REQ_GLASSESSPORTBLUE
static const int REQ_SERVERBROWSEREFFECTS
static const int REQ_GLASSESSPORTGREEN
static const int REQ_SPOOKYAREA
PPERUndergroundAcco GetRequester()
Super root of all classes in Enforce script.
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
void SetRequesterIDX(int idx)
automatically assigned by PPERequesterBank
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.