/// <summary> /// Create or fetch a ModFile by modid. /// The ModFile will have its filename set to the acting mod's path. /// </summary> internal static ModFile GetModFile(string modid) { if (actionfiles.TryGetValue(modid, out ModFile modfile)) { return(modfile); } string path = api?.Invoke("path", modid)?.ToString() ?? modid; return(actionfiles[modid] = new ModFile(path)); }