Returns an instance (singleton) of a requester based on index.
335{
338
340
374
376
378
380 {
382
385
387 }
388
390 {
392 {
395 }
396 }
397
403
405 {
406 if (!type)
407 {
408 Error(
"Requested type is NULL!");
410 }
411
415 {
417 if (
temp.Type() == type)
418 {
420 break;
421 }
422 }
423
425 {
426 Debug.
Log(
"'" + type.ToString() +
"' not found in bank! Register first in 'RegisterRequester' method.");
427 }
429 }
430
436
438 {
440
442 {
443 Debug.
Log(
"Requester idx '" +
index +
"' not found in bank! Register first in 'RegisterRequester' method.");
444 }
446 }
447
453
455 {
458
460 {
462 if (
temp.Type() == type)
463 {
465 }
466 }
467
469 {
470 Debug.
Log(
"Requester instance of the '" + type.ToString() +
"' type not found in bank! Register first in 'RegisterRequester' method.");
471 }
473 }
474
479
481 {
485 {
486 Debug.
Log(
"No requester exists under idx '" +
index +
"' in bank! Register first in 'RegisterRequester' method.");
487 }
488 else
489 {
491 }
492
494 }
495
499
501 {
504
506 {
507
508 Debug.
Log(
"Trying to register an already existing requester type: " + type);
509 return -1;
510 }
511
513
518
520 }
521
524 {
526 {
527 return true;
528 }
529
532 {
535 {
536 return true;
537 }
538 }
539
540
541 Debug.
Log(
"Requester instance '" +
req +
"' not valid! Please use registered instances from PPERequesterBank.");
542 return false;
543 }
544
545
546
547
548
549
550
551
552
553
554}
555
558{
560 {
561
562 }
563}
564
565
566
567
568
569
570
571
static const int REQ_HEALTHHITEFFECTS
Definition PPERequesterBank.c:258
static const int REQ_GLASSESTACTICAL
Definition PPERequesterBank.c:244
static const int REQ_CONTROLLERDISCONNECT
Definition PPERequesterBank.c:237
static void Init()
Definition PPERequesterBank.c:273
static const int REQ_GLASSESSPORTBLACK
Definition PPERequesterBank.c:238
static void Cleanup()
Definition PPERequesterBank.c:283
static ref map< int, ref PPERequesterBase > m_Instances
Definition PPERequesterBank.c:230
static const int REQ_INTROCHROMABB
Definition PPERequesterBank.c:254
static const int REQ_CONTROLLERBLUR
Definition PPERequesterBank.c:260
static const int REQ_GLASSESDESIGNER
Definition PPERequesterBank.c:243
class PPERequesterBank extends Managed PPERequesterRegistrations()
Mod this, if you wish to register custom requesters.
Definition PPERequesterBank.c:229
static const int REQ_BURLAPSACK
Definition PPERequesterBank.c:253
static bool VerifyRequester(PPERequesterBase req)
Verifies the instance.
Definition PPERequesterBank.c:417
static int RegisterRequester(typename type)
Registers new requester type.
Definition PPERequesterBank.c:394
static const int REQ_INVENTORYBLUR
Definition PPERequesterBank.c:236
static const int REQ_CONTAMINATEDAREA
Definition PPERequesterBank.c:263
static const int REQ_GLASSESAVIATOR
Definition PPERequesterBank.c:242
static const int REQ_MOTOHELMETBLACK
Definition PPERequesterBank.c:245
static bool m_Initialized
Definition PPERequesterBank.c:231
static int m_lastID
Definition PPERequesterBank.c:233
static const int REQ_GLASSESSPORTORANGE
Definition PPERequesterBank.c:241
static const int REQ_CAMERANV
Definition PPERequesterBank.c:247
static const int REQ_SHOCKHITEFFECTS
Definition PPERequesterBank.c:257
static const int REQ_FEVEREFFECTS
Definition PPERequesterBank.c:255
static const int REQ_DROWNING
Definition PPERequesterBank.c:267
static const int INVALID
Definition PPERequesterBank.c:235
static const int REQ_TUTORIALEFFECTS
Definition PPERequesterBank.c:262
static ref PPERequesterRegistrations m_Registrations
Definition PPERequesterBank.c:271
static const int REQ_DEATHEFFECTS
Definition PPERequesterBank.c:250
static const int REQ_UNCONEFFECTS
Definition PPERequesterBank.c:251
static int GetRequesterID(typename type)
Returns an ID of a requester type.
Definition PPERequesterBank.c:348
static const int REQ_TUNELVISSION
Definition PPERequesterBank.c:252
static const int REQ_BLOODLOSS
Definition PPERequesterBank.c:249
static const int REQ_HMP_GHOST
Definition PPERequesterBank.c:269
static const int REQ_GLASSESWELDING
Definition PPERequesterBank.c:246
static const int REQ_PAINBLUR
Definition PPERequesterBank.c:265
static const int REQ_FLASHBANGEFFECTS
Definition PPERequesterBank.c:256
static const int REQ_CAMERAADS
Definition PPERequesterBank.c:248
static GetRequesterTypename(int index)
Returns a typename from a requester ID.
Definition PPERequesterBank.c:374
static const int REQ_MENUEFFECTS
Definition PPERequesterBank.c:259
static const int REQ_UNDERGROUND
Definition PPERequesterBank.c:266
static const int REQ_GLASSESSPORTBLUE
Definition PPERequesterBank.c:239
static const int REQ_SERVERBROWSEREFFECTS
Definition PPERequesterBank.c:261
static const int REQ_GLASSESSPORTGREEN
Definition PPERequesterBank.c:240
static const int REQ_SPOOKYAREA
Definition PPERequesterBank.c:264
PPERUndergroundAcco GetRequester()
Definition UndergroundHandlerClient.c:54
Super root of all classes in Enforce script.
Definition EnScript.c:11
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.
Definition Debug.c:136
TODO doc.
Definition EnScript.c:118
Definition PPERequestPlatformsBase.c:3
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.