Exemplo n.º 1
0
        public static void PrintContent(string pathToMod, Action <string> output)
        {
            IOblivionModGetter mod = OblivionMod.CreateFromBinaryOverlay(pathToMod);

            foreach (var name in mod.NPCs.Records
                     .Select(npc => npc.Name)
                     .Distinct()
                     .Where(s => !string.IsNullOrWhiteSpace(s)))
            {
                output(name);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a Link Cache using a single mod as its link target.  Mod is allowed to be modified afterwards, but
 /// this comes at a performance cost of not allowing much caching to be done.  If the mod is not expected to
 /// be modified afterwards, use ImmutableModLinkCache instead.<br/>
 /// </summary>
 /// <param name="mod">Mod to construct the package relative to</param>
 /// <returns>LinkPackage attached to given mod</returns>
 public static MutableModLinkCache <IOblivionMod, IOblivionModGetter> ToMutableLinkCache(this IOblivionModGetter mod)
 {
     return(mod.ToMutableLinkCache <IOblivionMod, IOblivionModGetter>());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a Link Cache using a single mod as its link target. <br/>
 /// Modification of the target Mod is not safe.  Internal caches can become incorrect if 
 /// modifications occur on content already cached.
 /// </summary>
 /// <param name="mod">Mod to construct the package relative to</param>
 /// <returns>LinkPackage attached to given mod</returns>
 public static ImmutableModLinkCache<IOblivionMod, IOblivionModGetter> ToImmutableLinkCache(this IOblivionModGetter mod)
 {
     return mod.ToImmutableLinkCache<IOblivionMod, IOblivionModGetter>();
 }