/// <summary> Find partial matches of 'name' against the list of all map files. </summary> public static string FindMaps(Player pl, string name) { int matches = 0; if (!Formatter.ValidName(pl, name, "level")) { return(null); } string[] files = LevelInfo.AllMapFiles(); string map = Find <string>(pl, name, out matches, files, null, l => Path.GetFileNameWithoutExtension(l), "levels", 10); if (map != null) { map = Path.GetFileNameWithoutExtension(map); } return(map); }
static string TokenWorlds(Player p) { return(LevelInfo.AllMapFiles().Length.ToString()); }