Returns an instance (singleton) of a requester based on typename.
342{
345
347
381
387
389
391 {
393
396
398 }
399
401 {
403 {
406 }
407 }
408
416 {
417 if (!type)
418 {
419 Error(
"Requested type is NULL!");
420 return null;
421 }
422
426 {
428 if (temp.Type() == type)
429 {
431 break;
432 }
433 }
434
435 if (!ret)
436 {
437 Debug.
Log(
"'" + type.ToString() +
"' not found in bank! Register first in 'RegisterRequester' method.");
438 }
439 return ret;
440 }
441
449 {
451
452 if (!ret)
453 {
454 Debug.
Log(
"Requester idx '" + index +
"' not found in bank! Register first in 'RegisterRequester' method.");
455 }
456 return ret;
457 }
458
466 {
467 int ret = -1;
469
471 {
473 if (temp.Type() == type)
474 {
476 }
477 }
478
479 if ( ret == -1 )
480 {
481 Debug.
Log(
"Requester instance of the '" + type.ToString() +
"' type not found in bank! Register first in 'RegisterRequester' method.");
482 }
483 return ret;
484 }
485
492 {
493 typename ret;
495 if ( !temp )
496 {
497 Debug.
Log(
"No requester exists under idx '" + index +
"' in bank! Register first in 'RegisterRequester' method.");
498 }
499 else
500 {
501 ret = temp.Type();
502 }
503
504 return ret;
505 }
506
512 {
515
517 {
518
519 Debug.
Log(
"Trying to register an already existing requester type: " + type);
520 return -1;
521 }
522
524
529
531 }
532
535 {
537 {
538 return true;
539 }
540
543 {
545 if (temp == req)
546 {
547 return true;
548 }
549 }
550
551
552 Debug.
Log(
"Requester instance '" + req +
"' not valid! Please use registered instances from PPERequesterBank.");
553 return false;
554 }
555
558 {
560 if (req)
561 {
563 }
564 else
565 {
566 Debug.
Log(
"'" + type.ToString() +
"' not found in bank! Register first in 'RegisterRequester' method.");
567 }
568
569 return false;
570 }
571
574 {
576 if (req)
577 {
579 }
580 else
581 {
582 Debug.
Log(
"Requester idx '" + index +
"' not found in bank! Register first in 'RegisterRequester' method.");
583 }
584
585 return false;
586 }
587
588
589
590
591
592
593
594
595
596
597}
598
601{
603 {
605 }
606
608 {
609
610 }
611}
612
613
614
615
616
617
618
619
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.