4 class PPERequesterBank
extends Managed
9 static int m_lastID = -1;
12 static const int REQ_INVENTORYBLUR = RegisterRequester(PPERequester_InventoryBlur);
13 static const int REQ_CONTROLLERDISCONNECT = RegisterRequester(PPERequester_ControllerDisconnectBlur);
14 static const int REQ_GLASSESSPORTBLACK = RegisterRequester(PPERequester_GlassesSportBlack);
15 static const int REQ_GLASSESSPORTBLUE = RegisterRequester(PPERequester_GlassesSportBlue);
16 static const int REQ_GLASSESSPORTGREEN = RegisterRequester(PPERequester_GlassesSportGreen);
17 static const int REQ_GLASSESSPORTORANGE = RegisterRequester(PPERequester_GlassesSportOrange);
18 static const int REQ_GLASSESAVIATOR = RegisterRequester(PPERequester_GlassesAviator);
19 static const int REQ_GLASSESDESIGNER = RegisterRequester(PPERequester_GlassesDesignerBlack);
20 static const int REQ_GLASSESTACTICAL = RegisterRequester(PPERequester_TacticalGoggles);
21 static const int REQ_MOTOHELMETBLACK = RegisterRequester(PPERequester_MotoHelmetBlack);
22 static const int REQ_GLASSESWELDING = RegisterRequester(PPERequester_WeldingMask);
23 static const int REQ_CAMERANV = RegisterRequester(PPERequester_CameraNV);
24 static const int REQ_CAMERAADS = RegisterRequester(PPERequester_CameraADS);
25 static const int REQ_BLOODLOSS = RegisterRequester(PPERequester_BloodLoss);
26 static const int REQ_DEATHEFFECTS = RegisterRequester(PPERequester_DeathDarkening);
27 static const int REQ_UNCONEFFECTS = RegisterRequester(PPERequester_UnconEffects);
28 static const int REQ_TUNELVISSION = RegisterRequester(PPERequester_TunnelVisionEffects);
29 static const int REQ_BURLAPSACK = RegisterRequester(PPERequester_BurlapSackEffects);
30 static const int REQ_INTROCHROMABB = RegisterRequester(PPERequester_IntroChromAbb);
31 static const int REQ_FEVEREFFECTS = RegisterRequester(PPERequester_FeverEffects);
32 static const int REQ_FLASHBANGEFFECTS = RegisterRequester(PPERequester_FlashbangEffects);
33 static const int REQ_SHOCKHITEFFECTS = RegisterRequester(PPERequester_ShockHitReaction);
34 static const int REQ_HEALTHHITEFFECTS = RegisterRequester(PPERequester_HealthHitReaction);
35 static const int REQ_MENUEFFECTS = RegisterRequester(PPERequester_MenuEffects);
36 static const int REQ_CONTROLLERBLUR = RegisterRequester(PPERequester_ControlsBlur);
37 static const int REQ_SERVERBROWSEREFFECTS = RegisterRequester(PPERequester_ServerBrowserBlur);
38 static const int REQ_TUTORIALEFFECTS = RegisterRequester(PPERequester_TutorialMenu);
39 static const int REQ_CONTAMINATEDAREA = RegisterRequester(PPERequester_ContaminatedAreaTint);
40 static const int REQ_SPOOKYAREA = RegisterRequester(PPERequester_SpookyAreaTint);
41 static const int REQ_PAINBLUR = RegisterRequester(PPERequester_PainBlur);
42 static const int REQ_UNDERGROUND = RegisterRequester(PPERUndergroundAcco);
43 static const int REQ_DROWNING = RegisterRequester(PPERequester_Drowning);
61 delete m_Registrations;
76 Error(
"Requested type is NULL!");
82 for (
int i = 0; i < m_Instances.Count(); i++)
84 temp = m_Instances.GetElement(i);
85 if (temp.Type() == type)
87 Class.CastTo(ret,temp);
94 Debug.Log(
"'" + type.ToString() +
"' not found in bank! Register first in 'RegisterRequester' method.");
111 Debug.Log(
"Requester idx '" + index +
"' not found in bank! Register first in 'RegisterRequester' method.");
122 static int GetRequesterID(
typename type)
127 for (
int i = 0; i < m_Instances.Count(); i++)
129 temp = m_Instances.GetElement(i);
130 if (temp.Type() == type)
132 ret = m_Instances.GetKey(i);
138 Debug.Log(
"Requester instance of the '" + type.ToString() +
"' type not found in bank! Register first in 'RegisterRequester' method.");
148 static typename GetRequesterTypename(
int index)
154 Debug.Log(
"No requester exists under idx '" + index +
"' in bank! Register first in 'RegisterRequester' method.");
168 static int RegisterRequester(
typename type)
176 Debug.Log(
"Trying to register an already existing requester type: " + type);
184 req.SetRequesterIDX(m_lastID);
185 m_Instances.Set(m_lastID,req);
199 for (
int i = 0; i < m_Instances.Count(); i++)
201 temp = m_Instances.GetElement(i);
209 Debug.Log(
"Requester instance '" + req +
"' not valid! Please use registered instances from PPERequesterBank.");