Returns an ID of a requester type.
392{
395
397
431
437
439
441 {
443
446
448 }
449
451 {
453 {
456 }
457 }
458
466 {
467 if (!type)
468 {
469 Error(
"Requested type is NULL!");
470 return null;
471 }
472
476 {
478 if (temp.Type() == type)
479 {
481 break;
482 }
483 }
484
485 if (!ret)
486 {
487 Debug.
Log(
"'" + type.ToString() +
"' not found in bank! Register first in 'RegisterRequester' method.");
488 }
489 return ret;
490 }
491
499 {
501
502 if (!ret)
503 {
504 Debug.
Log(
"Requester idx '" + index +
"' not found in bank! Register first in 'RegisterRequester' method.");
505 }
506 return ret;
507 }
508
516 {
517 int ret = -1;
519
521 {
523 if (temp.Type() == type)
524 {
526 }
527 }
528
529 if ( ret == -1 )
530 {
531 Debug.
Log(
"Requester instance of the '" + type.ToString() +
"' type not found in bank! Register first in 'RegisterRequester' method.");
532 }
533 return ret;
534 }
535
542 {
543 typename ret;
545 if ( !temp )
546 {
547 Debug.
Log(
"No requester exists under idx '" + index +
"' in bank! Register first in 'RegisterRequester' method.");
548 }
549 else
550 {
551 ret = temp.Type();
552 }
553
554 return ret;
555 }
556
562 {
565
567 {
568
569 Debug.
Log(
"Trying to register an already existing requester type: " + type);
570 return -1;
571 }
572
574
579
581 }
582
585 {
587 {
588 return true;
589 }
590
593 {
595 if (temp == req)
596 {
597 return true;
598 }
599 }
600
601
602 Debug.
Log(
"Requester instance '" + req +
"' not valid! Please use registered instances from PPERequesterBank.");
603 return false;
604 }
605
608 {
610 if (req)
611 {
613 }
614 else
615 {
616 Debug.
Log(
"'" + type.ToString() +
"' not found in bank! Register first in 'RegisterRequester' method.");
617 }
618
619 return false;
620 }
621
624 {
626 if (req)
627 {
629 }
630 else
631 {
632 Debug.
Log(
"Requester idx '" + index +
"' not found in bank! Register first in 'RegisterRequester' method.");
633 }
634
635 return false;
636 }
637
638
639
640
641
642
643
644
645
646
647}
648
651{
653 {
655 }
656
658 {
659
660 }
661}
662
663
664
665
666
667
668
669
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_SQUINT
static const int REQ_UNCONEFFECTS
static const int REQ_SANDSTORMEFFECT
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.
bool IsRequesterRunning()
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.