#include <vector>
#include <string>
#include <set>
#include <unordered_set>
#include "metadata.h"
Go to the source code of this file.
◆ MODNAME_ALLOWED_CHARS
| #define MODNAME_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyz0123456789_" |
◆ ModSpecList
◆ flattenMods()
◆ getModsInPath()
| ModSpecList getModsInPath |
( |
const std::string & | path, |
|
|
const std::string & | virtual_path, |
|
|
int | modpack_depth = 0 ) |
Gets a list of all mods and modpacks in path.
- Parameters
-
| Path | to search, should be absolute |
| modpack_depth | If > 0: Is this searching within a modpack |
| virtual_path | Virtual path for this directory, see comment in ModSpec |
- Returns
- list of mods, sorted by name
References fs::AbsolutePath(), DIR_DELIM, fs::GetDirListing(), and parseModContents().
Referenced by ModConfiguration::addModsFromConfig(), ModConfiguration::addModsInPath(), findLocaleFileInMods(), ModApiMainMenu::l_get_mod_list(), and parseModContents().
◆ parseModContents()
| bool parseModContents |
( |
ModSpec & | mod | ) |
|
|
nodiscard |
Retrieves depends, optdepends, is_modpack and modpack_content.
- Returns
- false if not a mod
References ModSpec::author, ModSpec::depends, ModSpec::deprecation_msgs, ModSpec::desc, DIR_DELIM, Settings::exists(), Settings::get(), getModsInPath(), Settings::getS32(), ModSpec::is_modpack, ModSpec::is_name_explicit, fs::IsFile(), ModSpec::modpack_content, ModSpec::modpack_depth, ModSpec::name, ModSpec::optdepends, parseDependsString(), ModSpec::path, Settings::readConfigFile(), fs::ReadFile(), ModSpec::release, str_split(), and ModSpec::virtual_path.
Referenced by getModsInPath(), ModApiMainMenu::l_check_mod_configuration(), and ModApiMainMenu::l_get_content_info().