namespace MrGameEng.Mods; /// One discovered mod: its metadata and content directories on disk. public sealed class Mod { internal Mod(ModInfo info, string rootPath) { Info = info; RootPath = rootPath; } /// Metadata from About/About.json. public ModInfo Info { get; } /// Absolute path of the mod's root directory. public string RootPath { get; } /// Unique mod id (shortcut for Info.Id). public string Id => Info.Id; /// /// Absolute path of a content folder inside the mod (e.g. Defs, Textures, /// Languages). The folder is not required to exist. /// public string ContentPath(string folder) => Path.Combine(RootPath, folder); /// public override string ToString() => $"{Id} {Info.Version}".TrimEnd(); }