/// <summary> /// <para>Adds the specified <typeparamref name="TEffect"/> type to the factory.</para> /// </summary> /// <typeparam name="TEffect">The <see cref="CustomEffect"/> type to add.</typeparam> /// <returns>The added effect's metadata.</returns> public EffectInfo AddEffect <TEffect>() where TEffect : CustomEffect, new() { EffectInfo info = EffectInfo.Get <TEffect>(); if (RogueFramework.IsDebugEnabled(DebugFlags.Effects)) { RogueFramework.LogDebug($"Created custom effect {typeof(TEffect)} ({info.Name})."); } effectsDict.Add(info.Name, new EffectEntry { Initializer = () => new TEffect(), EffectInfo = info }); return(info); }