323 {
324 if (effect.IsRegistered())
325 {
326 ErrorEx(
string.Format(
"Attempted to register Effect '%1' which was already registered.", effect.GetDebugName()),
ErrorExSeverity.INFO);
327 return effect.GetID();
328 }
329
330 int id;
331
333 {
336 effect.Event_OnRegistered(id);
337 }
338 else
339 ErrorEx(
"Attempted to register Effect while SEffectManager is cleaning up, request ignored.",
ErrorExSeverity.WARNING);
340
341 return id;
342 }
static int GetFreeEffectID()
Helper function for EffectRegister to decide an Effect ID.
static ref map< int, ref Effect > m_EffectsMap
Static map of all registered effects <id, Effect>
static bool m_IsCleanup
Bool to check whether Cleanup is happening, which means that the maps should no longer be accessed.